Firebird Theme - a "light-weight" Theme

Discuss application theming and theme development.
Post Reply
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Firebird Theme - a "light-weight" Theme

Post by patrickjdempsey »

So I've been playing around with Firebird. I've reduced it down to 64KB, and made it swappable without reload... sorta.

To make it smaller I reduced the PNG files down to only the Active (dark) states and redefined everything in browser.css to use opacity instead of different image regions. I also made the dropmarker.css a tad darker to match the dark toolbar buttons better. This also adds a hover state to the Back and Forward buttons and dropmarker which did not originally have one:

Code: Select all

#back-button {
  list-style-image: url("Toolbar.png") !important;
  -moz-image-region: rect(0px 32px 32px 0px) !important;
  opacity: .6 !important;
}
#back-button:not([disabled]):hover {
  opacity: .8 !important;
}
#back-button:not([disabled]):hover:active {
  opacity: 1 !important;
}
#back-button[disabled="true"] {
  opacity: .25 !important;
}


New dropmarker code:

Code: Select all

#back-forward-dropmarker {
  list-style-image: url(dropmarker.png) !important;
  -moz-image-region: rect(0 11px 11px 0) !important;
  opacity: .8 !important;
  -moz-box-align: end !important;
  padding-bottom: 5px !important
}
#back-forward-dropmarker[open="true"],
#back-forward-dropmarker:not([disabled]):hover {
  opacity: 1 !important;
}
#back-forward-dropmarker[disabled="true"] {
  opacity: .25 !important;
}


To make it "hot swappable" I simply removed all of the instructions to load browser.css. I removed the "style" instructions out of chrome.manifest, ditched customizeToolbar.css and the classic folder. All that is left is browser.css and the three image files. It's also important to use !important in *every* line of browser.css or all of the instructions will not translate.

Using either Stylish or Generic Chrome CSS Loader, you insert the code found in your customizeToolbar.css file. Doing that it is possible to switch between the default theme and Firebird in only a few key strokes, without reload. This isn't *quite* Personas for themes, but it's close.

This is basically the exact method I'm using for building my subthemes for Stratini Padded and Mosaic-Fox and it seems to work well... it's basically just a userchrome hack acting as a theme.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Firebird Theme - a "light-weight" Theme

Post by patrickjdempsey »

Code for Chrome CSS Loader:

@import url("chrome://customskin/skin/browser.css");
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Firebird Theme - a "light-weight" Theme

Post by patrickjdempsey »

My own attempt... I trimmed down Firebird to the barest essentials and created these B&W icons based on the original Mosaic 1.0 icon set.

https://addons.mozilla.org/en-US/firefox/addon/46367

So the question is now... is it possible to swap out these lightweight themes without restart through a single app the way Personas does for backgrounds?
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
aaron
Posts: 3130
Joined: November 4th, 2002, 8:49 pm
Location: Texas
Contact:

Re: Firebird Theme - a "light-weight" Theme

Post by aaron »

I re-did my Smoke theme with this 'light-weight' theme approach. I can't figure out how to make the tabs like in the 'heavy-weight' version of the theme, but other than that, I think it translated over very well.

I'd like opinions on what works, what doesn't, and suggestions for improvement (with code samples if possible!), and a solution for the tabs (if someone can figure it out).

Smoke (heavy-weight version)
http://www.spuler.us/themes/smoke/smoke_fx_3.jar

Smoke Lite (light-weight version)
http://www.spuler.us/temp/smoke_lite@spuler.us.jar
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Firebird Theme - a "light-weight" Theme

Post by patrickjdempsey »

I built a version of my Mosaic Modern Lite that puts a heavy black line around the active tab and tabs bottom, but I never uploaded it because obviously it wouldn't be compatible with mac which uses up-side-down tabs!
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Firebird Theme - a "light-weight" Theme

Post by patrickjdempsey »

In both versions, you have a bug that is causing the search bar to do weird things when the browser window is made smaller or the search bar is made smaller by dragging the url/search separator. You also have an issue with the new tab button in the lite version.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
aaron
Posts: 3130
Joined: November 4th, 2002, 8:49 pm
Location: Texas
Contact:

Re: Firebird Theme - a "light-weight" Theme

Post by aaron »

I can't reproduce any issues with the new tab button on the lite version. Can I have a screenshot of the search bar bug?
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Firebird Theme - a "light-weight" Theme

Post by patrickjdempsey »

Maybe it only happens in Win2000/XP Classic? I see the default tab button and the default shiney background with no border.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
aaron
Posts: 3130
Joined: November 4th, 2002, 8:49 pm
Location: Texas
Contact:

Re: Firebird Theme - a "light-weight" Theme

Post by aaron »

strange...i have tested this on vista x64 and also xp x32 and it works for me...
User avatar
ShareBird
Posts: 2740
Joined: December 8th, 2004, 7:09 am
Location: Berlin | Made in Brasil
Contact:

Re: Firebird Theme - a "light-weight" Theme

Post by ShareBird »

Screenshot:
Image
Silvermel - A Theme for Firefox and Thunderbird
YATT - Yet Another Theme Tutorial
Don't give a man a fish. Teach him how to fish instead.
User avatar
aaron
Posts: 3130
Joined: November 4th, 2002, 8:49 pm
Location: Texas
Contact:

Re: Firebird Theme - a "light-weight" Theme

Post by aaron »

Thanks Sharebird. I just discovered a fix for the non-alignment of menu icons in Vista. I've seen that problem in the search bar before but no idea on how to fix it.

