[Webkit-unassigned] [Bug 67868] New: Optimize CSS rule handling for body and html for efficient CSS
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 9 15:26:55 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=67868
Summary: Optimize CSS rule handling for body and html for
efficient CSS
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: CSS
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: sroussey at gmail.com
For quite some time, several frameworks, ExtJS for example, have used the html and body tags as a place to add classes so that they can target specific browsers or browser capabilities in css rules. For example a class "x-ie6" will be added in IE6 to the body element. You can see examples in the ext-all.css file[1]. And there are now a bunch of sites using Modernizr (and look at what they do to the html element!)[2].
Taking advantage of these classes on html and body makes it easy to target "fixes" or "features" for certain browsers. Typical would be using CSS3 to style a button with gradients and rounded borders and drop shadows, or in old versions of IE using image spriting instead.
Companies that use Sencha's ExtJS, for example, could reap some reward if Sencha changed its CSS to have:
body.x-ie6 .buttonClsExample {}
instead of
.x-ie6 .buttonClsExample
And the browser could remove all the body.x-ie6 * rules. According to the Mozilla guide on efficient CSS[3], this would be a real gain.
I have also made a bug report for Mozilla[4].
[1] http://dev.sencha.com/deploy/ext-4.0.2a/resources/css/ext-all.css
[2] http://www.modernizr.com/
[3] https://developer.mozilla.org/en/Writing_Efficient_CSS
[4] https://bugzilla.mozilla.org/show_bug.cgi?id=678568
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list