A userstyle (or user style) is a user-authored stylesheet, written in Cascading Style Sheets (CSS) or a CSS preprocessor language such as Stylus, Less, or Sass.[1] Userstyles change the appearance of web pages in the user's browser (also known as skinning), primarily for the purposes of modifying color schemes, hiding unwanted elements (such as for ad blocking), or improving layouts and/or accessibility.[2][3][4][5]

History

edit

Userstyle functionality was historically included in major browser distributions through customization settings such as Firefox's userContent.css,[6][7] Google Chrome's User StyleSheet/Custom.css,[8] and Safari's advanced "Style sheet" setting.[9] As most major browser distributions have since removed or phased out userstyles features,[10][11] userstyles are now more often applied through userstyles managers.

Userstyle managers

edit

A userstyle manager is a browser extension that provides a user interface to edit and organize userstyles. Userstyle managers perform a variety of functions, including but not limited to managing and syncing installed userstyles across browsers and profiles, checking for updates of installed userstyles, compiling stylesheets authored in preprocessor languages, injecting stylesheets into web pages, and patching browser security policies such as Content Security Policy to allow for userstyle functions.

Popular userstyle managers include Stylus,[12], xStyle,[13] and Cascadea.[14]

Stylish

edit

The earliest known userstyle manager, Stylish,[15][16] was the predominant userstyle manager from its inception in 2005 until the late-2010s.

In 2018, it was revealed that that the extension had been collecting the complete web browsing history of its users without consent after an undisclosed sale of the extension two years earlier.[17]

Userstyle repositories

edit

Userstyles were historically shared and published in large centralized websites known as userstyle repositories. The now-defunct userstyles.org, also the homepage for the Stylish userstyles manager, was the first of such userstyles repositories and was popular during the 2010s.

Following the third-party acquisition of Stylish and userstyles.org in 2016, userstyles.org became increasingly inaccessible to users due to frequent downtime. As a result, archives of the site's content and user-submitted userstyles have been made to support continued usage of older userstyles.[18] Since 2020, the userstyle repository userstyles.world has been popular among the userstyles community as an open source alternative.[19]

Userstyles are often installed directly from software development version control platforms such as GitHub.[20] Userstyle formats like UserCSS, which are installable directly from a file URL, have encouraged publishing through individual software repositories.

UserCSS

edit

Some userstyle managers, namely Stylus and xStyle, support a specific format of userstyle known as UserCSS. UserCSS userstyles use a .user.css file extension, and include a metadata section at the top of the file noted with a special /* ==UserStyle== comment.[21]

/* ==UserStyle==
@name         Example UserCSS style
@namespace    github.com/openstyles/stylus
@version      1.0.0
@license      unlicense
@preprocessor default
@var color link-color "Link Color" red
==/UserStyle== */

@-moz-document domain("example.com") {
  a {
    color: var(--link-color);
  }
}

UserCSS metadata may include the following fields, though there is no definitive specification for the UserCSS metadata format and userstyle managers may differ in support.[22]

@name
The name of the userstyle.
@namespace
The namespace of the userstyle. The combination of @name and @namespace must be unique for each userstyle. Used to help distinguish between userstyles with the same name. Usually consists of the author's nickname or homepage, often in the form of a URL.
@version
The version of the userstyle. The field is typically considered required by userstyle managers, and is considered when checking for updates to the userstyle. Usually in the SemVer (semantic versioning) format.
@description
A description of the userstyle.
@author
The author of the userstyle. Consists of the author's name and optionally an associated email or URL.
@homepageURL
The homepage URL of the userstyle.
@supportURL
The support URL of the userstyle, to provide users with a link to give feedback to the author.
@updateURL
The update URL of the userstyle. Consists of a URL to a userstyle file, used to compare against for updates. When not defined, the userstyle is updated from the original URL used for installation, if any.
@license
The license of the userstyle in the SPDX license identifier format.
@preprocessor
The preprocessor of the userstyle, such as Stylus, Less, or Sass. When undefined, standard CSS syntax is assumed.
@var
Used to define user options for the userstyle. May support a variety of types, such as for text, numbers, colors, toggles, and selecting from predefined options.

See also

edit

References

edit
  1. "User Agent Accessibility Guidelines (UAAG) 2.0". W3C Web Accessibility Initiative. 15 December 2015. Retrieved 16 June 2026. user style sheet: Style sheets that are not provided by the web content author. The user interface for configuring user style sheets can be targeted at advanced users.
  2. Willis, Nathan (7 May 2007). "Make the whole Web look better with Stylish". Linux.com. Archived from the original on 8 March 2018.
  3. Pataki, Daniel (3 July 2008). "Redesign your Google Calendar with a custom skin - gHacks Tech News". gHacks Technology News. Retrieved 16 June 2026.
  4. Gordon, Whitson (9 November 2011). "Fix Gmail's Newest Annoyances with These Userstyles and Userscripts". Lifehacker.
  5. Kyrnin, Jennifer (26 January 2021). "Why You Should Use a User Style Sheet". ThoughtCo.
  6. "Customizing Mozilla". www-archive.mozilla.org. 21 April 2008. User CSS (changing fonts, colors and other style): [...] the user can override them with two plain text files, called userContent.css [...] userContent.css controls CSS for content inside windows.
  7. "What is userChrome.css? What can it do?". www.userchrome.org.
  8. "Support user stylesheet [41011510] - Chromium". issues.chromium.org. Retrieved 16 June 2026. Enabled with the --enable-user-stylesheet flag which causes chrome to read <user-data-dir>/<profile>/User StyleSheet/Custom.css at startup and set it as the user style sheet.
  9. "Change Advanced settings in Safari on Mac". Apple Support. Retrieved 16 June 2026. Style sheet: Use your own CSS instead of webpage style sheets.
  10. "1541233 - [Perf] Stop loading userContent.css or userChrome.css by default unless a preference is set". bugzilla.mozilla.org.
  11. "Stylus – Get this Extension for 🦊 Firefox (en-US)". addons.mozilla.org. Retrieved 15 June 2026.
  12. "xStyle - Chrome Web Store". chromewebstore.google.com.
  13. "Cascadea - Remix the web". Retrieved 16 June 2026.
  14. Jason Barnabe (9 October 2005). "Stylish 0.1.1 Released [11 Oct]". MozillaZine. Archived from the original on 10 December 2005.
  15. "Stylish - Custom themes for any website – Get this Extension for 🦊 Firefox (en-US)". addons.mozilla.org. Retrieved 15 June 2026.
  16. Heaton, Robert (2 July 2018). ""Stylish" browser extension steals all your internet history".
  17. "UserStyles.org Archive". uso.kkx.one. Retrieved 15 June 2026.
  18. "Website themes and skins — UserStyles.world". userstyles.world. Archived from the original on 8 June 2026. Retrieved 15 June 2026.
  19. "userstyle · GitHub Topics". GitHub. Archived from the original on 24 April 2026. Retrieved 15 June 2026.
  20. "UserCSS". openstyles/stylus. GitHub. Retrieved 17 June 2026.
  21. "Writing UserCSS". openstyles/stylus. GitHub. Retrieved 17 June 2026.