L. David Baron wrote:
> On Thursday 2007-11-22 02:22 +0100, Axel Hecht wrote:
>> I'm asked for reviews to intl.css patches every now and then, and I
>> wonder if I should advocate the use of @-moz-document.
>
> One danger is that @-moz-document isn't going to get along with
> overlays very well; it'll refer to the master document, not the
> documents overlaid into it.
>
>> Commonly, the selectors in intl.css are ID selectors, see
>> http://mxr.mozilla.org/l10n/source/he/toolkit/chrome/global/intl.css for
>> an example.
>>
>> I wonder if using @-moz-document could possibly speed things up. Any
>> other review comments on those from CSS folks?
>
> Relative to an ID selector on the subject of the selector, my guess
> would be that it wouldn't speed things up measurably. The question
> is whether running nsCSSDocumentRule::UseForPresentation (and
> failing) is faster than the cost of including the rule in the rest
> of the sorting and hashing in nsCSSRuleProcessor::GetRuleCascade
> (InsertRuleByWeight, PutRulesInList, AddRule). I suspect the cost
> of the two is pretty similar (both low, probably UseForPresentation
> a tiny bit faster although I'm not sure how expensive the string
> copying would be there compared to all the rest of the stuff in the
> other), which means it's probably best to do whichever makes the
> code more managable, although I'm just guessing by looking at the
> code rather than profiling.
Thanks.
>> I'm wondering, is there any reason why all intl.css have a
>>
>> window {
>> font: 3mm tahoma,arial,helvetica,sans-serif;
>> }
>>
>> in there, other than historics?
>
> That seems quite odd (since we should be using system fonts in most
> cases). What files does this apply to? And does some other rule
> override it in those cases? Shouldn't be too hard to tell with DOM
> inspector.
chrome://global/locale/intl.css is imported from
chrome://global/skin/global.css, so it's basically everywhere.
I'm not sure if it's not overwritten by global.css, though,
http://mxr.mozilla.org/mozilla/source/toolkit/themes/winstripe/global/global.css#70
specifies font to be "message-box". Whatever that means.
Axel
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout