-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path_ouif.theme.functions.scss
99 lines (87 loc) · 2.1 KB
/
_ouif.theme.functions.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// available Office UI States
$officeUIStates: alert, error, info, servere, success;
// configuration color and background-color
$officeUIStateCombinations: (
alert: ($ouif-alertText, $ouif-alertBackground),
error: ($ouif-errorText, $ouif-errorBackground),
info: ($ouif-infoText, $ouif-infoBackground),
servere: ($ouif-severeWarningText, $ouif-severeWarningBackground),
success: ($ouif-successText, $ouif-successBackground)
);
// configuration text colors
$officeUIStateText: (
alert: $ouif-alert,
error: $ouif-error,
info: $ouif-infoText,
servere: $ouif-severeWarning,
success: $ouif-successText
);
/*
Get css for state objects for: alert, error, info, servere, success
This includes color and background styles
*/
@mixin stateStyle($state) {
$stateindex: index($officeUIStates, $state);
$backcolor: null;
$forecolor: null;
@if($stateindex !=null) {
$backcolor: nth( nth( nth($officeUIStateCombinations, $stateindex), 2), 2);
$forecolor: nth( nth( nth($officeUIStateCombinations, $stateindex), 2), 1);
} @else {
@warn 'Error: wrong state';
}
background-color: $backcolor;
color: $forecolor;
}
/*
Get css for state objects for: alert, error, info, servere, success
This includes only the color values
*/
@mixin stateTextStyle($state) {
$stateindex: index($officeUIStates, $state);
$forecolor: null;
@if($stateindex !=null) {
$forecolor: nth( nth( nth($officeUIStateText, $stateindex), 2), 1);
} @else {
@warn 'Error: wrong state';
}
color: $forecolor;
}
/***
100 Thin (Hairline)
200 Extra Light (Ultra Light)
300 Light
400 Normal
500 Medium
600 Semi Bold (Demi Bold)
700 Bold
800 Extra Bold (Ultra Bold)
900 Black (Heavy)
**/
@function thin(){
@return 100;
};
@function ultralight(){
@return 200;
};
@function light(){
@return 300;
};
@function normal(){
@return 400;
};
@function medium(){
@return 500;
};
@function semibold(){
@return 600;
};
@function bold(){
@return 700;
};
@function extrabold(){
@return 800;
};
@function heavy(){
@return 900;
};