Closed Bug 838244 Opened 11 years ago Closed 11 years ago

Create a theme directory for shared default theme resources

Categories

(Firefox :: Theme, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 22

People

(Reporter: MattN, Assigned: MattN)

References

()

Details

Attachments

(5 files)

There is quite a bit of duplication of CSS styles between our default themes (e.g. winstripe/pinstripe/gnomestripe) which makes implementing new features and re-styling old features somewhat tedious and error prone.

I propose that we share more styles between the default themes and split up the shared css files to make them more manageable (similar to how browser.js was recently split up in bug 758812).  We would continue to use browser/base/content/browser.css for structural markup so this would only affect theme-related styles.  To avoid a performance impact, the modularized shared CSS files can be pre-processed into the various OS-theme stylesheets. This also allows them to use #defines of the including stylesheet.

The current proposal is to create browser/themes/shared/ containing files such as browser-devtools.inc.css and browser-social.inc.css.
Simple base patch to create the directory with browserShared.inc renamed to shared/browser.inc.
Attachment #713745 - Flags: review?(gavin.sharp)
4 files changed, 168 insertions(+), 402 deletions(-)

I used diffmerge to do a 3-way merge with the three default themes to check for differences.
Attachment #713748 - Flags: review?(rcampbell)
Attachment #713748 - Flags: review?(dcamp)
4 files changed, 101 insertions(+), 240 deletions(-)
Attachment #713752 - Flags: review?(rcampbell)
Attachment #713752 - Flags: review?(dcamp)
Attachment #713752 - Flags: review?(dcamp) → review?(paul)
Attachment #713748 - Flags: review?(dcamp) → review?(paul)
4 files changed, 56 insertions(+), 136 deletions(-)
Attachment #713758 - Flags: review?(paul)
Attachment #713758 - Attachment description: Move common responsive design mode CSS → Part 4 - Move common responsive design mode CSS
4 files changed, 139 insertions(+), 334 deletions(-)
Attachment #713772 - Flags: review?(jAwS)
Comment on attachment 713772 [details] [diff] [review]
Part 5 - Move common social API chat CSS

Review of attachment 713772 [details] [diff] [review]:
-----------------------------------------------------------------

This is fantastic! Thank you for removing so much duplication!

::: browser/themes/gnomestripe/browser.css
@@ -2274,1 @@
>    margin: -285px -1px 0 -1px;

I'm not sure if you want to make this change here or not, I'll leave it up to you, but this should have the same |margin: -285px 0 0;| as the other themes.
Attachment #713772 - Flags: review?(jAwS) → review+
Attachment #713745 - Flags: review?(gavin.sharp) → review+
Attachment #713758 - Flags: review?(paul) → review+
Attachment #713752 - Flags: review?(rcampbell)
Attachment #713752 - Flags: review?(paul)
Attachment #713752 - Flags: review+
Attachment #713748 - Flags: review?(rcampbell)
Attachment #713748 - Flags: review?(paul)
Attachment #713748 - Flags: review+
thank you!
I filed bug 844412 for doing this over in /toolkit too.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: