Skip to content

Commit 45b357b

Browse files
chukaravehasanakg
authored andcommitted
replace variables in components and pages
1 parent 97d8a9e commit 45b357b

File tree

4 files changed

+20
-16
lines changed

4 files changed

+20
-16
lines changed

resources/js/Components/AuthWidget.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@ defineProps<{ user: User | null}>();
2222
<style lang="scss">
2323
@import '~@wmde/wikit-tokens/dist/_variables.scss';
2424
@import '~@wikimedia/codex-design-tokens/theme-wikimedia-ui.scss';
25+
@import '../../css/custom-variables.css';
2526
2627
.auth-widget {
2728
display: flex;
2829
color: $color-base-50;
2930
justify-content: space-between;
30-
gap: $dimension-spacing-xlarge;
31+
gap: var(--dimension-spacing-xlarge);
3132
align-items: center;
3233
3334
.icon-user {
34-
margin-inline-end: $dimension-spacing-small;
35+
margin-inline-end: var(--dimension-spacing-small);
3536
vertical-align: middle;
3637
}
3738

resources/js/Components/WikidataToolFooter.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,19 @@ withDefaults(defineProps<{
5353

5454
<style lang="scss">
5555
@import '~@wmde/wikit-tokens/dist/_variables.scss';
56+
@import '../../css/custom-variables.css';
5657
5758
.footer-container {
5859
background-color: $color-base-90;
5960
6061
& > footer {
6162
margin: auto;
62-
padding: $dimension-layout-xsmall;
63+
padding: var(--dimension-layout-xsmall);
6364
display: flex;
6465
flex-direction: column;
6566
6667
.h5 {
67-
margin: 0 0 $dimension-layout-xsmall 0;
68+
margin: 0 0 var(--dimension-layout-xsmall) 0;
6869
font-size: $font-size-style-body-s;
6970
}
7071
@@ -73,7 +74,7 @@ withDefaults(defineProps<{
7374
}
7475
7576
section + section {
76-
margin-block-start: $dimension-layout-medium;
77+
margin-block-start: var(--dimension-layout-medium);
7778
}
7879
7980
p {
@@ -82,15 +83,15 @@ withDefaults(defineProps<{
8283
}
8384
8485
p + p {
85-
margin-block-start: $dimension-layout-xxsmall;
86+
margin-block-start: var(--dimension-layout-xxsmall);
8687
}
8788
8889
@media (min-width: $width-breakpoint-tablet) {
8990
flex-direction: row;
90-
padding: $dimension-layout-small;
91+
padding: var(--dimension-layout-small);
9192
9293
section {
93-
margin-inline-end: $dimension-layout-large;
94+
margin-inline-end: var(--dimension-layout-large);
9495
}
9596
9697
section + section {

resources/js/Pages/Home.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ function showRandom(): void{
155155

156156
<style lang="scss">
157157
@import '~@wmde/wikit-tokens/dist/_variables.scss';
158+
@import '../../css/custom-variables.css';
158159
159160
#querying-section .heading {
160161
display: flex;
@@ -184,14 +185,14 @@ function showRandom(): void{
184185
/**
185186
* Layout
186187
*/
187-
padding: $dimension-spacing-large;
188-
margin: $dimension-layout-xsmall 0;
188+
padding: var(--dimension-spacing-large);
189+
margin: var(--dimension-layout-xsmall) 0;
189190
190191
// Any direct decendent of this form that has a predecessor element will
191192
// get a top margin, this creates the even gutter between elements or "stack"
192193
// See https://every-layout.dev/layouts/stack/#the-solution
193194
& > * + * {
194-
margin-top: $dimension-spacing-large;
195+
margin-top: var(--dimension-spacing-large);
195196
}
196197
197198
.form-buttons {

resources/js/Pages/Results.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,12 +340,13 @@ function _handleConfirmation(){
340340

341341
<style lang="scss">
342342
@import '~@wmde/wikit-tokens/dist/_variables.scss';
343+
@import '../../css/custom-variables.css';
343344
344345
.back-button {
345346
// to match the first heading on the home page
346-
margin-top: $dimension-layout-xsmall;
347+
margin-top: var(--dimension-layout-xsmall);
347348
// to avoid visual grouping with .description-section
348-
margin-bottom: $dimension-layout-xsmall;
349+
margin-bottom: var(--dimension-layout-xsmall);
349350
}
350351
351352
h2 {
@@ -375,15 +376,15 @@ h2 {
375376
}
376377
}
377378
.mismatches-form-footer {
378-
margin-top: $dimension-layout-xsmall;
379+
margin-top: var(--dimension-layout-xsmall);
379380
display: flex;
380381
flex-direction: row-reverse;
381382
justify-content: space-between;
382383
align-items: flex-start;
383-
gap: $dimension-layout-xsmall;
384+
gap: var(--dimension-layout-xsmall);
384385
// calculate the footer height to reserve space for
385386
// messages with two lines (1.5 line height plus padding)
386-
min-height: calc(2*1.5em + 2*$dimension-spacing-large);
387+
min-height: calc(2*1.5em + 2*var(--dimension-spacing-large));
387388
388389
.form-success-message {
389390
max-width: 705px;

0 commit comments

Comments
 (0)