Skip to content

Commit f4b9eaf

Browse files
committed
config using tailwindcss
1 parent e030558 commit f4b9eaf

File tree

4 files changed

+84
-116
lines changed

4 files changed

+84
-116
lines changed
Lines changed: 79 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -1,143 +1,111 @@
11
/* Content from https://github.com/primer/codemirror-github-light/blob/master/lib/codemirror-github-light-theme.css */
22

33
/* 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 {
4+
[data-color-mode="light"][data-light-theme="dark"],
5+
[data-color-mode="dark"][data-dark-theme="dark"] {
6+
--color-codemirror-syntax-string: theme(colors.yellow) #{!important};
7+
--color-codemirror-syntax-keyword: theme(colors.pink) #{!important};
8+
--color-codemirror-syntax-variable: theme(colors.fg) #{!important};
9+
--color-codemirror-syntax-storage: theme(colors.pink) #{!important};
10+
--color-codemirror-syntax-entity: theme(colors.green) #{!important};
11+
--color-codemirror-syntax-constant: theme(colors.green) #{!important};
12+
--color-codemirror-syntax-comment: theme(colors.gray) #{!important};
13+
--color-codemirror-syntax-support: theme(colors.aqua) #{!important};
14+
--color-codemirror-matchingbracket-text: theme(colors.pink) #{!important};
15+
--color-codemirror-text: theme(colors.fg) #{!important};
16+
--color-codemirror-cursor: theme(colors.aqua) #{!important};
17+
}
18+
19+
.cm {
20+
&-line {
2321
@apply text-fg #{!important};
2422
}
2523

26-
&-cursor {
27-
@apply border-l border-solid border-fg #{!important};
24+
&-comment {
25+
@apply text-gray #{!important};
2826
}
2927

30-
&-focused &-selected,
31-
&-line::selection,
32-
&-line > span::selection,
33-
&-line > span > span::selection {
34-
@apply bg-aqua #{!important};
28+
&-constant {
29+
@apply text-green #{!important};
3530
}
3631

37-
&-line::-moz-selection,
38-
&-line > span::-moz-selection,
39-
&-line > span > span::-moz-selection {
40-
background: var(--color-one-monokai-aqua, #d7d4f0) !important;
32+
&-entity {
33+
@apply text-aqua #{!important};
4134
}
4235

43-
&-activeline-background {
44-
background: var(--one-monokai-dark-gray) !important;
36+
&-keyword {
37+
@apply text-pink #{!important};
4538
}
4639

47-
&-matchingbracket {
48-
font-weight: bold;
49-
text-decoration: none !important;
50-
color: var(--color-one-monokai-dark-gray) !important;
40+
&-storage {
41+
@apply text-pink #{!important};
5142
}
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-
}
6943

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-
}
44+
&-string {
45+
@apply text-yellow #{!important};
46+
}
7747

78-
.cm-support {
79-
font-weight: normal;
80-
font-style: normal;
81-
text-decoration: none;
82-
color: var(--color-codemirror-syntax-support);
83-
}
48+
&-support {
49+
@apply font-normal not-italic text-[var(--color-codemirror-syntax-support)] no-underline #{!important};
50+
}
8451

85-
.cm-variable {
86-
color: var(--color-one-monokai-fg) !important;
87-
}
52+
&-variable {
53+
@apply text-fg #{!important};
54+
}
8855

89-
.cm-builtin {
90-
color: var(--color-one-monokai-green);
91-
}
56+
&-builtin {
57+
@apply text-green #{!important};
58+
}
9259

93-
.cm-number {
94-
color: var(--color-one-monokai-purple) !important;
95-
}
60+
&-number {
61+
@apply text-purple #{!important};
62+
}
9663

97-
.cm-tag {
98-
color: var(--color-one-monokai-pink);
99-
}
64+
&-tag {
65+
@apply text-pink #{!important};
66+
}
10067

101-
.cm-attribute {
102-
color: var(--color-one-monokai-green);
103-
}
68+
&-attribute {
69+
@apply text-green #{!important};
70+
}
10471

105-
.cm-bracket {
106-
color: var(--color-one-monokai-pink);
107-
}
72+
&-bracket {
73+
@apply text-pink #{!important};
74+
}
10875

109-
.cm-image-marker {
110-
color: var(--color-one-monokai-pink);
111-
}
76+
&-image-marker {
77+
@apply text-pink #{!important};
78+
}
11279

113-
.cm-link {
114-
color: var(--color-one-monokai-aqua) !important;
115-
}
80+
&-link {
81+
@apply text-aqua #{!important};
82+
}
11683

117-
.cm-header {
118-
color: var(--color-one-monokai-yellow) !important;
119-
}
84+
&-header {
85+
@apply text-yellow #{!important};
86+
}
12087

121-
.cm-atom {
122-
color: var(--color-one-monokai-pink) !important;
123-
}
88+
&-atom {
89+
@apply text-pink #{!important};
90+
}
12491

125-
.cm-property {
126-
color: var(--color-one-monokai-aqua);
127-
}
92+
&-property {
93+
@apply text-aqua #{!important};
94+
}
12895

129-
.cm-punctuation,
130-
.CodeMirror .cm-operator {
131-
color: var(--color-one-monokai-pink);
132-
}
96+
&-punctuation,
97+
.CodeMirror &-operator {
98+
@apply text-pink #{!important};
99+
}
133100

134-
.cm-meta {
135-
color: var(--color-one-monokai-pink);
136-
}
101+
&-meta {
102+
@apply text-pink #{!important};
103+
}
137104

138-
.cm-def,
139-
.cm-variable-2,
140-
.cm-variable-3,
141-
.cm-qualifier {
142-
color: var(--color-one-monokai-green);
105+
&-def,
106+
&-variable-2,
107+
&-variable-3,
108+
&-qualifier {
109+
@apply text-green #{!important};
110+
}
143111
}

GitHub One Monokai Extension/Resources/one-monokai-prettylights.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[data-color-mode="light"][data-light-theme="dark"],
44
[data-color-mode="dark"][data-dark-theme="dark"] {
5-
--color-fg-default: #abb2bf #{!important};
5+
--color-fg-default: theme(colors.fg) #{!important};
66
}
77

88
.pl {

GitHub One Monokai.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
585335EC2982F763005C4170 /* images in Resources */ = {isa = PBXBuildFile; fileRef = 585335EB2982F763005C4170 /* images */; };
2222
585335EE2982F763005C4170 /* manifest.json in Resources */ = {isa = PBXBuildFile; fileRef = 585335ED2982F763005C4170 /* manifest.json */; };
2323
58C8BF242A5598BB0083C78F /* one-monokai-prettylights.css in Resources */ = {isa = PBXBuildFile; fileRef = 58C8BF232A5598BB0083C78F /* one-monokai-prettylights.css */; };
24-
58C8BF262A5598D20083C78F /* one-monokai-codemirror.css in Resources */ = {isa = PBXBuildFile; fileRef = 58C8BF252A5598D20083C78F /* one-monokai-codemirror.css */; };
24+
58C8BF282A55C7B80083C78F /* one-monokai-codemirror.css in Resources */ = {isa = PBXBuildFile; fileRef = 58C8BF272A55C7B80083C78F /* one-monokai-codemirror.css */; };
2525
/* End PBXBuildFile section */
2626

