What is the difference between stylus and userContent.css? #1922
-
Have been using stylus for a while and created a theme for a bunch of websites that I use I've just discovered userContent.css in firefox, and pasting my stylus css into that kind of works, but with bits that don't. (a background colour isn't set here, a border width isn't set there, etc) Just wondering what Stylus does ontop of the built in userContent.css functionality (as far as I'm aware mozilla abandoned that functionality and you guys continued, is that right?) The reason I'm exploring this is mainly wanting to theme my browser declaratively via nixos's configuration rather than using imperative cloud sync as I am right now, quite happy with stylus and would love to be able to configure it declaratively instead if anyone has any ideas for that |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Stylus adds your code to the web page using AUTHOR position in the CSS cascade, whereas userContent.css is an internal mechanism of the browser apparently applied in the USER position in the CSS cascade, which is overridden by the web page, unless you add an explicit In Stylus you can also use configurable variables. |
Beta Was this translation helpful? Give feedback.
Stylus adds your code to the web page using AUTHOR position in the CSS cascade, whereas userContent.css is an internal mechanism of the browser apparently applied in the USER position in the CSS cascade, which is overridden by the web page, unless you add an explicit
!important
qualifier or use a hack to raise the specificity e.g.a:not(#\0) { ........ }
.In Stylus you can also use configurable variables.