-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path2.2-style-css-var-demo-hover-fallback-support.css
65 lines (51 loc) · 1.18 KB
/
2.2-style-css-var-demo-hover-fallback-support.css
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
:root {
/* define/set variables */
--main-font-family: Verdana; --main-line-height: 2;
}
body {
font-family: var(--main-font-family);
}
.top-heading-text {
line-height: var(--main-line-height);
}
.info-text {
color: var(--main-theme-color);
line-height: var(--main-line-height);
max-width: 70%; margin: 0 auto;
}
.button {
color: var(--main-theme-color, #000000); /* black is fallback color */
border: 2px solid var(--main-theme-color, #000000);
display: inline-block; padding: 5px; text-align: center; border-radius: 5px; cursor: pointer;
}
.button:hover {
color: #ffffff;
border: 2px solid var(--main-theme-color, #000000); background-color: var(--main-theme-color, #000000);
}
.btn-default {
/* no --main-theme-color defined for default button, so it will have theme color as fallback black color */
}
.btn-primary{
--main-theme-color: #007bff;
}
.btn-secondary{
--main-theme-color: #6c757d;
}
.btn-danger{
--main-theme-color: #dc3545;
}
.btn-success{
--main-theme-color: #28a745;
}
.btn-info{
--main-theme-color: #17a2b8;
}
.btn-warning{
--main-theme-color: #ffc107;
}
.btn-light{
--main-theme-color: #dedede
}
.btn-dark{
--main-theme-color: #343a40;
}