Skip to content

Commit d6f1a8d

Browse files
crisbetotinayuangao
authored andcommitted
build: enforce line length in scss files (#6233)
Enforces a 100-character line length in the SCSS files for consistency with the TS.
1 parent 4e6e42e commit d6f1a8d

File tree

10 files changed

+53
-30
lines changed

10 files changed

+53
-30
lines changed

src/demo-app/ripple/ripple-demo.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
border-radius: 50%;
2424
overflow: hidden;
2525
// z-index needed to make clipping to border-radius work correctly.
26-
// http://stackoverflow.com/questions/20001515/chrome-bug-border-radius-not-clipping-contents-when-combined-with-css-transiti
26+
// http://stackoverflow.com/questions/20001515/
2727
z-index: 1;
2828
}
2929
}

src/lib/autocomplete/autocomplete.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66
*/
77
$mat-autocomplete-panel-max-height: 256px !default;
88

9-
/** When in "below" position, the panel needs a slight y-offset to ensure the input underline displays. */
9+
/**
10+
* When in "below" position, the panel needs a slight
11+
* y-offset to ensure the input underline displays.
12+
*/
1013
$mat-autocomplete-panel-below-offset: 6px !default;
1114

12-
/** When in "above" position, the panel needs a larger y-offset to ensure the label has room to display. */
15+
/**
16+
* When in "above" position, the panel needs a larger
17+
* y-offset to ensure the label has room to display.
18+
*/
1319
$mat-autocomplete-panel-above-offset: -24px !default;
1420

1521
.mat-autocomplete-panel {

src/lib/button/button.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
.mat-button-ripple-round {
9494
border-radius: 50%;
9595
// z-index needed to make clipping to border-radius work correctly.
96-
// http://stackoverflow.com/questions/20001515/chrome-bug-border-radius-not-clipping-contents-when-combined-with-css-transiti
96+
// http://stackoverflow.com/questions/20001515/
9797
z-index: 1;
9898
}
9999

src/lib/checkbox/checkbox.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,8 @@ $_mat-checkbox-mark-stroke-size: 2 / 15 * $mat-checkbox-size !default;
347347
// Instead of delaying the animation, we simply multiply its length by 2 and begin the
348348
// animation at 50% in order to prevent a flash of styles applied to a checked checkmark
349349
// as the background is fading in before the animation begins.
350-
animation:
351-
$mat-checkbox-transition-duration * 2 linear 0ms mat-checkbox-unchecked-checked-checkmark-path;
350+
animation: $mat-checkbox-transition-duration * 2 linear 0ms
351+
mat-checkbox-unchecked-checked-checkmark-path;
352352
}
353353
}
354354

src/lib/input/_input-theme.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@
102102

