Skip to content

css selector question #1236

Answered by vednoc
pihentagy asked this question in Q&A
Apr 26, 2021 · 1 comments · 6 replies
Discussion options

You must be logged in to vote

I'd started to write a custom style which changes every fonts on every webpage to serif

Since I also prefer serif fonts, I made the following userstyle for my own use. It uses Stylus-lang preprocessor in order for code to be more documented, extendable, and maintainable in the long run.

/* ==UserStyle==
@name           Global serif font
@namespace      www
@version        1.0.0
@description    Apply your favorite serif font globally.
@author         vednoc
@preprocessor   stylus
@var text font  'Serif font' '"your favorite serif font"'
==/UserStyle== */

@-moz-document regexp("https?://.*") {
    i = !important

    // Exclude default code areas.
    n ?= ':not(code):not(pre):not(pre > …

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@pihentagy
Comment options

@vednoc
Comment options

@pihentagy
Comment options

@vednoc
Comment options

@pihentagy
Comment options

Answer selected by pihentagy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants