Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 1bfda9e

Browse files
asynclizcopybara-github
authored andcommitted
chore(layout-grid): format Sass files
PiperOrigin-RevId: 317911996
1 parent 39cf008 commit 1bfda9e

3 files changed

Lines changed: 37 additions & 20 deletions

File tree

packages/mdc-layout-grid/_mixins.scss

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@
131131
grid-gap: $gutter;
132132
// stylelint-disable-next-line declaration-block-no-duplicate-properties
133133
grid-gap: var(--mdc-layout-grid-gutter-#{$size}, $gutter);
134-
grid-template-columns: repeat(map.get(variables.$columns, $size), minmax(0, 1fr));
134+
grid-template-columns: repeat(
135+
map.get(variables.$columns, $size),
136+
minmax(0, 1fr)
137+
);
135138
}
136139
}
137140

@@ -157,27 +160,27 @@
157160
}
158161

159162
@mixin cell-align($position) {
160-
@if $position == "top" {
163+
@if $position == 'top' {
161164
align-self: flex-start;
162165

163166
@supports (display: grid) {
164167
align-self: start;
165168
}
166169
}
167170

168-
@if $position == "middle" {
171+
@if $position == 'middle' {
169172
align-self: center;
170173
}
171174

172-
@if $position == "bottom" {
175+
@if $position == 'bottom' {
173176
align-self: flex-end;
174177

175178
@supports (display: grid) {
176179
align-self: end;
177180
}
178181
}
179182

180-
@if $position == "stretch" {
183+
@if $position == 'stretch' {
181184
align-self: stretch;
182185
}
183186
}
@@ -191,12 +194,12 @@
191194
$gutter-number: $columnCount - 1;
192195
$margin-number: 2;
193196

194-
width: $column-width * $columnCount + $gutter * $gutter-number + $margin * $margin-number;
197+
width: $column-width * $columnCount + $gutter * $gutter-number + $margin *
198+
$margin-number;
195199
// stylelint-disable-next-line declaration-block-no-duplicate-properties
196-
width:
197-
calc(
198-
var(--mdc-layout-grid-column-width-#{$size}, #{$column-width}) * #{$columnCount} +
200+
width: calc(
201+
var(--mdc-layout-grid-column-width-#{$size}, #{$column-width}) * #{$columnCount} +
199202
var(--mdc-layout-grid-gutter-#{$size}, #{$gutter}) * #{$gutter-number} +
200203
var(--mdc-layout-grid-margin-#{$size}, #{$margin}) * #{$margin-number}
201-
);
204+
);
202205
}

packages/mdc-layout-grid/_variables.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,31 @@
2121
$breakpoints: (
2222
desktop: 840px,
2323
tablet: 600px,
24-
phone: 0px
24+
phone: 0px,
2525
) !default;
2626

2727
$columns: (
2828
desktop: 12,
2929
tablet: 8,
30-
phone: 4
30+
phone: 4,
3131
) !default;
3232

3333
$default-margin: (
3434
desktop: 24px,
3535
tablet: 16px,
36-
phone: 16px
36+
phone: 16px,
3737
) !default;
3838

3939
$default-gutter: (
4040
desktop: 24px,
4141
tablet: 16px,
42-
phone: 16px
42+
phone: 16px,
4343
) !default;
4444

4545
$column-width: (
4646
desktop: 72px,
4747
tablet: 72px,
48-
phone: 72px
48+
phone: 72px,
4949
) !default;
5050

5151
$default-column-span: 4 !default;

packages/mdc-layout-grid/mdc-layout-grid.scss

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,18 @@
2525

2626
:root {
2727
@each $size in map.keys(variables.$columns) {
28-
--mdc-layout-grid-margin-#{$size}: #{map.get(variables.$default-margin, $size)};
29-
--mdc-layout-grid-gutter-#{$size}: #{map.get(variables.$default-gutter, $size)};
30-
--mdc-layout-grid-column-width-#{$size}: #{map.get(variables.$column-width, $size)};
28+
--mdc-layout-grid-margin-#{$size}: #{map.get(
29+
variables.$default-margin,
30+
$size
31+
)};
32+
--mdc-layout-grid-gutter-#{$size}: #{map.get(
33+
variables.$default-gutter,
34+
$size
35+
)};
36+
--mdc-layout-grid-column-width-#{$size}: #{map.get(
37+
variables.$column-width,
38+
$size
39+
)};
3140
}
3241
}
3342

@@ -67,7 +76,7 @@
6776
// Span classes.
6877
// stylelint-disable max-nesting-depth
6978
@at-root .mdc-layout-grid__cell--span-#{$span},
70-
.mdc-layout-grid__cell--span-#{$span}-#{$size} {
79+
.mdc-layout-grid__cell--span-#{$span}-#{$size} {
7180
@include mixins.cell-span_($size, $span, $gutter);
7281
}
7382
// stylelint-enable max-nesting-depth
@@ -103,7 +112,12 @@
103112
$gutter: map.get(variables.$default-gutter, $size);
104113
$column-width: map.get(variables.$column-width, $size);
105114

106-
@include mixins.fixed-column-width($size, $margin, $gutter, $column-width);
115+
@include mixins.fixed-column-width(
116+
$size,
117+
$margin,
118+
$gutter,
119+
$column-width
120+
);
107121
}
108122
}
109123
}

0 commit comments

Comments
 (0)