5
submitted 1 day ago* (last edited 22 hours ago) by Godie@lemmy.world to c/FirefoxCSS@fedia.io

Hi, I want to change the extensions icons of sidebar-revamp but the image is in the html and I can't get it to work.

top 2 comments
sorted by: hot top controversial new old
[-] MrOtherGuy@lemmy.world 1 points 22 hours ago

I'd probably just make the img use a variable if one is set, and then set the variable for the shadow root host based on its extensionId attribute:

.button-background > img{
  content: var(--my-custom-image,none);
}
moz-button[extensionId="some-extension-id"]{
  --my-custom-image: url("image.png");
}
[-] Godie@lemmy.world 1 points 22 hours ago

Thanks. ๐Ÿ˜„๐Ÿ‘ ๐Ÿ’™

this post was submitted on 21 Feb 2025
5 points (100.0% liked)

Firefox Customs

2 readers
5 users here now

Chat with us!

Post your unsupported Firefox customizations here!

From the makers of r/FirefoxCSS

Links

Related

Rules

  1. Posts must have flair!
  2. Posts cannot be memes/shitposts. They should be about Firefox customization with CSS.
  3. Please be civil. Bear in mind that many users come here for help and would be turned off by insults and rudeness.
  4. 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.
  5. Do NOT use url-shorteners or link to compressed downloads (such as zip or rar) when sharing code.

founded 2 years ago
MODERATORS