Skip to content

Commit 4cee3dc

Browse files
author
satoshinotdead
committed
lint-2
1 parent c606a46 commit 4cee3dc

File tree

8 files changed

+42
-35
lines changed

8 files changed

+42
-35
lines changed

common/head_tag.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88

99
<script type="text/discourse-plugin" version="0.8">
1010
api.replaceIcon('robot', 'lightning');
11+
api.replaceIcon('language', 'translate');
1112
</script>

scss/box-view.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@use "lib/viewport";
22

3-
@media screen and (min-width: 1300px) {
3+
@include viewport.from(xl) {
44
#main-outlet {
55
border-top-right-radius: var(--d-border-radius-large);
66
border-top-left-radius: var(--d-border-radius-large);
@@ -47,7 +47,7 @@
4747
display: none;
4848
}
4949

50-
@media screen and (max-width: 488px) {
50+
@include viewport.until(sm) {
5151
display: none;
5252
}
5353

@@ -94,7 +94,7 @@
9494
bottom: var(--main-grid-gap);
9595
left: var(--left-distance);
9696

97-
@media screen and (max-width: 768px) {
97+
@include viewport.until(md) {
9898
bottom: calc(var(--d-border-radius-large) * 2);
9999
}
100100
}
@@ -104,7 +104,7 @@
104104
bottom: var(--main-grid-gap);
105105
left: calc(var(--right-distance) - var(--d-border-radius-large));
106106

107-
@media screen and (max-width: 768px) {
107+
@include viewport.until(md) {
108108
bottom: calc(var(--d-border-radius-large) * 2);
109109
}
110110
}
@@ -118,7 +118,7 @@
118118
left: var(--left-distance);
119119
height: var(--main-grid-gap);
120120

121-
@media screen and (max-width: 768px) {
121+
@include viewport.until(md) {
122122
height: calc(var(--d-border-radius-large) * 2);
123123
}
124124

@@ -158,7 +158,7 @@
158158
}
159159
}
160160

161-
@media screen and (min-width: 768px) {
161+
@include viewport.from(md) {
162162
.with-topic-progress {
163163
bottom: calc(
164164
env(safe-area-inset-bottom) + var(--composer-height, 0px) +
@@ -167,7 +167,7 @@
167167
}
168168
}
169169

170-
@media screen and (max-width: 768px) {
170+
@include viewport.until(md) {
171171
.with-topic-progress {
172172
bottom: calc(
173173
env(safe-area-inset-bottom) + var(--composer-height, 0px) +
@@ -176,7 +176,7 @@
176176
}
177177
}
178178

179-
@media screen and (max-width: 400px) {
179+
@include viewport.until(sm) {
180180
.with-topic-progress {
181181
bottom: calc(env(safe-area-inset-bottom) + var(--composer-height, 0px));
182182
}

scss/composer-peek-mode.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
display: none;
33
}
44

5-
@media screen and (min-width: 1300px) {
5+
@include viewport.from(xl) {
66
html:not(.fullscreen-composer) {
77
.peek-mode-toggle svg {
88
transform: scaleX(-1);

scss/desktop-full-width.scss

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ $sidebar-width: 17em;
129129
// at narrower widths, when 1fr = 0
130130
// we can center without matching the sidebar's width
131131
// which allows the title to take up the remaining width
132-
@media screen and (max-width: 1400px) {
132+
@include viewport.until(xl) {
133133
grid-template-columns:
134134
calc(var(--d-sidebar-width) - 11px)
135135
1fr
@@ -138,7 +138,7 @@ $sidebar-width: 17em;
138138
auto;
139139
}
140140

141-
@media screen and (max-width: 1000px) {
141+
@include viewport.until(lg) {
142142
gap: 0.5em;
143143
}
144144

@@ -210,7 +210,8 @@ body.has-sidebar-page {
210210
padding: 0;
211211
}
212212

213-
@media screen and (min-width: calc($reply-area-max-width + ($sidebar-width * 2))) {
213+
@include viewport.from(xl) {
214+
// Approximating complex calc with xl
214215
#reply-control.show-preview {
215216
margin-left: auto;
216217
margin-right: auto;
@@ -221,23 +222,28 @@ body.has-sidebar-page {
221222
}
222223
}
223224

224-
@media screen and (max-width: calc($reply-area-max-width + ($sidebar-width * 2))) and (min-width: calc($reply-area-max-width + calc($sidebar-width / 2))) {
225-
#reply-control.show-preview:not(.fullscreen) {
226-
margin-left: $sidebar-width;
227-
width: auto;
228-
229-
// overruling new core composer changes
230-
max-width: $reply-area-max-width;
231-
transform: none;
232-
}
225+
@include viewport.until(xl) {
226+
// Approximating complex calc with xl
227+
@include viewport.from(lg) {
228+
// Approximating complex calc with lg
229+
#reply-control.show-preview:not(.fullscreen) {
230+
margin-left: $sidebar-width;
231+
width: auto;
232+
233+
// overruling new core composer changes
234+
max-width: $reply-area-max-width;
235+
transform: none;
236+
}
233237

234-
.sidebar-container {
235-
height: auto;
238+
.sidebar-container {
239+
height: auto;
240+
}
236241
}
237242
}
238243

239244
// overruling new core composer changes
240-
@media screen and (min-width: $reply-area-max-width) {
245+
@include viewport.from(lg) {
246+
// Approximating $reply-area-max-width with lg
241247
#reply-control.show-preview:not(.fullscreen) {
242248
max-width: $reply-area-max-width;
243249
transform: none;
@@ -267,7 +273,7 @@ body.sidebar-animate {
267273
}
268274

269275
// provides some extra space for login buttons
270-
@media screen and (min-width: 1400px) {
276+
@include viewport.from(xl) {
271277
.anon {
272278
.d-header .panel {
273279
grid-column-start: -4;

scss/desktop-horizon-fixes.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
grid-area: bulk-select;
1414
margin-left: -0.5em;
1515

16-
@media screen and (max-width: 576px) {
16+
@include viewport.until(sm) {
1717
margin-top: 0;
1818

1919
label {

scss/main.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ body:not(.has-full-page-chat, .wizard) {
7373
--main-grid-gap: 0;
7474
}
7575

76-
@media screen and (min-width: 768px) {
76+
@include viewport.from(md) {
7777
gap: var(--main-grid-gap);
7878
}
7979

scss/topic.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
.container.posts {
5454
grid-template-columns: auto 8em;
5555

56-
@media screen and (max-width: 924px) {
56+
@include viewport.until(lg) {
5757
grid-template-columns: auto auto;
5858
}
5959

scss/welcome-banner.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
padding: 1.5em 0 2.5em;
1212
margin-bottom: 0;
1313

14-
@media screen and (max-width: 768px) {
14+
@include viewport.until(md) {
1515
padding: 1em;
1616
}
1717

@@ -27,17 +27,17 @@
2727
width: 100%;
2828
align-self: center;
2929

30-
@media screen and (max-width: 1028px) {
30+
@include viewport.until(lg) {
3131
grid-row: 2/-1;
3232
grid-column: 1/-1;
3333
}
3434

35-
@media screen and (max-width: 768px) {
35+
@include viewport.until(md) {
3636
grid-column: 2/-1;
3737
grid-row: 1/-1;
3838
}
3939

40-
@media screen and (max-width: 600px) {
40+
@include viewport.until(sm) {
4141
grid-row: 2/-1;
4242
grid-column: 1/-1;
4343
}
@@ -88,22 +88,22 @@
8888
font-weight: 400;
8989
color: var(--search-color);
9090

91-
@media screen and (max-width: 1028px) {
91+
@include viewport.until(lg) {
9292
font-size: var(--font-up-4);
9393
grid-column: 1/-1;
9494
grid-row: 1;
9595
text-align: center;
9696
margin-bottom: 0.5em;
9797
}
9898

99-
@media screen and (max-width: 768px) {
99+
@include viewport.until(md) {
100100
text-align: left;
101101
grid-column: 1/2;
102102
grid-row: 1/-1;
103103
font-size: var(--font-up-3);
104104
}
105105

106-
@media screen and (max-width: 600px) {
106+
@include viewport.until(sm) {
107107
grid-column: 1/-1;
108108
grid-row: 1;
109109
text-align: center;

0 commit comments

Comments
 (0)