@@ -75,3 +75,55 @@ table {
7575div [data-component-part = "callout-content" ]> .code-block : last-child {
7676 margin-bottom : 0 ;
7777}
78+
79+ /*
80+ A temporary solution syntax highlighting of Tolk snippets: invoke Prism.js on a client-side.
81+ See `snippets/tolk-highlight.jsx`.
82+ */
83+
84+ : root {
85+ --tolk-token-comment : # 808080 ;
86+ --tolk-token-type-hint : # D500EC ;
87+ --tolk-token-keyword : # 0000FF ;
88+ --tolk-token-struct : # 007EA2 ;
89+ --tolk-token-variable : # 444444 ;
90+ --tolk-token-attr-name : # 808000 ;
91+ --tolk-token-function : # A82D2D ;
92+ --tolk-token-number : # 0B9000 ;
93+ --tolk-token-string : # 008000 ;
94+ --tolk-token-string-bg : # FAF9EF ;
95+ --tolk-token-operator : # A0A000 ;
96+ --tolk-token-punctuation : # 808000 ;
97+ --tolk-token-three-dots : # 999999 ;
98+ }
99+
100+ .token .comment { color : var (--tolk-token-comment ); font-style : italic; }
101+ .token .type-hint { color : var (--tolk-token-type-hint ); }
102+ .token .boolean { color : var (--tolk-token-keyword ); }
103+ .token .keyword { color : var (--tolk-token-keyword ); }
104+ .token .self { color : var (--tolk-token-variable ); font-weight : bold; }
105+ .token .attr-name { color : var (--tolk-token-attr-name ); }
106+ .token .function { color : var (--tolk-token-function ); }
107+ .token .number { color : var (--tolk-token-number ); }
108+ .token .string { color : var (--tolk-token-string ); background-color : var (--tolk-token-string-bg ); }
109+ .token .operator { color : var (--tolk-token-operator ); }
110+ .token .punctuation { color : var (--tolk-token-punctuation ); }
111+ .token .three-dots { color : var (--tolk-token-three-dots ); }
112+ .token .struct { color : var (--tolk-token-struct ); }
113+ .token .variable { color : var (--tolk-token-variable ); }
114+
115+ html .dark {
116+ --tolk-token-comment : # 808080 ;
117+ --tolk-token-type-hint : # DF90F8 ;
118+ --tolk-token-keyword : # D75F02 ;
119+ --tolk-token-struct : # 56C1FF ;
120+ --tolk-token-variable : # C5D2E0 ;
121+ --tolk-token-attr-name : # 808000 ;
122+ --tolk-token-function : # F9B900 ;
123+ --tolk-token-number : # 33A033 ;
124+ --tolk-token-string : # 33A033 ;
125+ --tolk-token-string-bg : # 1B1C1E ;
126+ --tolk-token-operator : # A0A000 ;
127+ --tolk-token-punctuation : # 85B2A0 ;
128+ --tolk-token-three-dots : # 777777 ;
129+ }
0 commit comments