Skip to content

Commit 5a635e6

Browse files
authored
More css tweaks (#764)
* remove redundant style * various * prettier
1 parent 7d6fe75 commit 5a635e6

File tree

7 files changed

+15
-58
lines changed

7 files changed

+15
-58
lines changed

apps/svelte.dev/src/routes/docs/[...path]/OnThisPage.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,7 @@
9696
padding: 0.2rem 0 0 3rem;
9797
height: 3rem;
9898
text-transform: uppercase;
99-
color: var(--sk-fg-4);
100-
101-
&:hover {
102-
color: var(--sk-fg-3);
103-
}
99+
user-select: none;
104100
105101
&::before,
106102
&::after {
@@ -148,6 +144,10 @@
148144
color: var(--sk-fg-4);
149145
margin: 0;
150146
display: block;
147+
148+
&:hover {
149+
color: var(--sk-fg-3);
150+
}
151151
}
152152
}
153153

packages/repl/src/lib/Input/ComponentSelector.svelte

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@
223223
height: 100%;
224224
aspect-ratio: 1;
225225
margin: 0;
226-
color: var(--sk-fg-3);
227226
border-radius: 0;
228227
cursor: pointer;
229228
}
@@ -261,11 +260,6 @@
261260
line-height: 1;
262261
}
263262
264-
.input-sizer {
265-
display: flex;
266-
color: var(--sk-fg-3, #ccc);
267-
}
268-
269263
input {
270264
position: absolute;
271265
width: 100%;

packages/repl/src/lib/Output/CompilerOptions.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
display: block;
4949
padding: 0 0 0 1.25em;
5050
white-space: nowrap;
51-
color: var(--sk-fg-3);
5251
user-select: none;
5352
}
5453

packages/site-kit/src/lib/nav/MobileMenu.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@
265265
& :global(a) {
266266
position: relative;
267267
padding: 0.3rem 0;
268-
color: var(--sk-fg-3);
268+
color: inherit;
269269
font: var(--sk-font-ui-medium);
270270
width: 100%;
271271
height: 100%;

packages/site-kit/src/lib/nav/Nav.svelte

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Top navigation bar for the application. It provides a slot for the left side, th
212212
.current-section {
213213
display: flex;
214214
align-items: center;
215-
color: var(--sk-fg-3);
215+
color: inherit;
216216
margin-left: 0.4em;
217217
font: var(--sk-font-ui-medium);
218218
}
@@ -227,10 +227,6 @@ Top navigation bar for the application. It provides a slot for the left side, th
227227
}
228228
}
229229
230-
button {
231-
color: var(--sk-fg-3);
232-
}
233-
234230
.links {
235231
display: flex;
236232
width: 100%;

packages/site-kit/src/lib/search/Search.svelte

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Renders a search widget which when clicked (or the corresponding keyboard shortc
5555
position: relative;
5656
display: flex;
5757
align-items: center;
58-
width: 100%;
58+
width: 11rem;
5959
font-size: 1.4rem;
6060
}
6161
@@ -68,12 +68,11 @@ Renders a search widget which when clicked (or the corresponding keyboard shortc
6868
appearance: none;
6969
-webkit-appearance: none;
7070
width: 100%;
71-
height: 4.2rem;
72-
border-radius: 3.5rem;
71+
height: 3.4rem;
72+
border-radius: 5.6rem;
7373
background:
7474
no-repeat 0.6em 55% / 1.2em 1.2em url(../icons/search.svg),
7575
var(--sk-bg-4);
76-
color: var(--sk-fg-3);
7776
}
7877
7978
input:focus + .shortcut {
@@ -82,14 +81,14 @@ Renders a search widget which when clicked (or the corresponding keyboard shortc
8281
8382
input::placeholder {
8483
text-transform: lowercase;
85-
color: var(--sk-fg-3);
84+
color: var(--sk-fg-4);
85+
opacity: 0;
8686
}
8787
8888
.shortcut {
89-
color: var(--sk-fg-3);
9089
position: absolute;
9190
top: calc(50% - 0.9rem);
92-
right: 0;
91+
right: 1.6rem;
9392
width: 100%;
9493
text-align: right;
9594
pointer-events: none;
@@ -99,36 +98,11 @@ Renders a search widget which when clicked (or the corresponding keyboard shortc
9998
}
10099
101100
kbd {
102-
display: none;
103-
color: var(--sk-fg-3);
101+
color: var(--sk-fg-4);
104102
font-size: inherit;
105103
font-family: inherit;
106104
}
107105
108-
@media (min-width: 800px) {
109-
.search-container {
110-
width: 11rem;
111-
}
112-
113-
.shortcut {
114-
padding: 0 1.6rem 0 0;
115-
}
116-
117-
input {
118-
height: 3.4rem;
119-
border-radius: 5.6rem;
120-
}
121-
122-
input::placeholder {
123-
opacity: 0;
124-
}
125-
126-
/* we're using media query as an imperfect proxy for mobile/desktop */
127-
kbd {
128-
display: inline;
129-
}
130-
}
131-
132106
@media (min-width: 960px) {
133107
.search-container {
134108
width: 19rem;
@@ -138,10 +112,4 @@ Renders a search widget which when clicked (or the corresponding keyboard shortc
138112
opacity: 1;
139113
}
140114
}
141-
142-
@media (min-width: 1240px) {
143-
.search-container {
144-
width: 19rem;
145-
}
146-
}
147115
</style>

packages/site-kit/src/lib/styles/tokens/colours.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/* Foreground colours */
1212
--sk-fg-1: hsl(0, 0%, 5%); /* for headings, and (very sparingly) as a highlight colour */
1313
--sk-fg-2: hsl(0, 0%, 12%); /* most text should be this colour */
14-
--sk-fg-3: hsl(0, 0%, 27%); /* secondary text (e.g. figcaptions) */
14+
--sk-fg-3: hsl(0, 0%, 27%); /* secondary text (e.g. figcaptions) and icons */
1515
--sk-fg-4: hsl(0, 0%, 45%); /* faded text (disabled buttons, comments etc) */
1616
--sk-fg-accent: hsl(12, 93%, 43%);
1717

0 commit comments

Comments
 (0)