File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -379,7 +379,19 @@ async function applyOwnTheme(style) {
379379}
380380
381381function applyUserStyleRules ( ) {
382- mUserStyleRules . textContent = loadUserStyleRules ( ) ;
382+ mUserStyleRules . textContent = `
383+ /* Simple selectors in user styles may have specificity lower than the one of
384+ built-in CSS declarations of TST itself.
385+ CSS media query (@media) should not affect to specificity of selectors in
386+ itself, but actually declarations with lower specificity are applied if they
387+ are wrapped with any media query - just for now (Firefox 102).
388+ So TST wraps all user styles inside a needless media query for convenience.
389+ This workaround should allow people to write more simpler user styles.
390+ See also: https://github.com/piroor/treestyletab/issues/3153#issuecomment-1184619369 */
391+ @media all {
392+ ${ loadUserStyleRules ( ) }
393+ }
394+ ` ;
383395}
384396
385397async function applyBrowserTheme ( theme ) {
You can’t perform that action at this time.
0 commit comments