-
Notifications
You must be signed in to change notification settings - Fork 125
/
grouped-button.less
105 lines (88 loc) · 2.43 KB
/
grouped-button.less
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
100
101
102
103
104
105
@import "./lib.less";
.veui-grouped-button() {
&[data-focus-visible-added] {
z-index: 8 !important;
}
&.@{veui-prefix}-button-selected {
z-index: 6;
border-color: @dls-button-border-color-selected;
background-color: @dls-button-background-color-selected;
color: @dls-button-font-color-selected;
&:hover {
border-color: @dls-button-border-color-selected;
background-color: @dls-button-background-color-selected-hover;
z-index: 7;
}
&[data-focus-visible-added] {
border-color: @dls-button-border-color-focus;
background-color: @dls-button-background-color-selected-focus;
}
&:active {
background-color: @dls-button-background-color-selected-active;
}
&.@{veui-prefix}-disabled {
border-color: @dls-button-border-color-selected-disabled;
background-color: @dls-button-background-color-selected-disabled;
color: @dls-button-font-color-selected-disabled;
z-index: 4;
&:hover {
background-color: @dls-button-background-color-selected-disabled;
z-index: 5;
}
}
}
}
.veui-d22-button-group () {
@padding: @dls-padding-unit * 0.5;
.@{veui-prefix}-button {
margin-left: 0;
background-color: @dls-color-translucent-1;
border-width: @padding;
border-color: transparent !important;
&[data-focus-visible-added] {
box-shadow: none;
border-width: @padding;
&::after {
.dls-focus-ring();
}
}
&::before,
&::after {
content: "";
position: absolute;
z-index: -1;
.veui-transition(background-color);
}
&::after {
top: 0;
right: 0;
bottom: 0;
left: 0;
border-radius: @dls-border-radius-1;
}
&::before {
top: 50%;
left: -@padding;
width: 1px;
height: @dls-height-unit * 3;
transform: translate(-50%, -50%);
}
&:not(.@{veui-prefix}-disabled):hover,
&[data-focus-visible-added],
&-selected {
&::after {
background-color: @dls-background-color-base-1;
}
}
}
.@{veui-prefix}-button:not(:not(.@{veui-prefix}-disabled):hover):not(
.@{veui-prefix}-button-selected
):not([data-focus-visible-added])
+ .@{veui-prefix}-button:not(:not(.@{veui-prefix}-disabled):hover):not(
.@{veui-prefix}-button-selected
):not([data-focus-visible-added]) {
&::before {
background-color: @dls-color-translucent-3;
}
}
}