-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathindex.html
More file actions
172 lines (160 loc) · 6.08 KB
/
Copy pathindex.html
File metadata and controls
172 lines (160 loc) · 6.08 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
165
166
167
168
169
170
171
172
<!doctype html>
<html lang="en">
<head>
<title>makeup-expander demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="data:," />
<style>
.flyout {
position: relative;
}
span.expander {
display: inline-block;
}
.expander__content {
background-color: LightYellow;
border: 1px solid #eee;
display: none;
padding: 1rem;
}
.flyout__content {
left: 0;
position: absolute;
white-space: nowrap;
z-index: 1;
}
.expander__host[aria-expanded="true"] ~ .expander__content,
.expander__host[aria-expanded="true"] ~ .expander .expander__content,
.expander__host-container--expanded .expander__content {
display: block;
}
.clipped {
border: 0;
clip: rect(1px 1px 1px 1px);
clip: rect(1px, 1px, 1px, 1px);
height: 1px;
overflow: hidden;
padding: 0;
position: absolute;
white-space: nowrap;
width: 1px;
}
.clipped--stealth:focus {
clip: auto;
height: auto;
overflow: visible;
width: auto;
white-space: normal;
background-color: #eee;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 1em;
padding: 2px 4px;
white-space: nowrap;
z-index: 2;
}
.expander__icon {
background-color: #006699;
border-radius: 1px;
display: block;
height: 20px;
pointer-events: none;
position: absolute;
right: 0;
top: 0;
width: 20px;
}
input[readonly]:focus {
border-style: dotted;
}
</style>
</head>
<body>
<main role="main">
<h1>makeup-expander demo</h1>
<h2>Auto Collapse Off</h2>
<div class="expander expander--click-only">
<button class="expander__host">Click for Details</button>
<div class="expander__content">
<p>Any kind of HTML control can go inside...</p>
<p>A link: <a id="foo" href="http://www.ebay.com">www.ebay.com</a></p>
<p>A button: <button>Click Me</button></p>
<p>An input: <input type="text" aria-label="Dummy textbox" /></p>
<p>A checkbox: <input type="checkbox" aria-label="Dummy checkbox" /></p>
</div>
</div>
<hr />
<h2>Auto Collapse On</h2>
<span class="expander expander--click-only flyout">
<button class="expander__host flyout__host">Click for Flyout</button>
<div class="expander__content flyout__content">
<p>Any kind of HTML control can go inside...</p>
<p>A link: <a id="foo" href="http://www.ebay.com">www.ebay.com</a></p>
<p>A button: <button>Click Me</button></p>
<p>An input: <input type="text" aria-label="Dummy textbox" /></p>
<p>A checkbox: <input type="checkbox" aria-label="Dummy checkbox" /></p>
</div>
</span>
<span class="expander expander--focus-only flyout">
<input class="expander__host flyout__host" placeholder="Focus for flyout" />
<div class="expander__content flyout__content">
<p>Any kind of HTML control can go inside...</p>
<p>A link: <a id="foo" href="http://www.ebay.com">www.ebay.com</a></p>
<p>A button: <button>Click Me</button></p>
<p>An input: <input type="text" aria-label="Dummy textbox" /></p>
<p>A checkbox: <input type="checkbox" aria-label="Dummy checkbox" /></p>
</div>
</span>
<span class="expander expander--focus-and-hover flyout">
<input class="expander__host flyout__host" placeholder="Focus or hover for flyout" />
<div class="expander__content flyout__content">
<p>Any kind of HTML control can go inside...</p>
<p>A link: <a id="foo" href="http://www.ebay.com">www.ebay.com</a></p>
<p>A button: <button>Click Me</button></p>
<p>An input: <input type="text" aria-label="Dummy textbox" /></p>
<p>A checkbox: <input type="checkbox" aria-label="Dummy checkbox" /></p>
</div>
</span>
<span class="expander expander--hover-only flyout">
<a class="expander__host flyout__host" href="http://www.ebay.com">Hover for Flyout</a>
<div class="expander expander--stealth-only flyout">
<button class="expander__host flyout__host clipped clipped--stealth">Expand Flyout</button>
<div class="expander__content flyout__content">
<p tabindex="-1">Any kind of HTML control can go inside...</p>
<p>A link: <a id="foo" href="http://www.ebay.com">www.ebay.com</a></p>
<p>A button: <button>Click Me</button></p>
<p>An input: <input type="text" aria-label="Dummy textbox" /></p>
<p>A checkbox: <input type="checkbox" aria-label="Dummy checkbox" /></p>
</div>
</div>
</span>
<span class="expander expander--click-and-spacebar flyout">
<span style="position: relative">
<input
class="expander__host flyout__host"
placeholder="Click input container for flyout"
readonly
size="25"
type="text"
/>
<span class="expander__icon"></span>
</span>
<div class="expander__content flyout__content">
<p>Any kind of HTML control can go inside...</p>
<p>A link: <a id="foo" href="http://www.ebay.com">www.ebay.com</a></p>
<p>A button: <button>Click Me</button></p>
<p>An input: <input type="text" aria-label="Dummy textbox" /></p>
<p>A checkbox: <input type="checkbox" aria-label="Dummy checkbox" /></p>
</div>
</span>
<h2>UseAriaExpanded=false</h2>
<span class="expander expander--tooltip flyout">
<button class="expander__host">Btn</button>
<div class="expander__content flyout__content">
<p>A link: <a id="foo" href="http://www.ebay.com">www.ebay.com</a></p>
</div>
</span>
</main>
<script src="index.min.js"></script>
</body>
</html>