Skip to content

Commit cc67f86

Browse files
committed
add custom variables file and replace app.css vars
1 parent 69c528d commit cc67f86

File tree

2 files changed

+25
-29
lines changed

2 files changed

+25
-29
lines changed

resources/sass/app.scss

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
@import '~wikit-dist/wikit-vue-components-vue3compat.css';
55
@import "@wikimedia/codex/dist/codex.style.css";
66
@import "@wikimedia/codex-design-tokens/theme-wikimedia-ui";
7+
@import '../custom-variables.css';
78
@import './link.scss';
89
@import './_typography.scss';
910

@@ -22,49 +23,49 @@ body {
2223
*/
2324
main {
2425
max-width: 1090px;
25-
padding: 0 1rem;
26+
padding: 0 var(--dimension-layout-xsmall);
2627
margin: 0 auto;
2728

2829
& > header {
2930
display: flex;
3031
justify-content: space-between;
31-
margin: 1.500rem 0;
32+
margin: var(--dimension-layout-small) 0;
3233
}
3334

3435
@media(min-width: $min-width-breakpoint-tablet){
35-
padding: 0 1.500rem;
36+
padding: 0 var(--dimension-layout-small);
3637
}
3738
}
3839

3940
section {
40-
margin-bottom: 2.500rem;
41+
margin-bottom: var(--dimension-layout-large);
4142
}
4243

4344
h1, .h1 {
4445
@include heading-1;
4546

46-
margin: 1rem 0;
47+
margin: var(--dimension-layout-xsmall) 0;
4748

4849
@media (min-width: $min-width-breakpoint-tablet) {
49-
margin: 1rem 0;
50+
margin: var(--dimension-layout-small) 0;
5051
}
5152
}
5253

5354
h4, .h4 {
54-
margin: 0.500rem 0;
55+
margin: var(--dimension-layout-xxsmall) 0;
5556
@include heading-4;
5657

5758
@media(min-width: $min-width-breakpoint-tablet){
58-
margin: 1rem 0;
59+
margin: var(--dimension-layout-xsmall) 0;
5960
}
6061
}
6162

6263
h5, .h5 {
63-
margin: 0.500rem 0;
64+
margin: var(--dimension-layout-xxsmall) 0;
6465
@include heading-5;
6566

6667
@media(min-width: $min-width-breakpoint-tablet){
67-
margin: 1rem 0;
68+
margin: var(--dimension-layout-xsmall) 0;
6869
}
6970
}
7071

@@ -101,7 +102,7 @@ li {
101102

102103
// this ensures that there will be a space if there is more than one message
103104
#message-section .cdx-message:not(:nth-child(1)) {
104-
margin-top: 1rem;
105+
margin-top: var(--dimension-layout-xsmall);
105106
}
106107

107108
/**
@@ -122,16 +123,16 @@ li {
122123
display: flex;
123124

124125
.username {
125-
margin-inline-end: 1.500em;
126+
margin-inline-end: var(--dimension-spacing-xlarge);
126127
}
127128

128129
.icon-user {
129-
margin-inline-end: 0.500em;
130+
margin-inline-end: var(--dimension-spacing-small);
130131
vertical-align: middle;
131132
}
132133

133134
@media (max-width: $max-width-breakpoint-tablet) {
134-
margin-bottom: 1rem;
135+
margin-bottom: var(--dimension-layout-xsmall);
135136
}
136137
}
137138
}
@@ -326,7 +327,7 @@ dl.import-meta .download-csv {
326327
}
327328

328329
&-icon {
329-
margin-inline-end: 0.500em;
330+
margin-inline-end: var(--dimension-spacing-small);
330331
vertical-align: middle;
331332
}
332333
}
@@ -386,7 +387,7 @@ dl.import-meta .download-csv {
386387
}
387388

388389
.button-group {
389-
margin-block-end: 1em;
390+
margin-block-end: var(--dimension-spacing-large);
390391
}
391392

392393
.button {

resources/sass/noscript.scss

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,42 @@
11
@import '~@wikimedia/codex/dist/codex.style.css';
22
@import '~@wikimedia/codex/dist/codex.style-rtl.css';
33
@import '~@wikimedia/codex-design-tokens/theme-wikimedia-ui.scss';
4-
5-
$spacing-layout-50: 0.5rem;
6-
$spacing-layout-100: 1rem;
7-
$spacing-layout-150: 1.5rem;
8-
$spacing-layout-200: 2rem;
9-
$spacing-layout-900: 9rem;
4+
@import '../custom-variables.css';
105

116
main {
127
font-size: $font-size-medium;
138
line-height: $line-height-medium;
149
font-family: $font-family-system-sans;
1510
font-weight: $font-weight-normal;
1611
color: $color-base;
17-
padding: 10vw $spacing-layout-150 $spacing-layout-150 $spacing-layout-150;
12+
padding: 10vw var(----dimension-layout-small) var(----dimension-layout-small) var(----dimension-layout-small) var(----dimension-layout-small);
1813
max-width: 680px;
1914

2015
@media (min-width: $min-width-breakpoint-tablet) {
21-
padding: 10vw $spacing-layout-200 $spacing-layout-200 $spacing-layout-200;
16+
padding: 10vw var(--dimension-layout-medium) var(--dimension-layout-medium) var(--dimension-layout-medium);
2217
}
2318
@media (min-width: $min-width-breakpoint-desktop) {
24-
padding: $spacing-layout-900 0 $spacing-layout-150 0;
19+
padding: 9rem 0 var(----dimension-layout-small) 0;
2520
}
2621
p {
2722
margin-block-end: 0;
2823
}
2924
.h5 {
30-
margin: $spacing-layout-150 0;
25+
margin: var(----dimension-layout-small) 0;
3126
font-size: $font-size-medium;
3227
line-height: $line-height-xxx-small;
3328
font-family: $font-family-system-sans;
3429
font-weight: $font-weight-bold;
3530
color: $color-emphasized;
3631
}
3732
.message-wrapper {
38-
padding: $spacing-layout-50 0;
33+
padding: var(--dimension-layout-xxsmall) 0;
3934
@media (min-width: $min-width-breakpoint-tablet) {
40-
padding: $spacing-layout-100 0;
35+
padding: var(----dimension-layout-xsmall) 0;
4136
}
4237
}
4338
.description {
44-
padding-block-end: $spacing-layout-150;
39+
padding-block-end: var(----dimension-layout-small);
4540
}
4641
header {
4742
.logo-link {

0 commit comments

Comments
 (0)