Skip to content

Commit 010fe49

Browse files
minor fixes and updated helpers
1 parent 556a8a8 commit 010fe49

3 files changed

Lines changed: 26 additions & 3 deletions

File tree

src/Utilities/helpers.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/////////////////////////////////////////////////////////
22
/// PUNICA CSS > UTILITIES : HELPERS
33
/////////////////////////////////////////////////////////
4+
@import "variables";
45
@import "mixins";
56
///
67
///
@@ -33,6 +34,7 @@
3334
/// Background Colors
3435
///
3536
@include setHelperList($bg-colors, "background-color", "!important");
37+
@include setColorScale($bg-colors);
3638

3739
///
3840
/// Cursors

src/Utilities/mixins.scss

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,28 @@
111111
#{$property}: #{$value}#{$value-type} #{$specificity};
112112
}
113113

114+
///
115+
/// Color Scale
116+
/// @param {Array} $colors
117+
///
118+
@mixin setColorScale($colors) {
119+
@for $i from 5 through 35 {
120+
@each $class, $color in $colors {
121+
@if $i % 5 == 0 {
122+
$percentage: $i*1%;
123+
// darken
124+
.#{$class}-darken-#{$i} {
125+
background-color: darken($color, $percentage);
126+
}
127+
// lighten
128+
.#{$class}-lighten-#{$i} {
129+
background-color: lighten($color, $percentage);
130+
}
131+
}
132+
}
133+
}
134+
}
135+
114136
///
115137
/// Other Helpers
116138
///

src/punica.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/// PUNICA CSS
33
/////////////////////////////////////////////////////////
44
// ======================================================
5-
$active-theme: default; // active theme name
5+
$active-theme: default; // active theme name
66
// ======================================================
77

88
/// Class names & Framework Options =====================
@@ -14,8 +14,8 @@ $active-theme: default; // active theme name
1414

1515
/// Global Getter functions, Mixins & Variables =========
1616
@import "_global/_getters";
17-
@import "_global/mixins";
1817
@import "_global/variables";
18+
@import "_global/mixins";
1919

2020
/// Active Theme ========================================
2121
@include get-theme() {
@@ -33,7 +33,6 @@ $active-theme: default; // active theme name
3333
@import "Layout/variables";
3434
@import "Elements/variables";
3535
@import "Components/variables";
36-
@import "Utilities/variables";
3736
///
3837
@import "Layout/index";
3938
@import "Elements/index";

0 commit comments

Comments
 (0)