xiaoxiaoflood / firefox-scripts

userChromeJS / autoconfig.js and extensions
Mozilla Public License 2.0
1.06k stars 88 forks source link

StyloaiX @import url within chrome profile folder doesn't work #189

Closed megamorphg closed 2 years ago

megamorphg commented 2 years ago

When I try to import the "autohide_sidebar.css" in a different chrome profile folder, it doesn't work: @import url("../../aeskq86n.default-ahmed/chrome/firefox-csshacks/chrome/autohide_sidebar.css");

The CSS is within a different chrome profile folder and this works fine with normal userChrome.css modification. I'd like to be able to enable/disable this without restarting FF and tested that other styles work fine so it is something to do with importing syntax?

xiaoxiaoflood commented 2 years ago

StyloaiX's styles path is like resource://userchromejs/UserStyles/autohide_sidebar.css. The root resource://userchromejs/ is the chrome folder from running profile.

If you need to import from outside this context, you must use full path like file:///home/user/.mozilla/firefox/aeskq86n.default-ahmed/chrome/firefox-csshacks/chrome/autohide_sidebar.css.

If unsure of full path, just drag the file from your file manager to Firefox and copy the value in addressbar.

megamorphg commented 2 years ago

Ah, looks like I can't share a single CSS across profiles with StylaoiX then (without symlink). Btw had to use "file://" and not "file:////"; maybe it's a Windows thing.