Skip to content

Commit 544c825

Browse files
committed
convert to scss
1 parent 20b9956 commit 544c825

File tree

14 files changed

+360
-346
lines changed

14 files changed

+360
-346
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
node_modules
33
/build
44
*.config.js
5+
*.css*

.stylelintrc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
extends:
22
- stylelint-config-recommended-scss
33
rules:
4+
at-rule-no-unknown: null
45
scss/at-rule-no-unknown: [true, { ignoreAtRules: ["tailwind"] }]
Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
{
22
"manifest_version": 3,
33
"default_locale": "en",
4-
54
"name": "__MSG_extension_name__",
65
"description": "__MSG_extension_description__",
76
"version": "1.0",
8-
97
"icons": {
108
"48": "images/icon-48.png",
119
"96": "images/icon-96.png",
1210
"128": "images/icon-128.png",
1311
"256": "images/icon-256.png",
1412
"512": "images/icon-512.png"
1513
},
16-
17-
"content_scripts": [{
18-
"css": [ "syntax-one-monokai-prettylights.css", "syntax-one-monokai-codemirror.css" ],
19-
"matches": [ "https://github.com/*", "https://*.github.com/*" ]
20-
}],
21-
14+
"content_scripts": [
15+
{
16+
"css": [
17+
"one-monokai-prettylights.css",
18+
"one-monokai-codemirror.css"
19+
],
20+
"matches": [
21+
"https://github.com/*",
22+
"https://*.github.com/*"
23+
]
24+
}
25+
],
2226
"action": {
2327
"default_icon": {
2428
"16": "images/toolbar-icon-16.png",
@@ -29,6 +33,5 @@
2933
"72": "images/toolbar-icon-72.png"
3034
}
3135
},
32-
33-
"permissions": [ ]
36+
"permissions": []
3437
}
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
/* Content from https://github.com/primer/codemirror-github-light/blob/master/lib/codemirror-github-light-theme.css */
2+
3+
/* Currently there is no such documentation about what type and token on these classes */
4+
:root {
5+
--color-one-monokai-fg: #abb2bf;
6+
--color-one-monokai-gray: #676e7b;
7+
--color-one-monokai-pink: #e06c75;
8+
--color-one-monokai-green: #98c379;
9+
--color-one-monokai-cyan: #56b6c2;
10+
--color-one-monokai-aqua: #61afef;
11+
--color-one-monokai-yellow: #e5c07b;
12+
--color-one-monokai-purple: #c678dd;
13+
--color-one-monokai-orange: #d19a66;
14+
--color-one-monokai-red: #f75f5f;
15+
--color-one-monokai-dark-gray: #4b5261;
16+
--color-one-monokai-white: #d7d7ff;
17+
}
18+
19+
.CodeMirror {
20+
@apply text-fg #{!important};
21+
22+
&-linenumber {
23+
@apply text-fg #{!important};
24+
}
25+
26+
&-cursor {
27+
@apply border-l border-solid border-fg #{!important};
28+
}
29+
30+
&-focused &-selected,
31+
&-line::selection,
32+
&-line > span::selection,
33+
&-line > span > span::selection {
34+
@apply bg-aqua #{!important};
35+
}
36+
37+
&-line::-moz-selection,
38+
&-line > span::-moz-selection,
39+
&-line > span > span::-moz-selection {
40+
background: var(--color-one-monokai-aqua, #d7d4f0) !important;
41+
}
42+
43+
&-activeline-background {
44+
background: var(--one-monokai-dark-gray) !important;
45+
}
46+
47+
&-matchingbracket {
48+
font-weight: bold;
49+
text-decoration: none !important;
50+
color: var(--color-one-monokai-dark-gray) !important;
51+
}
52+
}
53+
54+
.cm-comment {
55+
color: var(--color-one-monokai-gray) !important;
56+
}
57+
58+
.cm-constant {
59+
color: var(--color-one-monokai-green) !important;
60+
}
61+
62+
.cm-entity {
63+
color: var(--color-one-monokai-aqua) !important;
64+
}
65+
66+
.cm-keyword {
67+
color: var(--color-one-monokai-pink) !important;
68+
}
69+
70+
.cm-storage {
71+
color: var(--color-codemirror-syntax-storage); // #d73a49;
72+
}
73+
74+
.cm-string {
75+
color: var(--color-one-monokai-yellow) !important;
76+
}
77+
78+
.cm-support {
79+
font-weight: normal;
80+
font-style: normal;
81+
text-decoration: none;
82+
color: var(--color-codemirror-syntax-support);
83+
}
84+
85+
.cm-variable {
86+
color: var(--color-one-monokai-fg) !important;
87+
}
88+
89+
.cm-builtin {
90+
color: var(--color-one-monokai-green);
91+
}
92+
93+
.cm-number {
94+
color: var(--color-one-monokai-purple) !important;
95+
}
96+
97+
.cm-tag {
98+
color: var(--color-one-monokai-pink);
99+
}
100+
101+
.cm-attribute {
102+
color: var(--color-one-monokai-green);
103+
}
104+
105+
.cm-bracket {
106+
color: var(--color-one-monokai-pink);
107+
}
108+
109+
.cm-image-marker {
110+
color: var(--color-one-monokai-pink);
111+
}
112+
113+
.cm-link {
114+
color: var(--color-one-monokai-aqua) !important;
115+
}
116+
117+
.cm-header {
118+
color: var(--color-one-monokai-yellow) !important;
119+
}
120+
121+
.cm-atom {
122+
color: var(--color-one-monokai-pink) !important;
123+
}
124+
125+
.cm-property {
126+
color: var(--color-one-monokai-aqua);
127+
}
128+
129+
.cm-punctuation,
130+
.CodeMirror .cm-operator {
131+
color: var(--color-one-monokai-pink);
132+
}
133+
134+
.cm-meta {
135+
color: var(--color-one-monokai-pink);
136+
}
137+
138+
.cm-def,
139+
.cm-variable-2,
140+
.cm-variable-3,
141+
.cm-qualifier {
142+
color: var(--color-one-monokai-green);
143+
}
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
/* Content from https://github.com/primer/github-syntax-dark/blob/master/lib/github-dark.css */
2+
3+
[data-color-mode="light"][data-light-theme="dark"],
4+
[data-color-mode="dark"][data-dark-theme="dark"] {
5+
--color-fg-default: #abb2bf #{!important};
6+
}
7+
8+
.pl {
9+
&-c /* comment, punctuation.definition.comment, string.comment */ {
10+
@apply text-gray #{!important};
11+
}
12+
13+
&-v /* variable */,
14+
&-smw /* sublimelinter.mark.warning */ {
15+
@apply text-fg #{!important};
16+
}
17+
18+
&-c1 /* constant, entity.name.constant, variable.other.constant, variable.language, support, meta.property-name, support.constant, support.variable, meta.module-reference, markup.raw, meta.diff.header, meta.output */,
19+
&-s &-v /* string variable */ {
20+
@apply text-green #{!important};
21+
}
22+
23+
&-e /* entity */,
24+
&-en /* entity.name */ {
25+
@apply text-green #{!important};
26+
}
27+
28+
&-s1 {
29+
@apply text-orange #{!important};
30+
}
31+
32+
&-smi /* variable.parameter.function, storage.modifier.package, storage.modifier.import, storage.type.java, variable.other */,
33+
&-s &-s1 /* string source */ {
34+
@apply text-cyan #{!important};
35+
}
36+
37+
&-ent /* entity.name.tag, markup.quote */ {
38+
@apply text-pink #{!important};
39+
}
40+
41+
&-k /* keyword, storage, storage.type */ {
42+
@apply text-pink #{!important};
43+
}
44+
45+
&-s /* string */,
46+
&-pds /* punctuation.definition.string, source.regexp, string.regexp.character-class */,
47+
&-s &-pse &-s1 /* string punctuation.section.embedded source */,
48+
&-sr /* string.regexp */,
49+
&-sr &-cce /* string.regexp constant.character.escape */,
50+
&-sr &-sre /* string.regexp source.ruby.embedded */,
51+
&-sr &-sra /* string.regexp string.regexp.arbitrary-repitition */ {
52+
@apply text-yellow #{!important};
53+
}
54+
55+
&-bu /* invalid.broken, invalid.deprecated, invalid.uni&emented, message.error, brackethighlighter.unmatched, sublimelinter.mark.error */ {
56+
@apply text-red #{!important};
57+
}
58+
59+
&-ii /* invalid.illegal */ {
60+
@apply bg-red text-white #{!important};
61+
}
62+
63+
&-c2 /* carriage-return */ {
64+
@apply bg-red text-white #{!important};
65+
}
66+
67+
&-c2::before /* carriage-return */ {
68+
content: "^M" #{!important};
69+
}
70+
71+
&-token:hover {
72+
@apply bg-darkGray #{!important};
73+
}
74+
75+
&-sr &-cce /* string.regexp constant.character.escape */ {
76+
@apply font-bold text-green #{!important};
77+
}
78+
79+
&-m {
80+
&l /* markup.list */ {
81+
@apply text-yellow #{!important};
82+
}
83+
84+
&h /* markup.heading */,
85+
&h &-en /* markup.heading entity.name */
86+
&i /* markup.italic */ {
87+
@apply text-black #{!important};
88+
}
89+
90+
&b /* markup.bold */ {
91+
@apply font-bold text-black #{!important};
92+
}
93+
94+
&d /* markup.deleted, meta.diff.header.from-file, punctuation.definition.deleted */ {
95+
@apply text-pink #{!important};
96+
}
97+
98+
&i1 /* markup.inserted, meta.diff.header.to-file, punctuation.definition.inserted */ {
99+
@apply text-green #{!important};
100+
}
101+
102+
&c /* markup.changed, punctuation.definition.changed */ {
103+
@apply text-yellow #{!important};
104+
}
105+
106+
&i2 /* markup.ignore, markup.untracked */ {
107+
@apply bg-aqua text-white #{!important};
108+
}
109+
110+
&s /* meta.separator */ {
111+
@apply font-bold text-yellow #{!important};
112+
}
113+
114+
&dr /* meta.diff.range */ {
115+
@apply font-bold text-purple #{!important};
116+
}
117+
}
118+
119+
&-ba /* brackethighlighter.tag, brackethighlighter.curly, brackethighlighter.round, brackethighlighter.square, brackethighlighter.angle, brackethighlighter.quote */ {
120+
@apply text-pink #{!important};
121+
}
122+
123+
&-sg /* sublimelinter.gutter-mark */ {
124+
@apply text-lightGray #{!important};
125+
}
126+
127+
&-corl /* constant.other.reference.link, string.other.link */ {
128+
@apply text-aqua underline #{!important};
129+
}
130+
131+
&-kos {
132+
@apply text-pink #{!important};
133+
}
134+
}

0 commit comments

Comments
 (0)