From: Michael Tremer Date: Tue, 14 Mar 2023 11:24:46 +0000 (+0000) Subject: CSS: Convert _code-highlighting.scss to SASS X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2414092c67b74702260f26c72c75093e9974331e;p=ipfire.org.git CSS: Convert _code-highlighting.scss to SASS Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index 094b7825..352cc063 100644 --- a/Makefile.am +++ b/Makefile.am @@ -341,7 +341,7 @@ templates_wiki_modulesdir = $(templates_wikidir)/modules SASS_FILES = \ src/sass/main.sass \ - src/sass/_code-highlighting.scss \ + src/sass/_code-highlighting.sass \ src/sass/_fonts.sass \ src/sass/_icons.sass diff --git a/src/sass/_code-highlighting.sass b/src/sass/_code-highlighting.sass new file mode 100644 index 00000000..ec5b905a --- /dev/null +++ b/src/sass/_code-highlighting.sass @@ -0,0 +1,101 @@ +.codehilite + .hll + background-color: #ffffcc + + /* + Comment, Comment.Hashbang, Comment.Multiline, Comment.PreprocFile, + Comment.Single, Comment.Special, Comment.Preproc + */ + .c, .ch, .cm, .cpf, .c1, .cs, .ch, .cp + color: $gray-400 + font-style: italic + + /* Error */ + .err + border: 1px solid $red + + /* Keyword */ + .k, .kp, .kr, .kt + color: $green + + /* Keyword.Constant */ + .kc + color: $cyan + + /* Keyword.Declaration */ + .kd + color: $blue + + /* Keyword.Namespace */ + .kn + color: $orange + + /* + Literal.Number, Literal.Number.* + */ + .m, .mb, .mf, .mh, .mi, .mo, .il + color: $cyan + + /* Literal.String, Literal.String.* */ + .s, .sa, .sb, .sc, .dl, .s1, .s2, .sh + color: $cyan + + /* Literal.String.Doc */ + .sd + color: $red + font-style: italic + + /* Literal.String.Escape */ + .se + color: $yellow + font-weight: bold + + /* Literal.String.Interpol */ + .si + color: $yellow + font-weight: bold + + /* Literal.String.Other */ + .sx + color: $cyan + + /* Literal.String.Regex */ + .sr + color: $cyan + + /* Literal.String.Symbol */ + .ss + color: $cyan + + /* Name.Builtin */ + .nb + color: $red + + /* Name.Builtin.Pseudo */ + .bp + color: $blue + + /* Name.Class */ + .nc + color: $blue + + /* Name.Decorator */ + .nd + color: $blue + + /* Name.Entity */ + .ni + color: $purple + + /* Name.Exception */ + .ne + color: $yellow + + /* Name.Function */ + .nf + color: $blue + + /* Operator.Word */ + .ow + color: $green + font-weight: bold diff --git a/src/sass/_code-highlighting.scss b/src/sass/_code-highlighting.scss deleted file mode 100644 index feaf754a..00000000 --- a/src/sass/_code-highlighting.scss +++ /dev/null @@ -1,125 +0,0 @@ -.codehilite { - .hll { - background-color: #ffffcc; - } - - /* - Comment, Comment.Hashbang, Comment.Multiline, Comment.PreprocFile, - Comment.Single, Comment.Special, Comment.Preproc - */ - .c, .ch, .cm, .cpf, .c1, .cs, .ch, .cp { - color: $gray-400; - font-style: italic; - } - - /* Error */ - .err { - border: 1px solid $red; - } - - /* Keyword */ - .k, .kp, .kr, .kt { - color: $green; - } - - /* Keyword.Constant */ - .kc { - color: $cyan; - } - - /* Keyword.Declaration */ - .kd { - color: $blue; - } - - /* Keyword.Namespace */ - .kn { - color: $orange; - } - - /* - Literal.Number, Literal.Number.* - */ - .m, .mb, .mf, .mh, .mi, .mo, .il { - color: $cyan; - } - - /* Literal.String, Literal.String.* */ - .s, .sa, .sb, .sc, .dl, .s1, .s2, .sh, { - color: $cyan; - } - - /* Literal.String.Doc */ - .sd { - color: $red; - font-style: italic; - } - - /* Literal.String.Escape */ - .se { - color: $yellow; - font-weight: bold; - } - - /* Literal.String.Interpol */ - .si { - color: $yellow; - font-weight: bold; - } - - /* Literal.String.Other */ - .sx { - color: $cyan; - } - - /* Literal.String.Regex */ - .sr { - color: $cyan; - } - - /* Literal.String.Symbol */ - .ss { - color: $cyan; - } - - /* Name.Builtin */ - .nb { - color: $red; - } - - /* Name.Builtin.Pseudo */ - .bp { - color: $blue; - } - - /* Name.Class */ - .nc { - color: $blue; - } - - /* Name.Decorator */ - .nd { - color: $blue; - } - - /* Name.Entity */ - .ni { - color: $purple; - } - - /* Name.Exception */ - .ne { - color: $yellow; - } - - /* Name.Function */ - .nf { - color: $blue; - } - - /* Operator.Word */ - .ow { - color: $green; - font-weight: bold; - } -}