-
Notifications
You must be signed in to change notification settings - Fork 31
/
tab.scss
73 lines (59 loc) · 1.61 KB
/
tab.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
@import "../style/base";
@import "tab-vars";
:host {
--_tab-color: #{$tab-color};
--_tab-bg: #{$tab-bg};
color: var(--_tab-color);
background: var(--_tab-bg);
padding: $tab-padding;
transition: $tab-transition;
display: flex;
align-items: center;
justify-content: center;
position: relative;
outline: none;
user-select: none;
}
:host(:not([disabled]):not([checked])) {
cursor: pointer;
}
:host(:hover), :host(:focus) {
--_tab-color: #{$tab-color-hover};
--_tab-bg: #{$tab-bg-hover};
will-change: background, color;
}
:host([checked]:focus), :host([checked]:hover) {
--_tab-bg: #{$tab-bg-active-hover};
--_tab-color: #{$tab-color-active-hover};
}
:host([disabled]) {
--_tab-color: #{$tab-color-disabled};
--_tab-bg: #{$tab-bg-disabled};
opacity: $tab-opacity-disabled;
pointer-events: none;
}
:host([checked]) {
--_tab-color: #{$tab-color-active};
--_tab-bg: #{$tab-bg-active};
}
:host-context([filled]), :host[filled] {
--tab-color: #{$tab-color-filled};
--tab-bg: #{$tab-bg-filled};
--tab-color-active: #{$tab-color-active-filled};
--tab-bg-active: #{$tab-bg-active-filled};
--tab-color-hover: #{$tab-color-hover-filled};
--tab-bg-hover: #{$tab-bg-hover-filled};
--tab-color-active-hover: #{$tab-color-active-hover-filled};
--tab-bg-active-hover: #{$tab-bg-active-hover-filled};
--tab-color-disabled: #{$tab-color-disabled-filled};
--tab-bg-disabled: #{$tab-bg-disabled-filled};
}
::slotted([slot="before"]) {
margin: $tab-before-margin;
}
:host([vertical]) {
flex-direction: column;
::slotted([slot="before"]) {
margin: $tab-before-margin-vertical;
}
}