103103
// Applies a floating placeholder above the input itself.
104104
@mixin _mat-input-placeholder-floating($font-scale, $infix-padding, $infix-margin-top) {
105+
// We use perspecitve to fix the text blurriness as described here:
106+
// http://www.useragentman.com/blog/2014/05/04/fixing-typography-inside-of-2-d-css-transforms/
107+
// This results in a small jitter after the label floats on Firefox, which the
108+
// translateZ fixes.
105109
transform: translateY(-$infix-margin-top - $infix-padding)
106110
scale($font-scale)
107-
// We use perspecitve to fix the text blurriness as described here:
108-
// http://www.useragentman.com/blog/2014/05/04/fixing-typography-inside-of-2-d-css-transforms/
109-
// This results in a small jitter after the label floats on Firefox, which the
110-
// translateZ fixes.
111111
perspective(100px) translateZ(0.001px);
112112
// The tricks above used to smooth out the animation on chrome and firefox actually make things
113113
// worse on IE, so we don't include them in the IE version.

src/lib/progress-bar/progress-bar.scss

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,11 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;
115115

116116
// KEYFRAME BLOCK DESCRIPTION
117117
// primary-indeterminate-translate Translation of the primary progressbar across the screen
118-
// primary-indeterminate-scale Scaling of the primary bar as it's being translated across the screen
118+
// primary-indeterminate-scale Scaling of the primary bar as it's being translated
119+
// across the screen
119120
// secondary-indeterminate-translate Translation of the secondary bar across the screen
120-
// secondary-indeterminate-scale Scaling of the secondary bar as it's being translated across the screen
121+
// secondary-indeterminate-scale Scaling of the secondary bar as it's being translated
122+
// across the screen
121123
//
122124
// Because two different transform animations need to be applied at once, the translation is
123125
// applied to the outer element and the scaling is applied to the inner element, which provides the
@@ -126,23 +128,33 @@ $mat-progress-bar-piece-animation-duration: 250ms !default;
126128

127129
// Progress Bar Timing functions:
128130
// $mat-progress-bar-primary-indeterminate-translate-step-1 has no timing function.
129-
$mat-progress-bar-primary-indeterminate-translate-step-2: cubic-bezier(0.5, 0, 0.701732, 0.495819) !default;
130-
$mat-progress-bar-primary-indeterminate-translate-step-3: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352) !default;
131+
$mat-progress-bar-primary-indeterminate-translate-step-2:
132+
cubic-bezier(0.5, 0, 0.701732, 0.495819) !default;
133+
$mat-progress-bar-primary-indeterminate-translate-step-3:
134+
cubic-bezier(0.302435, 0.381352, 0.55, 0.956352) !default;
131135
// $mat-progress-bar-primary-indeterminate-translate-step-4 has no timing function.
132136

133137
// $mat-progress-bar-primary-indeterminate-scale-step-1 has no timing function
134-
$mat-progress-bar-primary-indeterminate-scale-step-2: cubic-bezier(0.334731, 0.12482, 0.785844, 1) !default;
135-
$mat-progress-bar-primary-indeterminate-scale-step-3: cubic-bezier(0.06, 0.11, 0.6, 1) !default;
138+
$mat-progress-bar-primary-indeterminate-scale-step-2:
139+
cubic-bezier(0.334731, 0.12482, 0.785844, 1) !default;
140+
$mat-progress-bar-primary-indeterminate-scale-step-3:
141+
cubic-bezier(0.06, 0.11, 0.6, 1) !default;
136142
// $mat-progress-bar-primary-indeterminate-scale-step-4 has no timing function
137143

138-
$mat-progress-bar-secondary-indeterminate-translate-step-1: cubic-bezier(0.15, 0, 0.515058, 0.409685) !default;
139-
$mat-progress-bar-secondary-indeterminate-translate-step-2: cubic-bezier(0.31033, 0.284058, 0.8, 0.733712) !default;
140-
$mat-progress-bar-secondary-indeterminate-translate-step-3: cubic-bezier(0.4, 0.627035, 0.6, 0.902026) !default;
144+
$mat-progress-bar-secondary-indeterminate-translate-step-1:
145+
cubic-bezier(0.15, 0, 0.515058, 0.409685) !default;
146+
$mat-progress-bar-secondary-indeterminate-translate-step-2:
147+
cubic-bezier(0.31033, 0.284058, 0.8, 0.733712) !default;
148+
$mat-progress-bar-secondary-indeterminate-translate-step-3:
149+
cubic-bezier(0.4, 0.627035, 0.6, 0.902026) !default;
141150
// $mat-progress-bar-secondary-indeterminate-translate-step-4 has no timing function
142151