I see the new tab button (but that's probably because I have my 'basics' extension enabled to move the new tab button to the left. Must have forgotten the code for the default new tab button.

I really wish I could figure out a way to get the tabs like in 'smoke original' in the 'lite' version. I'd even be willing to give someone that helps me get it like that some $$ via PayPal...
User avatar
aaron
Posts: 3130
Joined: November 4th, 2002, 8:49 pm
Location: Texas
Contact:

Re: Firebird Theme - a "light-weight" Theme

Post by aaron »

Fixed the new tab button and the searchbar issues!
Image

Also noticed an issue when the toolbar mode is set to icons + text... any ideas? I'm at a loss on this one...
Image

Now I need to do the tabs and clean up some other minor odds and ends that I've noticed, but I'm pleased so far. The tab bounty is still on the table... may put a bounty on the icons + text mode as well if I can't solve that one.

Updated the file: http://www.spuler.us/temp/smoke_lite@spuler.us.jar
User avatar
Frank Lion
Posts: 21177
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Re: Firebird Theme - a "light-weight" Theme

Post by Frank Lion »

aaron wrote:I really wish I could figure out a way to get the tabs like in 'smoke original' in the 'lite' version. I'd even be willing to give someone that helps me get it like that some $$ via PayPal...


This will fix it, replace lines 552 -572 in your browser.css with this -

Code: Select all

/* ::::: tabs ::::: */
.tabbrowser-tab {
  -moz-appearance: none !important;
  background-image: none !important;
  background-color: #E0DFE3 !important;
  margin: 0px 0px 0px !important;
  padding: 0px 1px 1px 0px !important;
  border: 0.5px solid !important;
  border-right-width: 1px !important;
  border-bottom: none !important;
  opacity: 1.0 !important;
  }

.tabbrowser-tab[selected="true"] {
  -moz-appearance: none !important;
  background-image: none !important;
  background: #FFFFFF !important;
  margin: 0px 0px 0px !important;
  padding: 0px 1px 1px 0px !important;
  opacity: 1.0 !important;
  }


Despite using moz-app: none !imp on unselected tab, there was none on selected. You also needed to get rid of the background image (supplied by the FF default theme) and replace it with your usual background colour on selected and non-selected.

The opacity setting of 0.8 on non-selected was allowing the grad behind it to alter your background colour.

You just need to do something like text-decoration : underline !important for hover state on tabs.

Your lightweight tabs now look like this -

Image
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Firebird Theme - a "light-weight" Theme

Post by patrickjdempsey »

Well for one thing you had .tabbrowser-tabs spelled ".tabbroswer-tabs" ;) I think your biggest problem here is that the theme you are building from is based on either a much older version of Firefox or a custom theme engine. You can't really use custom theme engine stuff for these kinds of themes... not really. What you need to be doing is looking at the default theme and thinking to yourself... "how can I change THAT" and not building a whole new theme. I only touched on the tabs because that's the only thing you mentioned, but I'm sure there's many other places you need to compare to the default theme and take out the redundant, conflicting or just plain weird stuff.

Now... remove all of your "tabs-newtab"/"tabs-newbutton" code. BTW... what is "tabs-newbutton" for? I edited it out since I'd never seen it.... put it back if you need it. Now delete "/* ::::: tabs ::::: */" and EVERYTHING after, and insert the following:

Code: Select all

/* ::::: tabstrip ::::: */

.tabbrowser-tabs {
  -moz-appearance: none !important;
  background-image: none !important;
}

.tabbrowser-tab {
  background: none !important;
  margin: 2px 1px 3px 1px !important;
  padding: 1px !important;
  border: 0.5px solid ThreeDShadow !important;
  -moz-border-radius-topleft: 0px !important;
  -moz-border-radius-topright: 0px !important;
  -moz-border-right-colors: ThreeDShadow !important;
  opacity: 0.8 !important;
 }

.tabbrowser-tab[selected="true"] {
  opacity: 1.0 !important;
  -moz-border-top-colors: Highlight !important;
  -moz-border-right-colors: Highlight !important;
  -moz-border-left-colors: Highlight !important;
  -moz-border-bottom-colors: Highlight !important;
  background-color: white !important;
  }
 
.tab-icon-image {
  -moz-margin-start: 3px !important;
}

.tabs-bottom {
  height: 3px !important;
  background-image: none !important;
  border-top: none !important;
}

.tab-close-button {
  list-style-image: url("close-button.png") !important;
  -moz-image-region: rect(0px 16px 16px 0px) !important; 
}
.tab-close-button:hover,
.tab-close-button:hover:active {
  list-style-image: url("close-button-hov.png") !important;
  -moz-image-region: rect(0px 16px 16px 0px) !important; 
}

.tabbrowser-arrowscrollbox > .scrollbutton-up,
.tabbrowser-arrowscrollbox > .scrollbutton-down,
.tabs-newtab-button,
.tabs-alltabs-button .toolbarbutton-icon, .tabs-alltabs-button {
  -moz-image-region: rect(0px 16px 16px 0px) !important;
  margin: 2px !important;
  padding: 1px !important;
  background-image: none !important;
  border: none !important;
}

.tabs-alltabs-button .toolbarbutton-icon, .tabs-alltabs-button {
  list-style-image: url("dropmarker.png") !important;
}

.tabs-newtab-button {
  list-style-image: url("basics.png") !important;
}

.tabs-newtab-button:hover,
.tabs-newtab-button:hover:active {
  -moz-image-region: rect(16px 16px 32px 0px) !important;
}


*Edit: This *basically* reproduces the tabs from the original theme... edited to include removing the backgrounds of the scroll arrows.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Firebird Theme - a "light-weight" Theme

Post by patrickjdempsey »

Also if you want the closers to only appear when hover over the tab, add this after the tab-close-button instructions:

Code: Select all

.tabbrowser-tab:not(:hover) .tab-close-button {
 list-style-image: none !important;
}
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
Post Reply