Skip to content

Commit 30e2310

Browse files
added color schema for helpers
1 parent 010fe49 commit 30e2310

4 files changed

Lines changed: 28 additions & 13 deletions

File tree

src/Utilities/_config/_specs.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
/// PUNICA CSS > UTILITIES : HELPERS > SPECS
33
/////////////////////////////////////////////////////////
44
$specs: (
5-
"spaces" : (0,5,10,15,20,30,40,50,75,100,125,150,175,200), // padding and margin
5+
"spaces" : (0,5,10,15,20,30,40,50,75,100,125,150,175,200), // padding and margin (px)
66
"font-weight" : (100,200,300,400,500,600,700,800,900),
7-
"borders" : (0,1,2,3,4,5), // border width
8-
"border-radius" : (2,4,8,10,12,14,16,500),
7+
"borders" : (0,1,2,3,4,5), // border width (px)
8+
"border-radius" : (2,4,8,10,12,14,16,500), // (px)
99
"orders" : (1,2,3,4,5),
1010
"line-height" : (0,1,2,3,4,5),
1111
"z-index" : (-1,0,1,10,20,30,40,50,100,999,9999,99999)

src/Utilities/_config/place-content.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
///
22
/// Place Content
33
///
4-
/// The justify-self property aligns a grid item
5-
/// within its grid cell in the inline direction.
4+
/// The place-content property is used in flexbox
5+
/// and grid layouts, and is a shorthand property for
6+
/// align-content and justify-content properties..
67
///
78
$place-content: (
89
// class name, value

src/Utilities/helpers.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
/// Text Colors
3030
///
3131
@include setHelperList($text-colors, "color", "!important");
32+
@include setColorScale($text-colors, false);
3233

3334
///
3435
/// Background Colors

src/Utilities/mixins.scss

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,19 +114,32 @@
114114
///
115115
/// Color Scale
116116
/// @param {Array} $colors
117+
/// @param {Boolean} $bgcolor
117118
///
118-
@mixin setColorScale($colors) {
119+
@mixin setColorScale($colors, $bgcolor : true) {
119120
@for $i from 5 through 35 {
120121
@each $class, $color in $colors {
121122
@if $i % 5 == 0 {
122123
$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);
124+
125+
@if $bgcolor {
126+
// darken
127+
.#{$class}-darken-#{$i} {
128+
background-color: darken($color, $percentage);
129+
}
130+
// lighten
131+
.#{$class}-lighten-#{$i} {
132+
background-color: lighten($color, $percentage);
133+
}
134+
} @else {
135+
// darken
136+
.#{$class}-darken-#{$i} {
137+
color: darken($color, $percentage);
138+
}
139+
// lighten
140+
.#{$class}-lighten-#{$i} {
141+
color: lighten($color, $percentage);
142+
}
130143
}
131144
}
132145
}

0 commit comments

Comments
 (0)