Simple feed-button solution.

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

Simple feed-button solution.

Post by patrickjdempsey »

I had a thought today about the issue of backwards compatibility with the feed-button. We can take advantage of another non-backwards and non-forwards compatible attribute... just use chromedir or -moz-locale-dir as a switch! Here is the code for the Feed button with two sections using chromedir so that they are unreadable in 3.6+. If you have something you want unreadable by 3.5 and below, just use -moz-locale-dir.

Code: Select all

/* Feed icon */
#feed-button, #feed-button > .button-box,
#feed-button:hover:active > .button-box {
  padding: 0px;
  margin: 0px;
  border: 0px;
  background-color: transparent;
}

#feed-button > hbox > .button-menu-dropmarker,
#feed-button > hbox > .button-text {
  display: none;
}

#urlbar[chromedir="ltr"] #feed-button,
#urlbar[chromedir="rtl"] #feed-button {
  -moz-binding: url("chrome://global/content/bindings/button.xml#menu");
  padding: 0 2px !important;
  background-image: none;
}

#feed-button {
  -moz-appearance: none;
  min-width: 0px;
  list-style-image: url("chrome://browser/skin/feeds/feed-icons-16.png");
  -moz-image-region: rect(0px 16px 16px 0px);
}

#feed-button:hover {
  -moz-image-region: rect(0px 32px 16px 16px);
}

#feed-button[open="true"],
#feed-button:hover:active {
  -moz-image-region: rect(0px 48px 16px 32px);
}

#urlbar[chromedir="ltr"] #feed-button:not([feeds]),
#urlbar[chromedir="rtl"] #feed-button:not([feeds]) {
  visibility: collapse;
}
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
Frank Lion
Posts: 21178
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Re: Simple feed-button solution.

Post by Frank Lion »

patrickjdempsey wrote:I had a thought today about the issue of backwards compatibility with the feed-button.

Well done, Patrick, nice fix - that's a real themer's fix. ;) - I tested this on 3.7, 3.6 and 3.0 and seems fine.

It would have been tiresome to not have maintained backwards compat back to 3.0 just for the sake of a RSS feed button!
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
User avatar
KLB
Posts: 2282
Joined: December 21st, 2003, 9:25 am
Location: Saco Maine
Contact:

Re: Simple feed-button solution.

Post by KLB »

Thank you so much for providing this. You will save me a great deal of effort and frustration. :)
Ken Barbalace - AMO Editor (I focus on reviewing themes)
I maintain Classic Compact, a very compact yet clean Firefox theme.
EnvironmentalChemistry.com (Periodic Table)
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Simple feed-button solution.

Post by patrickjdempsey »

Glad to help, I honestly didn't even know that this was an issue until I had a bug report on a comment on AMO.
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/
1lost1
Posts: 16
Joined: December 22nd, 2005, 10:15 pm

Re: Simple feed-button solution.

Post by 1lost1 »

The feed-button solution was a great help.

I do not want to be to fussy but hover over on feed-button is not working on 3.6 but it is working on 3.0.18

Did I do something wrong ](*,)
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Simple feed-button solution.

Post by patrickjdempsey »

There should be no difference. Did you remove all of your old feed-button code?
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/
1lost1
Posts: 16
Joined: December 22nd, 2005, 10:15 pm

Re: Simple feed-button solution.

Post by 1lost1 »

Yep, some old code snuck it's way in there. =D>

Works Great Thank you for answering my lowly Question.
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Simple feed-button solution.

Post by patrickjdempsey »

Lol, there is no lowly question... except "Why do you guys use Firefox and not Chrome, IE, Opera, etc." ;)
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