
That's probably reasonable as a first step, at least as a followup, we could experiment with also serializing webfonts and see whether the performance is a problem. If we don't push the web font across, the result would be that the popup renders with whatever is next in the font-family list, which is the same behavior as the page itself would show if the webfont failed to load for any reason. Also, I don't know if we currently have the ability to do this from front-end JS we might need to add API to make that possible. for CJK use) could be as much as a megabyte of data (although that's rare most are in the range of a few tens of kilobytes, sometimes into the low hundreds). The reason that browser overrode the font weight. They only have whatever styles are specified. I believe we have the capability to fix that, based on the font serialization/deserialization stuff that Lee has been doing for printing via the chrome process, but it's possible that the amount of data we'd be pushing across might sometimes lead to a perceptible lag in popping up the menu. From a CSS point of view, elements dont have usual behavior.

Web fonts would remain an issue, as a webfont loaded by the child process won't be available in the parent. That seems likely to be substantially more expensive than if we were doing it at the C++ level by serializing and deserializing style structs, but I expect it'd still be OK. I discovered they would not receive padding either.
However, it looks like the implementation actually lives in toolkit JS-land (toolkit/modules/SelectHelper.jsm) which I guess means we'd need to read the computed style of the items and add all the relevant font-* properties to the record, as was done for background and color in bug 910022. Three years later, I'm finding it strange elements of types reset, submit, and button don't inherit font-family in Chrome or Safari.If this were implemented at the C++ level in Gecko, I think it would be trivial to include a serialized nsFont record as part of the data we push to the chrome process to show a popup that shouldn't be so much data that it materially impacts performance. Presumably this issue applies to all the font-* properties (family, style, weight, etc), not just font-size. ****** enabled select menu css addon example ******** ****** specific firefox addon example ******** It differs from the and selectors in that it selects every element including child elements, the and selectors select the base elements (parent elements) and then rely on inheritance to pass the properties down to child element, the asterisk element forces the specified properties on to the child elements unless they are purposefully overwritten in the style for that element.- Details User Agent: Mozilla/5.0 (Windows NT 6.3 WOW64 rv:52.0) Gecko/20100101 Firefox/52.0Įnabled select menu css, font size changed bigger. Now rems do not cascade, they are always applied relative to a default value and that default value is whatever properties are set for the element.įinally, there is the asterisk selector ( *), sometimes referred to as the universal selector this can be used to select absolutely every element on a page and set its properties. The font-weight property defines how bold you text are and there are a lot of possible values normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600. Some properties, however, dont inherit and. To get round this a new modifier ( rems) was introduced. As a general rule, properties in CSS inherit from parent to child elements as described in the previous examples. This can be a problem (it can lead to very small or very large text for a start).

This is because these modifiers simply change the inherited properties so if we define the base font to be 25 pixels, and we then derive a second style from this and give it a font size of 80%, it will be 20 pixels high if we now define a third style based on this second style and give this a font size of 80% too, it will give text that is 16 pixels high - it takes 80% of the 80%. I actually said the problem with percentages is that they cascade (and they cascade like a bastard). In section 3.2.6 I talked about a cascading problem when using percentages and ems to set the font-size. element) however, defining global settings at the html level has certain advantages. At first sight this might not seem sensible (since as I’ve just said, all visible elements are contained within the. It is possible to do this at the higher level of the element. Firebug shows that both should inherit and when I look at computed it shows the label uses.

#What are all the elements that dont inherit font code#
At the start of section 5.6 we saw that by setting the body style, we could set the default style for all elements on the page (all visible elements are contained within the. When the code opens up in Firefox the fonts are not the same.