2727
/* Begin PBXContainerItemProxy section */
@@ -68,7 +68,7 @@
6868
585335F92982F763005C4170 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6969
585335FA2982F763005C4170 /* GitHub One Monokai_Extension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "GitHub One Monokai_Extension.entitlements"; sourceTree = "<group>"; };
7070
58C8BF232A5598BB0083C78F /* one-monokai-prettylights.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = "one-monokai-prettylights.css"; sourceTree = "<group>"; };
71-
58C8BF252A5598D20083C78F /* one-monokai-codemirror.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = "one-monokai-codemirror.css"; sourceTree = "<group>"; };
71+
58C8BF272A55C7B80083C78F /* one-monokai-codemirror.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = "one-monokai-codemirror.css"; sourceTree = "<group>"; };
7272
/* End PBXFileReference section */
7373

7474
/* Begin PBXFrameworksBuildPhase section */
@@ -149,7 +149,7 @@
149149
585335E92982F763005C4170 /* _locales */,
150150
585335EB2982F763005C4170 /* images */,
151151
585335ED2982F763005C4170 /* manifest.json */,
152-
58C8BF252A5598D20083C78F /* one-monokai-codemirror.css */,
152+
58C8BF272A55C7B80083C78F /* one-monokai-codemirror.css */,
153153
58C8BF232A5598BB0083C78F /* one-monokai-prettylights.css */,
154154
);
155155
path = Resources;
@@ -252,7 +252,7 @@
252252
585335EC2982F763005C4170 /* images in Resources */,
253253
585335EE2982F763005C4170 /* manifest.json in Resources */,
254254
58C8BF242A5598BB0083C78F /* one-monokai-prettylights.css in Resources */,
255-
58C8BF262A5598D20083C78F /* one-monokai-codemirror.css in Resources */,
255+
58C8BF282A55C7B80083C78F /* one-monokai-codemirror.css in Resources */,
256256
585335EA2982F763005C4170 /* _locales in Resources */,
257257
);
258258
runOnlyForDeploymentPostprocessing = 0;

0 commit comments

Comments
 (0)