Skip to content

Commit 9fb66d2

Browse files
feat: activate prettier for scss (pattern-lab#1468)
1 parent 7821123 commit 9fb66d2

File tree

30 files changed

+61
-77
lines changed

30 files changed

+61
-77
lines changed

packages/uikit-workshop/src/css/prism-okaidia.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ pre.line-numbers > code {
171171
counter-increment: linenumber;
172172
}
173173

174-
.line-numbers-rows > span:before {
174+
.line-numbers-rows > span::before {
175175
content: counter(linenumber);
176176
color: #999;
177177
display: block;

packages/uikit-workshop/src/html/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<pl-layout></pl-layout>
2727

2828
<!-- the template for the modal slider -->
29+
<!-- prettier-ignore -->
2930
<script type="text/x-handlebars-template" class="pl-js-panel-template-base">
3031
${require('./partials/base-template.html') }
3132
</script>

packages/uikit-workshop/src/sass/pattern-lab--iframe-loader.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
bottom: 0;
1919
}
2020

21-
.pl-c-loader-wrapper:not(:last-child){
21+
.pl-c-loader-wrapper:not(:last-child) {
2222
opacity: 0;
2323
pointer-events: none;
2424
transition: opacity 0.2s ease, transform 0.2s ease;

packages/uikit-workshop/src/sass/pattern-lab.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@
110110
min-height: 100vh;
111111

112112
max-width: 100vw;
113-
padding-left: .5rem;
114-
padding-right: .5rem;
113+
padding-left: 0.5rem;
114+
padding-right: 0.5rem;
115115

116116
// Clearing all remaining floats
117117
&::after {
118118
clear: both;
119-
content: "";
119+
content: '';
120120
display: table;
121121
}
122122
}

packages/uikit-workshop/src/sass/scss/01-abstracts/_mixins.scss

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,13 @@
4040

4141
&:hover,
4242
&.pl-is-active:hover {
43-
background-color: rgba(0, 0, 0, .1);
43+
background-color: rgba(0, 0, 0, 0.1);
4444
}
4545

46-
4746
/**
4847
* Header link styles inside light theme
4948
*/
5049

51-
52-
5350
/**
5451
* Header link styles inside cozy theme
5552
*/
@@ -96,7 +93,7 @@
9693
user-select: none; /* Likely future */
9794
}
9895

99-
@mixin buttonStyles(){
96+
@mixin buttonStyles() {
10097
color: inherit;
10198
text-decoration: none;
10299
background: transparent;
@@ -112,7 +109,7 @@
112109
position: relative;
113110
min-width: 30px;
114111

115-
&:after {
112+
&::after {
116113
content: '';
117114
display: block;
118115
position: absolute;
@@ -122,19 +119,19 @@
122119
width: 100%;
123120
pointer-events: none;
124121
opacity: 0;
125-
transition: opacity .1s ease;
122+
transition: opacity 0.1s ease;
126123
background-color: currentColor;
127124
}
128125

129126
// &:focus,
130127
&:hover {
131-
&:after {
128+
&::after {
132129
opacity: 0.1;
133130
}
134131
}
135132

136133
&:active:hover {
137-
&:after {
134+
&::after {
138135
opacity: 0.2;
139136
}
140137
}
@@ -143,7 +140,7 @@
143140
outline: 1px dotted;
144141
outline-offset: -1px;
145142

146-
&:after {
143+
&::after {
147144
opacity: 0.1;
148145
}
149146
}

packages/uikit-workshop/src/sass/scss/01-abstracts/_variables.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,4 @@ $pl-animate-normal: 0.3s;
5656
$pl-border-radius: 3px;
5757
$pl-border-radius-med: 6px;
5858

59-
6059
$pl-sidebar-width: 16rem; //Define sidebar width for calculating dimensions

packages/uikit-workshop/src/sass/scss/02-base/_body.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
--theme-primary: #464a6d;
2828
--theme-secondary: #161f50;
2929
--theme-text: white;
30-
--theme-text-rgb: 255,255,255;
30+
--theme-text-rgb: 255, 255, 255;
3131
--theme-border: rgba(255, 255, 255, 0.2);
3232
}
3333

packages/uikit-workshop/src/sass/scss/02-base/_reset.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
box-sizing: border-box;
1717
}
1818

19-
button[class|="pl-c"] {
19+
button[class|='pl-c'] {
2020
font-size: inherit;
2121
background-color: transparent;
2222
}

packages/uikit-workshop/src/sass/scss/03-vendor/_prism.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
counter-increment: linenumber;
199199
}
200200

201-
.line-numbers-rows > span:before {
201+
.line-numbers-rows > span::before {
202202
content: counter(linenumber);
203203
color: #999;
204204
display: block;

packages/uikit-workshop/src/sass/scss/04-components/_annotations-inside-modal.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
border-radius: $pl-border-radius-med;
4646
transition: background-color $pl-animate-quick ease;
4747

48-
&:before {
48+
&::before {
4949
content: counter(the-count);
5050
counter-increment: the-count;
5151
font-size: 85%;

packages/uikit-workshop/src/sass/scss/04-components/_breadcrumbs.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
.pl-c-breadcrumb__item {
2323
color: inherit;
24-
&:after {
24+
&::after {
2525
content: '\25b6';
2626
opacity: 0.4;
2727
font-size: 6px;

packages/uikit-workshop/src/sass/scss/04-components/_pattern-info.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
display: flex;
1313
flex-direction: column;
1414

15-
1615
/**
1716
* Pattern info inside the "view all" template
1817
*/
@@ -39,7 +38,6 @@
3938
-webkit-overflow-scrolling: touch;
4039
flex-grow: 1;
4140

42-
4341
@media all and (min-width: $pl-bp-large) {
4442
position: static;
4543
flex-direction: row;
@@ -53,7 +51,7 @@
5351
* Right side contains pattern code
5452
*/
5553
.pl-c-pattern-info__panel {
56-
padding: .5rem;
54+
padding: 0.5rem;
5755
flex-shrink: 0; // prevent panel from collapsing in height (especially on smaller screens like iPhone)
5856
display: flex;
5957
flex-direction: column;
@@ -74,7 +72,6 @@
7472
* 1) Left panel that contains pattern title, lineage, description, annotations
7573
*/
7674
.pl-c-pattern-info__panel--info {
77-
7875
@media all and (min-width: $pl-bp-large) {
7976
overflow: auto;
8077
-webkit-overflow-scrolling: touch;

packages/uikit-workshop/src/sass/scss/04-components/_pattern-states.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@
3434
/**
3535
* Complete state
3636
*/
37-
.complete:before {
37+
.complete::before {
3838
color: #03790f !important;
3939
}

packages/uikit-workshop/src/sass/scss/04-components/_pattern.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@
110110
display: inline-block;
111111
vertical-align: middle;
112112
position: absolute;
113-
right: .625rem;
114-
transition: opacity .1s linear;
113+
right: 0.625rem;
114+
transition: opacity 0.1s linear;
115115
}
116116

117117
.pl-c-pattern__toggle-icon--expand {

packages/uikit-workshop/src/sass/scss/04-components/_tabs.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
padding-left: 0.5rem;
7676
padding-right: 0.5rem;
7777
border: 1px solid #ddd;
78-
margin-bottom: .5rem;
78+
margin-bottom: 0.5rem;
7979
margin-top: -1px;
8080
background-color: inherit;
8181
border-top-left-radius: 5px;

packages/uikit-workshop/src/sass/scss/05-themes/_light-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
.pl-c-nav__link--dropdown {
4141
color: inherit;
4242

43-
&:after {
43+
&::after {
4444
color: inherit;
4545
}
4646
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@import './01-abstracts/variables';
2-
@import './01-abstracts/mixins';
2+
@import './01-abstracts/mixins';

packages/uikit-workshop/src/scripts/components/pl-nav/nav-link.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,23 +154,23 @@
154154
color: currentColor;
155155

156156
// border to indicate which nav links have two specific actions
157-
&:before {
157+
&::before {
158158
opacity: 0.1;
159159
right: 2.4rem;
160160
width: 1px;
161161
left: auto;
162162
transform: translateY(-50%);
163163
}
164164

165-
&:after {
165+
&::after {
166166
opacity: 0;
167167
width: 2.5rem;
168168
left: 50%;
169169
transform: translateY(-50%) translateX(-50%);
170170
}
171171

172-
&:before,
173-
&:after {
172+
&::before,
173+
&::after {
174174
height: 2.5rem;
175175
transition: opacity $pl-animate-quick ease-out;
176176
content: '';

packages/uikit-workshop/src/scripts/components/pl-search/pl-search.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pl-search {
2828

2929
// grow in size when focusing on inner input
3030
&:focus-within {
31-
flex-shrink: .5;
31+
flex-shrink: 0.5;
3232
}
3333

3434
.pl-c-body--theme-sidebar & {
@@ -82,7 +82,7 @@ pl-search {
8282
color: $pl-color-white;
8383
background-color: rgba(var(--theme-text-rgb), 0.05);
8484
color: rgba(var(--theme-text-rgb), 0.67);
85-
border-color: rgba(0, 0, 0, .1);
85+
border-color: rgba(0, 0, 0, 0.1);
8686
border-color: rgba(var(--theme-text-rgb), 0.17);
8787
text-overflow: ellipsis;
8888
border-width: 1px;

packages/uikit-workshop/src/scripts/lit-components/pl-button/pl-button.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pl-button {
2828
padding: 0.5rem 1rem;
2929

3030
&.pl-c-button--icon-only {
31-
padding: .5rem;
31+
padding: 0.5rem;
3232
}
3333
}
3434

packages/uikit-workshop/src/scripts/lit-components/pl-controls/pl-controls.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pl-controls {
1919
padding-top: 0.5rem;
2020
// box-shadow: 0 -2px 5px rgba($pl-color-black, 0.1);
2121

22-
&:before {
22+
&::before {
2323
position: absolute;
2424
left: 0;
2525
right: 0;

packages/uikit-workshop/src/scripts/lit-components/pl-drawer/pl-drawer.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ pl-drawer {
170170
padding-top: 5px;
171171
padding-bottom: 5px;
172172

173-
&:after {
173+
&::after {
174174
content: '';
175175
height: 100%;
176176
width: 100%;

packages/uikit-workshop/src/scripts/lit-components/pl-header/pl-header.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pl-header {
3838
position: fixed;
3939
position: sticky;
4040
overflow: auto;
41-
/**
41+
/**
4242
* Header
4343
* 1) Set width to sidebar width defined above
4444
* 2) Make header 100% of the viewport height
@@ -49,7 +49,6 @@ pl-header {
4949
border-bottom: 0; /* 4 */
5050
}
5151
}
52-
5352
}
5453

5554
/**
@@ -67,7 +66,6 @@ pl-header {
6766
min-height: 30px; // magic number -- needed for initial skeleton screen styles used in the critical CSS
6867
background-color: inherit;
6968

70-
7169
@media all and (min-width: $pl-bp-med) {
7270
.pl-c-body--theme-sidebar & {
7371
flex-direction: column; /* 3 */

packages/uikit-workshop/src/scripts/lit-components/pl-logo/pl-logo.scss

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ pl-logo {
1616
padding: 0;
1717
min-height: 44px;
1818
min-width: 44px;
19-
2019
}
2120

2221
.pl-c-logo {
@@ -29,7 +28,7 @@ pl-logo {
2928
color: inherit;
3029
text-decoration: none;
3130

32-
@media screen and (min-width: 400px){
31+
@media screen and (min-width: 400px) {
3332
padding: 0.5rem 12px;
3433
}
3534

@@ -39,7 +38,7 @@ pl-logo {
3938
font-weight: bold;
4039
line-height: 1;
4140
margin: 0;
42-
transition: color .2s ease;
41+
transition: color 0.2s ease;
4342

4443
&:focus {
4544
outline: 1px dotted;
@@ -53,7 +52,7 @@ pl-logo {
5352
max-width: 100%;
5453
max-height: 23px;
5554

56-
&:not(:last-child){
55+
&:not(:last-child) {
5756
margin-right: 0.25rem;
5857
}
5958
}

packages/uikit-workshop/src/scripts/lit-components/pl-toggle-layout/pl-toggle-layout.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ pl-toggle-layout {
1313
.pl-c-toggle-layout,
1414
.pl-c-toggle-layout__action {
1515
width: 100%;
16-
}
16+
}

0 commit comments

Comments
 (0)