Skip to content

Commit c949a75

Browse files
committed
fix sass differences
1 parent 9db5ce2 commit c949a75

9 files changed

+29
-24
lines changed

Diff for: app/styles/base/_forms.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
fieldset {
22
background-color: lighten($base-border-color, 10%);
33
border: $base-border;
4-
margin: 0 0 $small-spacing;
4+
margin: 0 0 var(--small-spacing);
55
padding: $base-spacing;
66
}
77

@@ -28,7 +28,7 @@ select {
2828

2929
label {
3030
font-weight: 600;
31-
margin-bottom: calc($small-spacing / 2);
31+
margin-bottom: calc(--sass-small-spacing / 2);
3232

3333
&.required::after {
3434
content: "*";
@@ -72,10 +72,10 @@ textarea {
7272
input[type="checkbox"],
7373
input[type="radio"] {
7474
display: inline;
75-
margin-right: calc($small-spacing / 2);
75+
margin-right: calc(--small-spacing / 2);
7676
}
7777

7878
input[type="file"] {
79-
padding-bottom: $small-spacing;
79+
padding-bottom: var(--small-spacing);
8080
width: 100%;
8181
}

Diff for: app/styles/base/_lists.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ol {
66

77
&%default-ul {
88
list-style-type: disc;
9-
margin-bottom: $small-spacing;
9+
margin-bottom: var(--small-spacing);
1010
padding-left: $base-spacing;
1111

1212
@media (max-width: $mobile-portrait-screen){
@@ -21,12 +21,12 @@ ol {
2121
> li {
2222
counter-increment: customlistcounter;
2323
clear: both;
24-
padding: $small-spacing 0 $small-spacing 2em;
24+
padding: var(--small-spacing) 0 var(--small-spacing) 2em;
2525
position: relative;
2626
z-index: 1;
2727

2828
&::before {
29-
@include position(absolute, ($small-spacing + 0.5em) null null 0);
29+
@include position(absolute, (var(--small-spacing) + 0.5em) null null 0);
3030
@include size(2em);
3131
content: counter(customlistcounter) " ";
3232
border: 2px solid $base-border-color;
@@ -47,11 +47,11 @@ ol {
4747
}
4848

4949
dl {
50-
margin-bottom: $small-spacing;
50+
margin-bottom: var(--small-spacing);
5151

5252
dt {
5353
font-weight: bold;
54-
margin-top: $small-spacing;
54+
margin-top: var(--small-spacing);
5555
}
5656

5757
dd {

Diff for: app/styles/base/_tables.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
table {
22
font-feature-settings: "kern", "liga", "tnum";
33
border-collapse: collapse;
4-
margin: $small-spacing 0;
4+
margin: var(--small-spacing) 0;
55
table-layout: fixed;
66
width: 100%;
77
position: relative;
@@ -23,7 +23,7 @@ td {
2323
}
2424

2525
th, td {
26-
padding: $small-spacing;
26+
padding: var(--small-spacing);
2727
}
2828

2929
tr,

Diff for: app/styles/base/_typography.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ h6 {
2020
font-family: $heading-font-family;
2121
font-size: $base-font-size;
2222
line-height: $heading-line-height;
23-
margin: 0 0 $small-spacing;
23+
margin: 0 0 var(--small-spacing);
2424
font-weight: bold;
2525

2626
code {
@@ -43,7 +43,7 @@ h2 {
4343
}
4444

4545
p {
46-
margin: 1.5em 0 $small-spacing;
46+
margin: 1.5em 0 var(--small-spacing);
4747
line-height: 1.5em;
4848
}
4949

Diff for: app/styles/base/_variables.scss

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@ $large-font-size: 1.5rem;
1313
$base-line-height: 1.5;
1414
$heading-line-height: 1.2;
1515

16+
:root {
17+
--base-line-height: 1.5;
18+
--base-spacing: calc(var(--base-line-height) * 1em);
19+
--small-spacing: calc(var(--base-spacing) / 2);
20+
}
21+
1622
// Spacing
1723
$base-spacing: $base-line-height * 1em;
18-
$small-spacing: calc($base-spacing / 2);
1924
$large-spacing: $base-spacing * 2;
2025
$top-spacing: $base-spacing * 3.333; // 80px
2126

Diff for: app/styles/components/_article.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
article {
2-
padding: $large-spacing $small-spacing;
2+
padding: $large-spacing var(--small-spacing);
33

44
@media (min-width: $medium-screen){
5-
padding: $small-spacing;
5+
padding: var(--small-spacing);
66
}
77

88
.edit-page {

Diff for: app/styles/components/_class-field-desc.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.chapter li {
2-
margin: $small-spacing 0;
2+
margin: var(--small-spacing) 0;
33

44
@media (max-width: $mobile-portrait-screen) {
55
margin: 0;

Diff for: app/styles/components/_highlight.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
font-family: $monospace-font-family;
66
font-size: 0.8em;
77
line-height: 1.5em;
8-
margin: $small-spacing 0 $large-spacing;
8+
margin: var(--small-spacing) 0 $large-spacing;
99
overflow: hidden;
1010
position: relative;
1111
font-variant-ligatures: none;
@@ -28,7 +28,7 @@
2828
}
2929
}
3030
}
31-
31+
3232
.scroller {
3333
overflow: auto;
3434
}

Diff for: app/styles/components/_sidebar.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
border-bottom: $base-border;
44
position: relative;
55
z-index: 1;
6-
padding: $small-spacing 0;
6+
padding: var(--small-spacing) 0;
77

88
@include media($large-screen-up) {
99
// fixed sidebar, full height
@@ -12,7 +12,7 @@
1212
width: 19em;
1313
border-bottom: 0;
1414
border-right: $base-border;
15-
padding: $small-spacing $base-spacing $base-spacing * 1.5;
15+
padding: var(--small-spacing) $base-spacing $base-spacing * 1.5;
1616

1717
&::before {
1818
@include position(absolute, 0 0 0 -100vw);
@@ -123,14 +123,14 @@ ol.toc-level-1 {
123123
font-size: $base-font-size * 0.9;
124124
transition: max-height 0.5s ease;
125125

126-
&.selected{
126+
&.selected{
127127
max-height: 3000px;
128128
}
129129

130130
&:not(.selected) {
131131
overflow: hidden;
132132
max-height: 0;
133-
}
133+
}
134134

135135
li {
136136
border-left: 3px solid transparent;
@@ -148,6 +148,6 @@ ol.toc-level-1 {
148148
}
149149

150150
a {
151-
padding-left: $small-spacing;
151+
padding-left: var(--small-spacing);
152152
}
153153
}

0 commit comments

Comments
 (0)