]> git.ipfire.org Git - ipfire.org.git/commitdiff
CSS: Convert _code-highlighting.scss to SASS
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 14 Mar 2023 11:24:46 +0000 (11:24 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 14 Mar 2023 11:24:46 +0000 (11:24 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/sass/_code-highlighting.sass [new file with mode: 0644]
src/sass/_code-highlighting.scss [deleted file]

index 094b7825df4efeac59230e19837534b285869c4a..352cc063652358685782f29c5647bb3f4b6f5aef 100644 (file)
@@ -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 (file)
index 0000000..ec5b905
--- /dev/null
@@ -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 (file)
index feaf754..0000000
+++ /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;
-       }
-}