143-
$mat-progress-bar-secondary-indeterminate-scale-step-1: cubic-bezier(0.15, 0, 0.515058, 0.409685) !default;
144-
$mat-progress-bar-secondary-indeterminate-scale-step-2: cubic-bezier(0.31033, 0.284058, 0.8, 0.733712) !default;
145-
$mat-progress-bar-secondary-indeterminate-scale-step-3: cubic-bezier(0.4, 0.627035, 0.6, 0.902026) !default;
152+
$mat-progress-bar-secondary-indeterminate-scale-step-1:
153+
cubic-bezier(0.15, 0, 0.515058, 0.409685) !default;
154+
$mat-progress-bar-secondary-indeterminate-scale-step-2:
155+
cubic-bezier(0.31033, 0.284058, 0.8, 0.733712) !default;
156+
$mat-progress-bar-secondary-indeterminate-scale-step-3:
157+
cubic-bezier(0.4, 0.627035, 0.6, 0.902026) !default;
146158
// $mat-progress-bar-secondary-indeterminate-scale-step-4 has no timing function
147159

148160

src/lib/sidenav/sidenav.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
@import '../core/style/layout-common';
44
@import '../core/a11y/a11y';
55

6+
// stylelint-disable max-line-length
67
// Mixin that creates a new stacking context.
78
// see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context
9+
// stylelint-enable
810
@mixin mat-sidenav-stacking-context() {
911
position: relative;
1012

src/lib/slide-toggle/_slide-toggle-theme.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
@import '../core/typography/typography-utils';
44

55
@mixin _mat-slide-toggle-checked($palette, $thumb-checked-hue) {
6-
// Do not apply the checked colors if the toggle is disabled, because the specificity would be to high for
7-
// the disabled styles.
6+
// Do not apply the checked colors if the toggle is disabled, because the
7+
// specificity would be to high for the disabled styles.
88
&.mat-checked:not(.mat-disabled) {
99
.mat-slide-toggle-thumb {
1010
background-color: mat-color($palette, $thumb-checked-hue);
@@ -69,9 +69,9 @@
6969

7070
.mat-disabled {
7171
.mat-slide-toggle-thumb {
72-
// The thumb of the slide-toggle always uses the hue 400 of the grey palette in dark or light themes.
73-
// Since this is very specific to the slide-toggle component, we're not providing
74-
// it in the background palette.
72+
// The thumb of the slide-toggle always uses the hue 400 of the grey palette in dark
73+
// or light themes. Since this is very specific to the slide-toggle component, we're not
74+
// providing it in the background palette.
7575
background-color: mat-color($mat-grey, $thumb-disabled-hue);
7676
}
7777
.mat-slide-toggle-bar {

src/lib/slider/slider.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ $mat-slider-focus-ring-size: 30px !default;
316316
.mat-slider-thumb-label {
317317
right: -$mat-slider-thumb-label-size / 2;
318318
top: -($mat-slider-thumb-label-size + $mat-slider-thumb-arrow-gap);
319-
transform: translateY($mat-slider-thumb-label-size / 2 + $mat-slider-thumb-arrow-gap) scale(0.01)
319+
transform: translateY($mat-slider-thumb-label-size / 2 + $mat-slider-thumb-arrow-gap)
320+
scale(0.01)
320321
rotate(45deg);
321322
}
322323

@@ -392,7 +393,8 @@ $mat-slider-focus-ring-size: 30px !default;
392393
.mat-slider-thumb-label {
393394
bottom: -$mat-slider-thumb-label-size / 2;
394395
left: -($mat-slider-thumb-label-size + $mat-slider-thumb-arrow-gap);
395-
transform: translateX($mat-slider-thumb-label-size / 2 + $mat-slider-thumb-arrow-gap) scale(0.01)
396+
transform: translateX($mat-slider-thumb-label-size / 2 + $mat-slider-thumb-arrow-gap)
397+
scale(0.01)
396398
rotate(-45deg);
397399
}
398400

stylelint-config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"selector-pseudo-element-no-unknown": true,
7474
"selector-type-case": "lower",
7575
"selector-max-id": 0,
76-
"no-missing-end-of-source-newline": true
76+
"no-missing-end-of-source-newline": true,
77+
"max-line-length": 100
7778
}
7879
}

0 commit comments

Comments
 (0)