this post was submitted on 28 May 2024
7 points (100.0% liked)
Firefox Customs
2 readers
1 users here now
Post your unsupported Firefox customizations here!
From the makers of r/FirefoxCSS
Links
Related
Rules
- Posts must have flair!
- Posts cannot be memes/shitposts. They should be about Firefox customization with CSS.
- Please be civil. Bear in mind that many users come here for help and would be turned off by insults and rudeness.
- When posting large amount of code use a service dedicated to hosting text snippets, such as pastebin, hastebin, github gist or equivalent. Relatively short snippets can be wrapped in code-block for inline viewing.
- Do NOT use url-shorteners or link to compressed downloads (such as zip or rar) when sharing code.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Sounds like what's happening here is that the relative path you have given doesn't resolve to what you think it does. See, the variable
--newtab-wallpaper-dark
is used by an internal style sheet, so when theurl()
actually gets resolved it will be relative to the internal style sheet address - not to the file path of userContent.css.So, a workaround would be to give it an absolute file path or override the property where that variable is actually used.
thanks for the answer, I searched where the variable is used and added
!important
and that fixed, I don't know why but all right jeje:Right, that makes perfect sense. The property being a variable nor it having an important tag are not meaningful to explain what's happening here.
What is important is simply what the address of the .css file is which sets the
background-image
property, because relative url resolves relative to that. The internal style sheet where this background-image property is set ischrome://activity-stream/content/css/activity-stream.css
. So if the url it uses is../newtab/wallpaper-dark.png
(as by you setting the variable as such) then it will try to load an image from addresschrome://activity-stream/content/newtab/wallpaper-dark.png
which surely doesn't exist.But if you set
background-image
property from within userContent.css then the relative url resolves relative to that instead.ooh, thanks for the explanation, I'm sure I understand better how this works. 💙