forked from Financial-Times/o-colors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.scss
35 lines (30 loc) · 1.05 KB
/
main.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$o-colors-is-silent: true !default;
@import 'src/scss/functions';
@import 'src/scss/palette';
@import 'src/scss/use-cases';
// Output use case placeholders and (if noisy) concrete classes
@each $usecase in $o-colors-usecase-list {
$selector: 'o-colors-' + nth($usecase,1) + '-' + nth($usecase,3);
@if (not $o-colors-is-silent) {
$selector: $selector + ', .' + $selector;
}
%#{$selector} {
@if nth($usecase,3) == text or nth($usecase,3) == all {
color: _oColorsGetPaletteColor(nth($usecase,2));
} @else if nth($usecase,3) == background or nth($usecase,3) == all {
background-color: _oColorsGetPaletteColor(nth($usecase,2));
} @else if nth($usecase,3) == border or nth($usecase,3) == all {
border-color: _oColorsGetPaletteColor(nth($usecase,2));
}
}
}
// Output palette placeholders and (if noisy) concrete classes
@each $color in $o-colors-palette-list {
$selector: 'o-colors-palette-' + nth($color,1);
@if (not $o-colors-is-silent) {
$selector: $selector + ', .' + $selector;
}
%#{$selector} {
background-color: #{nth($color,2)};
}
}