dropbutton.css
3.37 KB
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
/**
* @file
* Base styles for dropbuttons.
*/
/**
* When a dropbutton has only one option, it is simply a button.
*/
.dropbutton-wrapper,
.dropbutton-wrapper div {
box-sizing: border-box;
}
.js .dropbutton-wrapper,
.js .dropbutton-widget {
display: block;
position: relative;
}
@media screen and (max-width:600px) {
.js .dropbutton-wrapper {
width: 100%;
}
}
/* Splitbuttons */
@media screen and (min-width:600px) {
.form-actions .dropbutton-wrapper {
float: left; /* LTR */
}
[dir="rtl"] .form-actions .dropbutton-wrapper {
float: right;
}
}
.js .form-actions .dropbutton-widget {
position: static;
}
.js td .dropbutton-widget {
position: absolute;
}
.js td .dropbutton-wrapper {
min-height: 2em;
}
.js td .dropbutton-multiple {
padding-right: 10em; /* LTR */
margin-right: 2em; /* LTR */
max-width: 100%;
}
[dir="rtl"].js td .dropbutton-multiple {
padding-right: 0;
margin-right: 0;
padding-left: 10em;
margin-left: 2em;
}
.js td .dropbutton-multiple .dropbutton-action a,
.js td .dropbutton-multiple .dropbutton-action input,
.js td .dropbutton-multiple .dropbutton-action button {
width: auto;
}
/* UL styles are over-scoped in core, so this selector needs weight parity. */
.js .dropbutton-widget .dropbutton {
list-style-image: none;
list-style-type: none;
margin: 0;
overflow: hidden;
padding: 0;
}
.js .dropbutton li,
.js .dropbutton a {
display: block;
outline: none;
}
.js .dropbutton li:hover,
.js .dropbutton li:focus,
.js .dropbutton a:hover,
.js .dropbutton a:focus {
outline: initial;
}
/**
* The dropbutton styling.
*
* A dropbutton is a widget that displays a list of action links as a button
* with a primary action. Secondary actions are hidden behind a click on a
* twisty arrow.
*
* The arrow is created using border on a zero-width, zero-height span.
* The arrow inherits the link color, but can be overridden with border colors.
*/
.js .dropbutton-multiple .dropbutton-widget {
padding-right: 2em; /* LTR */
}
.js[dir="rtl"] .dropbutton-multiple .dropbutton-widget {
padding-left: 2em;
padding-right: 0;
}
.dropbutton-multiple.open,
.dropbutton-multiple.open .dropbutton-widget {
max-width: none;
}
.dropbutton-multiple.open {
z-index: 100;
}
.dropbutton-multiple .dropbutton .secondary-action {
display: none;
}
.dropbutton-multiple.open .dropbutton .secondary-action {
display: block;
}
.dropbutton-toggle {
bottom: 0;
display: block;
position: absolute;
right: 0; /* LTR */
text-indent: 110%;
top: 0;
white-space: nowrap;
width: 2em;
}
[dir="rtl"] .dropbutton-toggle {
left: 0;
right: auto;
}
.dropbutton-toggle button {
background: none;
border: 0;
cursor: pointer;
display: block;
height: 100%;
margin: 0;
padding: 0;
width: 100%;
}
.dropbutton-toggle button:hover,
.dropbutton-toggle button:focus {
outline: initial;
}
.dropbutton-arrow {
border-bottom-color: transparent;
border-left-color: transparent;
border-right-color: transparent;
border-style: solid;
border-width: 0.3333em 0.3333em 0;
display: block;
height: 0;
line-height: 0;
position: absolute;
right: 40%; /* 0.6667em; */ /* LTR */
top: 50%;
margin-top: -0.1666em;
width: 0;
overflow: hidden;
}
[dir="rtl"] .dropbutton-arrow {
left: 0.6667em;
right: auto;
}
.dropbutton-multiple.open .dropbutton-arrow {
border-bottom: 0.3333em solid;
border-top-color: transparent;
top: 0.6667em;
}