Skip to content

Commit

Permalink
feat: activate prettier for scss (pattern-lab#1468)
Browse files Browse the repository at this point in the history
  • Loading branch information
JosefBredereck authored Jan 8, 2023
1 parent 7821123 commit 9fb66d2
Show file tree
Hide file tree
Showing 30 changed files with 61 additions and 77 deletions.
2 changes: 1 addition & 1 deletion packages/uikit-workshop/src/css/prism-okaidia.css
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pre.line-numbers > code {
counter-increment: linenumber;
}

.line-numbers-rows > span:before {
.line-numbers-rows > span::before {
content: counter(linenumber);
color: #999;
display: block;
Expand Down
1 change: 1 addition & 0 deletions packages/uikit-workshop/src/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<pl-layout></pl-layout>

<!-- the template for the modal slider -->
<!-- prettier-ignore -->
<script type="text/x-handlebars-template" class="pl-js-panel-template-base">
${require('./partials/base-template.html') }
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
bottom: 0;
}

.pl-c-loader-wrapper:not(:last-child){
.pl-c-loader-wrapper:not(:last-child) {
opacity: 0;
pointer-events: none;
transition: opacity 0.2s ease, transform 0.2s ease;
Expand Down
6 changes: 3 additions & 3 deletions packages/uikit-workshop/src/sass/pattern-lab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@
min-height: 100vh;

max-width: 100vw;
padding-left: .5rem;
padding-right: .5rem;
padding-left: 0.5rem;
padding-right: 0.5rem;

// Clearing all remaining floats
&::after {
clear: both;
content: "";
content: '';
display: table;
}
}
Expand Down
17 changes: 7 additions & 10 deletions packages/uikit-workshop/src/sass/scss/01-abstracts/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,13 @@

&:hover,
&.pl-is-active:hover {
background-color: rgba(0, 0, 0, .1);
background-color: rgba(0, 0, 0, 0.1);
}


/**
* Header link styles inside light theme
*/



/**
* Header link styles inside cozy theme
*/
Expand Down Expand Up @@ -96,7 +93,7 @@
user-select: none; /* Likely future */
}

@mixin buttonStyles(){
@mixin buttonStyles() {
color: inherit;
text-decoration: none;
background: transparent;
Expand All @@ -112,7 +109,7 @@
position: relative;
min-width: 30px;

&:after {
&::after {
content: '';
display: block;
position: absolute;
Expand All @@ -122,19 +119,19 @@
width: 100%;
pointer-events: none;
opacity: 0;
transition: opacity .1s ease;
transition: opacity 0.1s ease;
background-color: currentColor;
}

// &:focus,
&:hover {
&:after {
&::after {
opacity: 0.1;
}
}

&:active:hover {
&:after {
&::after {
opacity: 0.2;
}
}
Expand All @@ -143,7 +140,7 @@
outline: 1px dotted;
outline-offset: -1px;

&:after {
&::after {
opacity: 0.1;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,4 @@ $pl-animate-normal: 0.3s;
$pl-border-radius: 3px;
$pl-border-radius-med: 6px;


$pl-sidebar-width: 16rem; //Define sidebar width for calculating dimensions
2 changes: 1 addition & 1 deletion packages/uikit-workshop/src/sass/scss/02-base/_body.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
--theme-primary: #464a6d;
--theme-secondary: #161f50;
--theme-text: white;
--theme-text-rgb: 255,255,255;
--theme-text-rgb: 255, 255, 255;
--theme-border: rgba(255, 255, 255, 0.2);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/uikit-workshop/src/sass/scss/02-base/_reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
box-sizing: border-box;
}

button[class|="pl-c"] {
button[class|='pl-c'] {
font-size: inherit;
background-color: transparent;
}
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
counter-increment: linenumber;
}

.line-numbers-rows > span:before {
.line-numbers-rows > span::before {
content: counter(linenumber);
color: #999;
display: block;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
border-radius: $pl-border-radius-med;
transition: background-color $pl-animate-quick ease;

&:before {
&::before {
content: counter(the-count);
counter-increment: the-count;
font-size: 85%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
.pl-c-breadcrumb__item {
color: inherit;
&:after {
&::after {
content: '\25b6';
opacity: 0.4;
font-size: 6px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
display: flex;
flex-direction: column;


/**
* Pattern info inside the "view all" template
*/
Expand All @@ -39,7 +38,6 @@
-webkit-overflow-scrolling: touch;
flex-grow: 1;


@media all and (min-width: $pl-bp-large) {
position: static;
flex-direction: row;
Expand All @@ -53,7 +51,7 @@
* Right side contains pattern code
*/
.pl-c-pattern-info__panel {
padding: .5rem;
padding: 0.5rem;
flex-shrink: 0; // prevent panel from collapsing in height (especially on smaller screens like iPhone)
display: flex;
flex-direction: column;
Expand All @@ -74,7 +72,6 @@
* 1) Left panel that contains pattern title, lineage, description, annotations
*/
.pl-c-pattern-info__panel--info {

@media all and (min-width: $pl-bp-large) {
overflow: auto;
-webkit-overflow-scrolling: touch;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
/**
* Complete state
*/
.complete:before {
.complete::before {
color: #03790f !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@
display: inline-block;
vertical-align: middle;
position: absolute;
right: .625rem;
transition: opacity .1s linear;
right: 0.625rem;
transition: opacity 0.1s linear;
}

.pl-c-pattern__toggle-icon--expand {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
padding-left: 0.5rem;
padding-right: 0.5rem;
border: 1px solid #ddd;
margin-bottom: .5rem;
margin-bottom: 0.5rem;
margin-top: -1px;
background-color: inherit;
border-top-left-radius: 5px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
.pl-c-nav__link--dropdown {
color: inherit;

&:after {
&::after {
color: inherit;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/uikit-workshop/src/sass/scss/core.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@import './01-abstracts/variables';
@import './01-abstracts/mixins';
@import './01-abstracts/mixins';
Original file line number Diff line number Diff line change
Expand Up @@ -154,23 +154,23 @@
color: currentColor;

// border to indicate which nav links have two specific actions
&:before {
&::before {
opacity: 0.1;
right: 2.4rem;
width: 1px;
left: auto;
transform: translateY(-50%);
}

&:after {
&::after {
opacity: 0;
width: 2.5rem;
left: 50%;
transform: translateY(-50%) translateX(-50%);
}

&:before,
&:after {
&::before,
&::after {
height: 2.5rem;
transition: opacity $pl-animate-quick ease-out;
content: '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pl-search {

// grow in size when focusing on inner input
&:focus-within {
flex-shrink: .5;
flex-shrink: 0.5;
}

.pl-c-body--theme-sidebar & {
Expand Down Expand Up @@ -82,7 +82,7 @@ pl-search {
color: $pl-color-white;
background-color: rgba(var(--theme-text-rgb), 0.05);
color: rgba(var(--theme-text-rgb), 0.67);
border-color: rgba(0, 0, 0, .1);
border-color: rgba(0, 0, 0, 0.1);
border-color: rgba(var(--theme-text-rgb), 0.17);
text-overflow: ellipsis;
border-width: 1px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pl-button {
padding: 0.5rem 1rem;

&.pl-c-button--icon-only {
padding: .5rem;
padding: 0.5rem;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pl-controls {
padding-top: 0.5rem;
// box-shadow: 0 -2px 5px rgba($pl-color-black, 0.1);

&:before {
&::before {
position: absolute;
left: 0;
right: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pl-drawer {
padding-top: 5px;
padding-bottom: 5px;

&:after {
&::after {
content: '';
height: 100%;
width: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pl-header {
position: fixed;
position: sticky;
overflow: auto;
/**
/**
* Header
* 1) Set width to sidebar width defined above
* 2) Make header 100% of the viewport height
Expand All @@ -49,7 +49,6 @@ pl-header {
border-bottom: 0; /* 4 */
}
}

}

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


@media all and (min-width: $pl-bp-med) {
.pl-c-body--theme-sidebar & {
flex-direction: column; /* 3 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ pl-logo {
padding: 0;
min-height: 44px;
min-width: 44px;

}

.pl-c-logo {
Expand All @@ -29,7 +28,7 @@ pl-logo {
color: inherit;
text-decoration: none;

@media screen and (min-width: 400px){
@media screen and (min-width: 400px) {
padding: 0.5rem 12px;
}

Expand All @@ -39,7 +38,7 @@ pl-logo {
font-weight: bold;
line-height: 1;
margin: 0;
transition: color .2s ease;
transition: color 0.2s ease;

&:focus {
outline: 1px dotted;
Expand All @@ -53,7 +52,7 @@ pl-logo {
max-width: 100%;
max-height: 23px;

&:not(:last-child){
&:not(:last-child) {
margin-right: 0.25rem;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ pl-toggle-layout {
.pl-c-toggle-layout,
.pl-c-toggle-layout__action {
width: 100%;
}
}
Loading

0 comments on commit 9fb66d2

Please sign in to comment.