This repository was archived by the owner on Mar 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdefault.scss
98 lines (79 loc) · 2.01 KB
/
default.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
/**
* The default button theme: white button with dark gray label, gray border, and
* some extra effects in different state.
*
* The comments in this file explain how to write a custom button theme.
*/
@import "~styles/mixins";
/* Generic button of medium size. */
@mixin button {
@include tc-label-lg;
align-items: center;
background: $tc-white;
border: solid 1px $tc-gray-30;
border-radius: 4px;
box-sizing: border-box;
color: $tc-gray-80;
display: inline-flex;
justify-content: center;
min-height: 40px;
margin: 5px;
padding: 5px 23px;
text-align: center;
vertical-align: middle;
}
/* NOTE: All CSS rules below use two classes, to have higher specifity, thus
* avoiding overriding of these rules by parent rules in some scenarious. */
/* Additional styling for a disabled button. */
.button.disabled {
@include button;
cursor: not-allowed;
opacity: 0.3;
}
/* .link and .regular classes are applied only to active button-like links,
* and real buttons (rendered as <button> elements). */
.button.link,
.button.regular {
@include button;
/* To prevent different styling of the button-like link once it has been
* visited. */
&:visited {
@include tc-label-lg;
color: $tc-gray-80;
}
&:focus {
box-shadow: 0 0 2px 1px #cfe6ff;
border-color: #59a7ff;
outline: none;
}
&:hover {
background-image: linear-gradient(to top, #f5f5f5, white 49%, white);
border-color: $tc-gray-40;
}
&.active,
&:active {
background-image: linear-gradient(to bottom, #f5f5f5, white 49%, white);
box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.2);
border-color: $tc-gray-40;
}
}
/* And a few extra classes to support XS, SM and LG sizes. */
.button.xs {
@include tc-label-sm;
border-radius: 2px;
color: $tc-gray-80;
min-height: 20px;
padding: 1px 13px;
}
.button.sm {
@include tc-label-md;
color: $tc-gray-80;
min-height: 30px;
padding: 4px 18px;
}
.button.lg {
@include tc-label-xl;
color: $tc-gray-80;
min-height: 50px;
padding: 5px 28px;
}