[Solved]Pale Moon + lightweight themes: display of tabs (#2)

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Antonius32 » 2015-03-02, 01:20

Moonchild wrote:Yup, but that's still better done with an override based on Element ID since it's a special case as far as styling goes
Do you mean the proper way to do this is to first target the tabs-closebutton class as a whole, and then make an exception for the All Tabs view?

Like this:

Code: Select all

.tabs-closebutton:-moz-lwtheme-brighttext {
  list-style-image: url("chrome://global/skin/icons/close-inverted.png");
}

#allTabs-tab-close-button:-moz-lwtheme-brighttext {
  list-style-image: url("chrome://global/skin/icons/close.png");
}
Oh, and I have one more question with regard to the screenshot you posted earlier: don't you think this change could prove problematic for truly dark / black themes?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35650
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Moonchild » 2015-03-02, 09:23

Antonius32 wrote:Do you mean the proper way to do this is to first target the tabs-closebutton class as a whole, and then make an exception for the All Tabs view?
If you want to approach it logically, yes.
That way, if there are any other items with the class (which would normally need to styling) they will pick it up. The exception element (because of where it's used) will pick up the more specific rule.
Antonius32 wrote:don't you think this change could prove problematic for truly dark / black themes?
No, why would it? Pure black themes are limited to begin with, same as pure white. You can't make black blacker or white whiter.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Antonius32 » 2015-03-02, 14:09

Moonchild wrote:No, why would it? Pure black themes are limited to begin with, same as pure white. You can't make black blacker or white whiter.
All right. I don't actually use a black theme, I was just thinking along with you. :)
Off-topic:
My extension, Blue Moon Linux, modifies both the Tab Strip Close button and the Sidebar Close button, but targets the first element in one style sheet, and the second in another. Currently the Tab Strip Close button is targeted with this selector:

Code: Select all

#TabsToolbar > .tabs-closebutton
and the Sidebar Close button with this one:

Code: Select all

#sidebar-header > .tabs-closebutton
If I'd target the tabs-closebutton class (that consists of three elements) as a whole in this case, I'd have to override that for two elements in each style sheet. What do you think would be the best solution here?
Last edited by Antonius32 on 2015-03-02, 14:59, edited 2 times in total.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35650
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Moonchild » 2015-03-02, 14:58

Off-topic:
Antonius32 wrote:What do you think would be the best solution here?
Which ever one you are most comfortable with :) It's your extension and your coding style!
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Antonius32 » 2015-03-02, 15:12

Off-topic:
Moonchild wrote:Which ever one you are most comfortable with :) It's your extension and your coding style!
:) I think in this case, it's best to target only specific elements, so I'll just leave things the way they are.
Last edited by Antonius32 on 2015-03-05, 15:02, edited 2 times in total.

riiis
Lunatic
Lunatic
Posts: 471
Joined: 2014-05-17, 15:51
Location: USA

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by riiis » 2015-03-02, 15:33

The Personas Expression add-on may provide a suitable work-around. This add-on uses the sidebar for its many formatting options. The launch button for the personas-expression sidebar can be found in the status bar.

User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Antonius32 » 2015-03-05, 16:31

Antonius32 wrote:If you use the tabs-closebutton class name without further specification, the Close button in the All Tabs view is targeted as well, and I think that's undesirable, don't you agree?
Moonchild wrote:Yup, but that's still better done with an override based on Element ID since it's a special case as far as styling goes :)
You probably actually meant like this, correct?

Code: Select all

.tabs-closebutton:not(#allTabs-tab-close-button):-moz-lwtheme-brighttext {
  list-style-image: url("chrome://global/skin/icons/close-inverted.png");
}

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35650
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Moonchild » 2015-03-05, 17:57

Um well, I meant more as different rules for sake of logic/clarity, but you should be able to compact it into one like that, I think. I tend to just have cascading rules, myself - much easier to work with, and it's called cascading styles for a reason ;)
Besides, ID overrides class, anyway.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Antonius32 » 2015-03-05, 18:44

Moonchild wrote:I meant more as different rules for sake of logic/clarity (...)
Ah, so you did mean having two separate rules, as in my first example. Thank you for clarifying.

User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: [Solved]Pale Moon + lightweight themes: display of tabs

Unread post by Antonius32 » 2015-03-19, 20:03

I really like the new colour scheme for lightweight themes. Thank you, Moonchild!

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35650
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: [Solved]Pale Moon + lightweight themes: display of tabs

Unread post by Moonchild » 2015-03-19, 20:36

Antonius32 wrote:I really like the new colour scheme for lightweight themes. Thank you, Moonchild!
:)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite