Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit 8cfc994

Browse files
committed
add global
1 parent 87bd9d1 commit 8cfc994

3 files changed

Lines changed: 153 additions & 139 deletions

File tree

src/components/ThemeSwitcher.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
h1 {
7777
font-size: 4em;
7878
font-weight: lighter;
79-
line-height: 1;
79+
line-height: 60px;
8080
margin-top: 0.25em;
8181
margin-bottom: 0.25em;
8282
letter-spacing: 0.025em;

src/popup.svelte

Lines changed: 2 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -1,143 +1,7 @@
11
<script lang='ts'>
2-
import App from '~App.svelte';
2+
import './styles/global.scss';
33
import './styles/app.scss';
4+
import App from '~App.svelte';
45
</script>
56

6-
<style global lang='scss'>
7-
*,
8-
*::before,
9-
*::after {
10-
-webkit-touch-callout: none;
11-
-webkit-user-select: none;
12-
user-select: none;
13-
padding: 0;
14-
margin: 0;
15-
box-sizing: border-box;
16-
}
17-
18-
html,
19-
body {
20-
background: var(--bg, #263238);
21-
transition: all .5s;
22-
margin: 0;
23-
height: 100%;
24-
width: 100%;
25-
min-width: 720px;
26-
min-height: 600px;
27-
font-family: Roboto, -apple-system, BlinkMacSystemFont, Segoe UI, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
28-
font-size: 14px;
29-
line-height: 1.5;
30-
color: var(--fg);
31-
}
32-
33-
h1, h2, h3, h4, h5, h6 {
34-
margin: 0 0 0.5em 0;
35-
font-weight: 400;
36-
line-height: 1.2;
37-
}
38-
39-
h1 {
40-
font-size: 2em;
41-
}
42-
43-
a {
44-
color: var(--links);
45-
}
46-
47-
code {
48-
font-family: var(--font-family, menlo, inconsolata, monospace);
49-
font-size: var(--font-size, calc(1em - 2px));
50-
}
51-
52-
@media (min-width: 400px) {
53-
body {
54-
font-size: 16px;
55-
}
56-
}
57-
58-
*::-webkit-scrollbar {
59-
width: 6px;
60-
}
61-
62-
/* Track */
63-
*::-webkit-scrollbar-track {
64-
background: var(--bg);
65-
border-radius: 10px;
66-
}
67-
68-
/* Handle */
69-
*::-webkit-scrollbar-thumb {
70-
background: var(--accent);
71-
border-radius: 10px;
72-
}
73-
74-
/* Handle on hover */
75-
*::-webkit-scrollbar-thumb:hover {
76-
background: var(--accent);
77-
}
78-
79-
input {
80-
background-color: var(--contrast);
81-
color: var(--text);
82-
transition: all .5s;
83-
}
84-
85-
.comment {
86-
color: var(--comments);
87-
transition: color .5s;
88-
}
89-
90-
.keyword {
91-
color: var(--keywords);
92-
transition: color .5s;
93-
}
94-
95-
.function {
96-
color: var(--functions);
97-
transition: color .5s;
98-
}
99-
100-
.punctuation {
101-
color: var(--operators);
102-
transition: color .5s;
103-
}
104-
105-
.string,
106-
.attr-value {
107-
color: var(--strings);
108-
transition: color .5s;
109-
}
110-
111-
.parameter {
112-
color: var(--parameters);
113-
transition: color .5s;
114-
}
115-
116-
.number {
117-
color: var(--numbers);
118-
transition: color .5s;
119-
}
120-
121-
.attr-name {
122-
color: var(--attributes);
123-
transition: color .5s;
124-
}
125-
126-
.tag {
127-
color: var(--tags);
128-
transition: color .5s;
129-
}
130-
131-
#__plasmo {
132-
width: 100vw;
133-
height: 100vh;
134-
position: relative;
135-
display: flex;
136-
flex-direction: column;
137-
justify-content: flex-start;
138-
align-items: center;
139-
overflow-x: hidden;
140-
}
141-
</style>
142-
1437
<App />

src/styles/global.scss

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
*,
2+
*::before,
3+
*::after {
4+
-webkit-touch-callout: none;
5+
-webkit-user-select: none;
6+
user-select: none;
7+
padding: 0;
8+
margin: 0;
9+
box-sizing: border-box;
10+
}
11+
12+
html,
13+
body {
14+
background: var(--bg, #263238);
15+
transition: all 0.5s;
16+
margin: 0;
17+
height: 100%;
18+
width: 100%;
19+
min-width: 720px;
20+
min-height: 600px;
21+
font-family:
22+
Roboto,
23+
-apple-system,
24+
BlinkMacSystemFont,
25+
Segoe UI,
26+
Oxygen,
27+
Ubuntu,
28+
Cantarell,
29+
Fira Sans,
30+
Droid Sans,
31+
Helvetica Neue,
32+
sans-serif;
33+
font-size: 14px;
34+
line-height: 1.5;
35+
color: var(--fg);
36+
}
37+
38+
h1,
39+
h2,
40+
h3,
41+
h4,
42+
h5,
43+
h6 {
44+
margin: 0 0 0.5em 0;
45+
font-weight: 400;
46+
line-height: 1.2;
47+
}
48+
49+
h1 {
50+
font-size: 2em;
51+
}
52+
53+
a {
54+
color: var(--links);
55+
}
56+
57+
code {
58+
font-family: var(--font-family, menlo, inconsolata, monospace);
59+
font-size: var(--font-size, calc(1em - 2px));
60+
}
61+
62+
@media (min-width: 400px) {
63+
body {
64+
font-size: 16px;
65+
}
66+
}
67+
68+
*::-webkit-scrollbar {
69+
width: 6px;
70+
}
71+
72+
/* Track */
73+
*::-webkit-scrollbar-track {
74+
background: var(--bg);
75+
border-radius: 10px;
76+
}
77+
78+
/* Handle */
79+
*::-webkit-scrollbar-thumb {
80+
background: var(--accent);
81+
border-radius: 10px;
82+
}
83+
84+
/* Handle on hover */
85+
*::-webkit-scrollbar-thumb:hover {
86+
background: var(--accent);
87+
}
88+
89+
input {
90+
background-color: var(--contrast);
91+
color: var(--text);
92+
transition: all 0.5s;
93+
}
94+
95+
.comment {
96+
color: var(--comments);
97+
transition: color 0.5s;
98+
}
99+
100+
.keyword {
101+
color: var(--keywords);
102+
transition: color 0.5s;
103+
}
104+
105+
.function {
106+
color: var(--functions);
107+
transition: color 0.5s;
108+
}
109+
110+
.punctuation {
111+
color: var(--operators);
112+
transition: color 0.5s;
113+
}
114+
115+
.string,
116+
.attr-value {
117+
color: var(--strings);
118+
transition: color 0.5s;
119+
}
120+
121+
.parameter {
122+
color: var(--parameters);
123+
transition: color 0.5s;
124+
}
125+
126+
.number {
127+
color: var(--numbers);
128+
transition: color 0.5s;
129+
}
130+
131+
.attr-name {
132+
color: var(--attributes);
133+
transition: color 0.5s;
134+
}
135+
136+
.tag {
137+
color: var(--tags);
138+
transition: color 0.5s;
139+
}
140+
141+
#__plasmo {
142+
width: 100vw;
143+
height: 100vh;
144+
position: relative;
145+
display: flex;
146+
flex-direction: column;
147+
justify-content: flex-start;
148+
align-items: center;
149+
overflow-x: hidden;
150+
}

0 commit comments

Comments
 (0)