Skip to content

Commit a7e76cc

Browse files
authored
Fix all warnings (#47)
* change import to use * change import to use * fix undifined varabiles * fix rest warinings
1 parent 6297fdc commit a7e76cc

12 files changed

Lines changed: 105 additions & 105 deletions

File tree

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
@import "./../abstracts/variables";
1+
@use "sass:color";
2+
@use "./../abstracts/variables";
23

34

45
@function get-color-accessible-for-background($color) {
5-
@if (lightness( $color ) > 50) {
6-
@return darken($color, 60%)
6+
@if (color.channel($color, "lightness", $space: hsl) > 50) {
7+
@return color.adjust($color, $lightness: -60%);
78
}
89
@else {
9-
@return lighten($color, 60%)
10+
@return color.adjust($color, $lightness: 60%);
1011
}
1112
}

themes/conventional-branch/static/css/scss/abstracts/_mixins.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
@import "variables";
1+
@use "variables";
22

33
@mixin up-to-mobile {
4-
@media (max-width: #{$mobile-width - 1px}) {
4+
@media (max-width: #{variables.$mobile-width - 1px}) {
55
@content;
66
}
77
}
88

99
@mixin tablet {
10-
@media (min-width: #{$tablet-width}) and (max-width: #{$desktop-width - 1px}) {
10+
@media (min-width: #{variables.$tablet-width}) and (max-width: #{variables.$desktop-width - 1px}) {
1111
@content;
1212
}
1313
}
1414

1515
@mixin desktop {
16-
@media (min-width: #{$desktop-width}) {
16+
@media (min-width: #{variables.$desktop-width}) {
1717
@content;
1818
}
1919
}
2020

2121
@mixin gradient-primary($deg: 45deg) {
22-
background: linear-gradient($deg, $color-primary 0%, $color-primary-light 100%);
22+
background: linear-gradient($deg, variables.$color-primary 0%, variables.$color-primary-light 100%);
2323
}
2424

2525
@mixin dropdown-animation-visible {
2626
visibility: visible;
2727
opacity: 1;
28-
transform: translate(-50%, $dropdown-options-space-from-label);
28+
transform: translate(-50%, variables.$dropdown-options-space-from-label);
2929
}
3030

3131
@mixin dropdown-animation-hidden {
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@import './variables';
2-
@import './mixins';
3-
@import './functions';
4-
1+
@forward './variables';
2+
@forward './mixins';
3+
@forward './functions';

themes/conventional-branch/static/css/scss/base/_base.scss

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
@import "./../abstracts/index";
1+
@use "./../abstracts/index";
22

33
* {
44
margin: 0;
55
padding: 0;
66
box-sizing: border-box;
77
-webkit-font-smoothing: antialiased;
88
-moz-osx-font-smoothing: grayscale;
9-
-webkit-tap-highlight-color: rgba($color-neutral-dark, 0);
9+
-webkit-tap-highlight-color: rgba(index.$color-neutral-dark, 0);
1010
}
1111

1212
body {
@@ -17,11 +17,11 @@ body {
1717

1818
.container {
1919
width: 100%;
20-
max-width: $desktop-width;
20+
max-width: index.$desktop-width;
2121
margin-left: auto;
2222
margin-right: auto;
23-
padding-left: $gap-md;
24-
padding-right: $gap-md;
23+
padding-left: index.$gap-md;
24+
padding-right: index.$gap-md;
2525

2626
}
2727

@@ -30,28 +30,28 @@ body {
3030
}
3131

3232
main {
33-
background-color: $main-background;
33+
background-color: index.$main-background;
3434
}
3535

3636
article {
37-
background-color: $article-background;
38-
transform: translateY($article-offset-top);
39-
padding-top: $gap-md;
40-
padding-bottom: $gap-md;
41-
border-radius: $radius-lg;
37+
background-color: index.$article-background;
38+
transform: translateY(index.$article-offset-top);
39+
padding-top: index.$gap-md;
40+
padding-bottom: index.$gap-md;
41+
border-radius: index.$radius-lg;
4242
min-height: 50vh;
43-
box-shadow: $shadow-soft;
43+
box-shadow: index.$shadow-soft;
4444
}
4545

46-
@include desktop {
46+
@include index.desktop {
4747
.container {
48-
padding-left: $gap-lg;
49-
padding-right: $gap-lg;
48+
padding-left: index.$gap-lg;
49+
padding-right: index.$gap-lg;
5050
}
5151

5252
article {
53-
padding-top: $gap-lg - $gap-sm;
54-
padding-bottom: $gap-lg - $gap-sm;
53+
padding-top: index.$gap-lg - index.$gap-sm;
54+
padding-bottom: index.$gap-lg - index.$gap-sm;
5555
}
5656
}
5757

themes/conventional-branch/static/css/scss/components/_banner-image.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
@import "./../abstracts/index";
1+
@use "./../abstracts/index";
22

33
.banner-image {
44
width: 100%;
5-
border-radius: $radius-md;
6-
margin: $gap-lg 0;
7-
box-shadow: $shadow-soft;
8-
@include gradient-primary(14deg);
5+
border-radius: index.$radius-md;
6+
margin: index.$gap-lg 0;
7+
box-shadow: index.$shadow-soft;
8+
@include index.gradient-primary(14deg);
99

1010
img.banner-image__picture {
1111
display: block;
1212
width: 100%;
1313
min-height: 100px;
14-
max-height: $banner-image-height;
14+
max-height: index.$banner-image-height;
1515
object-fit: contain;
1616
margin: auto;
1717
background-color: transparent;

themes/conventional-branch/static/css/scss/components/_dropdown.scss

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
@use "sass:math";
2-
@import "./../abstracts/index";
2+
@use "./../abstracts/index";
33

44
@keyframes show {
55
from {
6-
@include dropdown-animation-hidden;
6+
@include index.dropdown-animation-hidden;
77
}
88
to {
9-
@include dropdown-animation-visible;
9+
@include index.dropdown-animation-visible;
1010
}
1111
}
1212

1313
@keyframes hide {
1414
from {
15-
@include dropdown-animation-visible;
15+
@include index.dropdown-animation-visible;
1616
}
1717
to {
18-
@include dropdown-animation-hidden;
18+
@include index.dropdown-animation-hidden;
1919
}
2020
}
2121

@@ -33,14 +33,14 @@
3333
text-decoration: inherit;
3434
text-transform: inherit;
3535
text-align: center;
36-
padding: $dropdown-label-padding;
37-
background-color: $dropdown-label-background-color;
38-
border-radius: $dropdown-border-radius;
36+
padding: index.$dropdown-label-padding;
37+
background-color: index.$dropdown-label-background-color;
38+
border-radius: index.$dropdown-border-radius;
3939
&:after {
4040
display: none;
4141
content: '';
4242
width: 100%;
43-
height: $dropdown-options-space-from-label * 1.5;
43+
height: index.$dropdown-options-space-from-label * 1.5;
4444
position: absolute;
4545
top: 100%;
4646
left: 0;
@@ -59,13 +59,13 @@
5959
transform: translate(-50%, 0);
6060
list-style: none;
6161
font-size: 13px;
62-
background-color: $dropdown-options-background-color;
63-
border-radius: $dropdown-border-radius;
64-
box-shadow: $shadow-soft;
62+
background-color: index.$dropdown-options-background-color;
63+
border-radius: index.$dropdown-border-radius;
64+
box-shadow: index.$shadow-soft;
6565
overflow: auto;
66-
animation: hide math.div($dropdown-animation-timing, 2) ease forwards;
66+
animation: hide math.div(index.$dropdown-animation-timing, 2) ease forwards;
6767

68-
@include up-to-mobile {
68+
@include index.up-to-mobile {
6969
top: 75%;
7070
}
7171

@@ -77,26 +77,26 @@
7777
top: 0;
7878
left: 50%;
7979
border-style: solid;
80-
border-width: 0 $dropdown-arrow-size math.div($dropdown-arrow-size, 2) $dropdown-arrow-size;
81-
border-color: transparent transparent $dropdown-options-background-color transparent;
80+
border-width: 0 index.$dropdown-arrow-size math.div(index.$dropdown-arrow-size, 2) index.$dropdown-arrow-size;
81+
border-color: transparent transparent index.$dropdown-options-background-color transparent;
8282
transform: translate(-50%, -100%);
8383
}
8484
}
8585

8686
&__option {
8787
a {
8888
display: block;
89-
padding: $dropdown-option-padding;
89+
padding: index.$dropdown-option-padding;
9090
color: rgba(black, .6);
9191
text-decoration: none;
92-
border-bottom: 1px solid $dropdown-option-border-bottom-color;
92+
border-bottom: 1px solid index.$dropdown-option-border-bottom-color;
9393
transition: background-color .3s ease, color .3s ease;
9494
text-transform: none;
9595
font-weight: normal;
9696
&:hover,
9797
&:focus {
98-
color: $color-primary;
99-
background-color: rgba($color-neutral-dark, .025);
98+
color: index.$color-primary;
99+
background-color: rgba(index.$color-neutral-dark, .025);
100100
}
101101
}
102102
&:last-child a {
@@ -111,6 +111,6 @@
111111

112112
&:hover &__options,
113113
&:focus &__options {
114-
animation: show $dropdown-animation-timing ease forwards;
114+
animation: show index.$dropdown-animation-timing ease forwards;
115115
}
116116
}

themes/conventional-branch/static/css/scss/layout/_footer.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
@import "./../abstracts/index";
1+
@use "./../abstracts/index";
22

33
.footer {
4-
margin: ($article-offset-top + ($gap-md*3)) 0 ($gap-md*3);
4+
margin: (index.$article-offset-top + (index.$gap-md*3)) 0 (index.$gap-md*3);
55

66
.container {
77
display: flex;
@@ -29,7 +29,7 @@
2929
}
3030

3131
.github {
32-
width: $footer-logo-size;
33-
height: $footer-logo-size;
32+
width: index.$footer-logo-size;
33+
height: index.$footer-logo-size;
3434
}
3535
}

themes/conventional-branch/static/css/scss/layout/_header.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "./../abstracts/index";
1+
@use "./../abstracts/index";
22

33
.header {
44
position: absolute;
@@ -11,7 +11,7 @@
1111
display: flex;
1212
align-items: center;
1313
justify-content: space-between;
14-
height: $header-height;
14+
height: index.$header-height;
1515
font-size: .8em;
1616
font-weight: bold;
1717
text-transform: uppercase;
@@ -27,34 +27,34 @@
2727

2828
&__menu {
2929
display: flex;
30-
color: $color-neutral-light;
30+
color: index.$color-neutral-light;
3131
list-style: none;
32-
margin-left: $gap-sm * 2;
32+
margin-left: index.$gap-sm * 2;
3333
}
3434

3535
&__menu-item {
36-
margin-right: $gap-sm;
36+
margin-right: index.$gap-sm;
3737

3838
&:last-child {
3939
margin-right: 0;
4040
}
4141
}
4242
}
4343

44-
@include up-to-mobile {
44+
@include index.up-to-mobile {
4545
.header {
4646
.container {
4747
align-items: flex-start;
4848
height: auto;
49-
margin-top: $gap-sm;
49+
margin-top: index.$gap-sm;
5050
}
5151

5252

5353
&__menu {
5454
flex-direction: column;
5555
justify-content: flex-end;
5656
align-items: flex-end;
57-
margin-top: $gap-sm * -1;
57+
margin-top: index.$gap-sm * -1;
5858
}
5959

6060
&__menu-item {

0 commit comments

Comments
 (0)