Skip to content

Commit 0e25789

Browse files
authored
🔀 Merge pull request #8 from NMSCD/fix/sass-migration
💄 SASS migration
2 parents 7e68389 + 8f1412f commit 0e25789

File tree

6 files changed

+39
-33
lines changed

6 files changed

+39
-33
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "community-search",
3-
"version": "0.0.86",
3+
"version": "0.0.87",
44
"description": "",
55
"homepage": "https://community.nmscd.com",
66
"scripts": {
@@ -24,4 +24,4 @@
2424
"solid-slider": "^1.3.2",
2525
"solid-transition-group": "^0.0.10"
2626
}
27-
}
27+
}

src/scss/custom.scss

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
@import "custom/var";
2-
@import "custom/fab";
3-
@import "custom/chips";
4-
@import "custom/scrollbar";
5-
@import "custom/background";
6-
@import "custom/general";
7-
@import "custom/card";
8-
@import "custom/modal";
9-
@import "custom/table";
10-
@import "custom/slider";
1+
@use "custom/var";
2+
@use "custom/fab";
3+
@use "custom/chips";
4+
@use "custom/scrollbar";
5+
@use "custom/background";
6+
@use "custom/general";
7+
@use "custom/card";
8+
@use "custom/modal";
9+
@use "custom/table";
10+
@use "custom/slider";
1111

1212
body {
1313
background-color: rgb(50, 50, 50);
@@ -25,7 +25,7 @@ body {
2525
}
2626

2727
a {
28-
color: $linkColour;
28+
color: var.$linkColour;
2929
}
3030
}
3131

@@ -65,4 +65,4 @@ body {
6565
overflow: hidden;
6666
display: block;
6767
text-overflow: ellipsis;
68-
}
68+
}

src/scss/custom/_fab.scss

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
@use 'sass:color';
2+
@use "var";
3+
14
#floating-button {
25
width: 55px;
36
height: 55px;
47
border-radius: 50%;
5-
background-color: darken($linkColour, 15%);
8+
background-color: color.scale(var.$linkColour, $lightness: -15%);
69
position: fixed;
710
bottom: 30px;
811
right: 30px;
@@ -11,7 +14,7 @@
1114
transition: background-color 250ms;
1215

1316
&:hover {
14-
background-color: darken($linkColour, 7%);
17+
background-color: color.scale(var.$linkColour, $lightness: -7%);
1518
}
1619
}
1720

@@ -41,4 +44,4 @@
4144
bottom: 30px;
4245
right: 30px;
4346
z-index: 50px;
44-
}
47+
}

src/scss/custom/_scrollbar.scss

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use 'sass:color';
2+
13
*::-webkit-scrollbar {
24
width: 10px;
35
background-color: #00ffff;
@@ -17,15 +19,13 @@
1719

1820
*::-webkit-scrollbar-thumb {
1921
border-radius: 5px;
20-
background-color: darken(#00ffff, 25%);
21-
background-image: -webkit-linear-gradient(
22-
45deg,
23-
rgba(255, 255, 255, 0.2) 25%,
24-
transparent 25%,
25-
transparent 50%,
26-
rgba(255, 255, 255, 0.2) 50%,
27-
rgba(255, 255, 255, 0.2) 75%,
28-
transparent 75%,
29-
transparent
30-
);
31-
}
22+
background-color: color.scale(#00ffff, $lightness: -25%);
23+
background-image: -webkit-linear-gradient(45deg,
24+
rgba(255, 255, 255, 0.2) 25%,
25+
transparent 25%,
26+
transparent 50%,
27+
rgba(255, 255, 255, 0.2) 50%,
28+
rgba(255, 255, 255, 0.2) 75%,
29+
transparent 75%,
30+
transparent);
31+
}

src/scss/custom/_slider.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "var";
2+
13
.slide-index {
24
display: inline-block;
35
background-color: rgba(211, 211, 211, 0.75);
@@ -8,13 +10,14 @@
810
cursor: pointer;
911

1012
&.is-active {
11-
background-color: $linkColour;
13+
background-color: var.$linkColour;
1214
}
1315
}
1416

1517
.slider-container {
1618
position: relative;
1719
min-height: 180px;
20+
1821
.slider-loader {
1922
position: absolute;
2023
top: 0;
@@ -26,4 +29,4 @@
2629
img {
2730
max-height: 50vh;
2831
}
29-
}
32+
}

0 commit comments

Comments
 (0)