userscripts icon indicating copy to clipboard operation
userscripts copied to clipboard

Remove references to `UserCSS` and `UserStyle`

Open ACTCD opened this issue 1 year ago • 1 comments

  • https://github.com/quoid/userscripts/issues/215

As @quoid has described in above issue, the extension's legacy ==UserStyle== implementation was more of a source of confusion and frustration for users with invalid attempts.

So the best thing to do would be to remove these terms and eliminate those references that cause confusion, especially when we never intend to achieve standardization and compatibility.

We'll probably keep reading .user.css files for a while to preserve compatibility for our historical users, but maybe add a deprecation notice, or provide a one-click conversion feature to convert them to user scripts.

For any new users, and those who are wondering:

  • We have never supported UserCSS/UserStyles based on the @-moz-document syntax.
  • We have never supported style formats written for extensions such as Stylus/Stylish etc.
  • We recommend using user scripts and the GM.addStyle(css) API to inject style/css code.
  • We recommend using userscript's @match metadata and js conditional statements to limit css scope.
  • There are some limitations due to the lack of relevant API support in upstream Safari.
    • We may also fail to inject css code early enough (like js)
    • We may not be able to inject css code into sub-frames

ACTCD avatar Sep 06 '24 10:09 ACTCD

userstyles

@match may conflict with the metadata block, ending the comment early.

Does not affect actual functionality and injection, but can cause problems in code editors or other scenarios.

ACTCD avatar Nov 15 '24 13:11 ACTCD