Skip to content

Commit 0aeca69

Browse files
authored
Adapt layout to codex's grid system (#849)
* Adapt layout to codex's grid system * add a gap for the results description header
1 parent 9e5e804 commit 0aeca69

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

resources/js/Components/ItemIdSearchTextarea.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ defineExpose({validate, serializeInput, validationError});
9898
</script>
9999

100100
<style lang="scss">
101-
/* stylelint-disable-next-line scss/load-no-partial-leading-underscore */
102-
@import '~@wmde/wikit-tokens/dist/_variables';
101+
@import "@wikimedia/codex-design-tokens/theme-wikimedia-ui";
103102
104103
.cdx-field__control {
105104
position: relative;
@@ -114,7 +113,7 @@ defineExpose({validate, serializeInput, validationError});
114113
width: 50%;
115114
margin: auto;
116115
117-
@media (max-width: $width-breakpoint-tablet) {
116+
@media (max-width: $max-width-breakpoint-tablet) {
118117
width: 80%;
119118
}
120119
}

resources/js/Pages/Home.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ function showRandom(): void{
189189
display: flex;
190190
justify-content: space-between;
191191
align-items: center;
192+
gap: var(--dimension-spacing-small);
192193
193194
h2 {
194195
// the previous section already has enough margin-bottom

resources/js/Pages/Layout.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,16 @@ onBeforeUnmount(() => {
190190
<style lang="scss">
191191
@import "@wikimedia/codex-design-tokens/theme-wikimedia-ui";
192192
@import '../../sass/typography';
193+
@import '../../css/custom-variables.css';
193194
194195
#app {
195196
box-sizing: border-box;
196197
min-height: 100%;
197198
display: flex;
198199
flex-direction: column;
199-
200+
200201
.content-wrap {
201-
max-width: 1168px;
202+
max-width: 1142px;
202203
width: 100%;
203204
flex-grow: 1;
204205
}

resources/sass/app.scss

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ body {
2121
* Layout
2222
*/
2323
main {
24-
max-width: 1090px;
2524
padding: 0 var(--dimension-layout-xsmall);
2625
margin: 0 auto;
2726

@@ -31,9 +30,17 @@ main {
3130
margin: var(--dimension-layout-small) 0;
3231
}
3332

33+
@media(min-width: $min-width-breakpoint-mobile){
34+
padding: 0 var(--dimension-layout-xsmall);
35+
}
36+
3437
@media(min-width: $min-width-breakpoint-tablet){
3538
padding: 0 var(--dimension-layout-small);
3639
}
40+
41+
@media (min-width: $min-width-breakpoint-desktop) {
42+
padding: 0 var(--dimension-layout-medium);
43+
}
3744
}
3845

3946
section {
@@ -89,7 +96,7 @@ li + li {
8996
#error-section,
9097
#message-section,
9198
#description-section {
92-
max-width: 705px;
99+
max-width: 676px;
93100
}
94101

95102
#description-section {
@@ -98,6 +105,7 @@ li + li {
98105
flex-direction: row;
99106
align-items: center;
100107
justify-content: space-between;
108+
gap: var(--dimension-spacing-small);
101109
}
102110
}
103111

0 commit comments

Comments
 (0)