dev.lemmy.ml not showing correctly

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.
kujaw

dev.lemmy.ml not showing correctly

Unread post by kujaw » 2020-03-01, 10:25

HI, everything is in this post: https://dev.lemmy.ml/post/30957/comment/2763

Colors in light themes don't show correctly on Palemoon 28.8.3.
On Firefox 73.0.1 colors are ok.

[edit]
spelling

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

Re: dev.lemmy.ml not showing correctly

Unread post by Moonchild » 2020-03-01, 10:43

Despite what was asserted in that thread it -is- a problem with Lemmy.

darkly.min.css which is loaded despite choosing a different theme overrides the Litera text color with an !important rule.

Pale Moon is doing exactly what it is told to do.
You do not have the required permissions to view the files attached to this post.
"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

kujaw

Re: dev.lemmy.ml not showing correctly

Unread post by kujaw » 2020-03-02, 10:31

Since I've already posted on Lemmy's Github about the issue, could you take a look, please? I am in no position to agree with any of you guy because of my lack of knowledge.
https://github.com/dessalines/lemmy/issues/570

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

Re: dev.lemmy.ml not showing correctly

Unread post by Moonchild » 2020-03-02, 11:25

I replied on the issue.

The problem is they try to disable/unload styles by setting the "disabled" attribute on the stylesheet's <link> element. That doesn't work in Pale Moon (and didn't work in Firefox either prior to 68 at which point they aped Chrome in that respect despite the spec. Blink and Gecko behave different even with that change, though.

The disabled attribute on <link> is not specced in the HTML standard. There has been some discussion about it because apparently it's the only way in Chrome/Blink to disable style sheets (of which the logic is really fishy (not my words)) but since it's not in the spec to support the "disabled" attribute on <link> elements (and it doesn't really make sense to do so, anyway!), we don't. As a result the darkly theme remains loaded and is overridden by other themes in proper cascading style fashion, except, of course, where darkly has an !important attribute set so it breaks the cascade. this is the case for color on darkly's body selector, overruling the loaded light themes which don't use !important.

I asked the lemmy dev to please be more browser-agnostic in the way they switch themes. I suggested avoiding any and all !important rules in the default theme so styles can be applied dynamically on top, or not loading darkly by default before applying the chosen theme.
"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