-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
248 lines (217 loc) · 7.64 KB
/
index.html
File metadata and controls
248 lines (217 loc) · 7.64 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Base Forms - Scales</title>
<meta name="viewport" content="initial-scale=1,width=device-width">
<style>
fieldset {
padding: 1em;
}
.form-list {
list-style: none;
margin: 0;
padding: 0;
}
.input-container {
margin-bottom: 1em;
}
.input-container--inline {
display: inline-block;
vertical-align: top;
}
label,
.form-label {
display: block;
}
.form-label--additional {
display: block;
font-weight: normal;
}
.text-input,
select,
textarea {
display: block;
padding: 0.5em;
border: 1px;
border-style: solid;
border-color: #000;
border-radius: 0;
}
select {
background: #fff;
}
.form-inline .text-input,
.form-inline select,
.form-inline textarea,
.form-inline label,
.form-inline .form-label {
display: inline-block;
vertical-align: middle;
}
input[disabled],
select[disabled],
textarea[disabled],
input.is-disabled,
select.is-disabled,
textarea.is-disabled {
cursor: not-allowed;
border-color: #aaa;
background-color: #ccc;
color: #aaa;
}
input[readonly],
select[readonly],
textarea[readonly],
input.is-readonly,
select.is-readonly,
textarea.is-readonly {
border-color: #aaa;
background-color: #ccc;
color: #000;
}
.helper-text {
display: none;
}
.text-input:active + .helper-text,
.text-input:focus + .helper-text,
textarea:active + .helper-text,
textarea:focus + .helper-text {
display: block;
}
.form-inline .text-input:active + .helper-text,
.form-inline .text-input:focus + .helper-text,
.form-inline textarea:active + .helper-text,
.form-inline textarea:focus + .helper-text {
display: inline-block;
}
</style>
</head>
<body>
<header role="banner">
<h1>Base Forms for Scales</h1>
</header>
<main role="main">
<p>This page includes the default base forms styles.</p>
<h3>Default stacked form</h3>
<form>
<label for="account">Account #<small class="form-label--additional">(Cannot Change)</small></label>
<input class="text-input" id="account" type="num" value="123456789" readonly>
<label for="email">Email</label>
<input class="text-input" id="email" type="email" placeholder="Email">
<span class="helper-text">Enter your email address</span>
<label for="password">Password</label>
<input class="text-input" id="password" type="password" placeholder="Password" disabled>
<label for="gender">Gender</label>
<select id="gender">
<option>Female</option>
<option>Male</option>
<option>Other</option>
</select>
<label>Introduce yourself</label>
<textarea></textarea>
<label for="newsletter">
<input id="newsletter" type="checkbox"> Send me the newsletter
</label>
<button type="submit" class="btn">Sign in</button>
</form>
<h3>Using an unordered list</h3>
<form>
<ul class="form-list">
<li class="input-container">
<label for="account">Account #<small class="form-label--additional">(Cannot Change)</small></label>
<input class="text-input" id="account" type="num" value="123456789" readonly>
</li>
<li class="input-container">
<label for="email">Email</label>
<input class="text-input" id="email" type="email" placeholder="Email">
<span class="helper-text">Enter your email address</span>
</li>
<li class="input-container">
<label for="password">Password</label>
<input class="text-input" id="password" type="password" placeholder="Password" disabled>
</li>
<li class="input-container">
<label for="gender">Gender</label>
<select id="gender">
<option>Female</option>
<option>Male</option>
<option>Other</option>
</select>
</li>
<li class="input-container">
<label>Introduce yourself</label>
<textarea></textarea>
</li>
</li>
<li class="input-container">
<label for="newsletter">
<input id="newsletter" type="checkbox"> Send me the newsletter
</label>
</li>
</ul>
<button type="submit" class="btn">Sign in</button>
</form>
<h3>Inline form</h3>
<form class="form-inline">
<label for="account">Account #<small class="form-label--additional">(Cannot Change)</small></label>
<input class="text-input" id="account" type="num" value="123456789" readonly>
<label for="email">Email</label>
<input class="text-input" id="email" type="email" placeholder="Email">
<label for="password">Password</label>
<input class="text-input" id="password" type="password" placeholder="Password" disabled>
<label for="gender">Gender</label>
<select id="gender">
<option>Female</option>
<option>Male</option>
<option>Other</option>
</select>
<label>Introduce yourself</label>
<textarea></textarea>
<label for="newsletter">
<input id="newsletter" type="checkbox"> Send me the newsletter
</label>
<button type="submit" class="btn">Sign in</button>
</form>
<h3>Inline input containers with stacked label/input</h3>
<form>
<ul class="form-list">
<li class="input-container input-container--inline">
<label for="account">Account #<small class="form-label--additional">(Cannot Change)</small></label>
<input class="text-input" id="account" type="num" value="123456789" readonly>
</li>
<li class="input-container input-container--inline">
<label for="email">Email</label>
<input class="text-input" id="email" type="email" placeholder="Email">
<span class="helper-text">Enter your email address</span>
</li>
<li class="input-container input-container--inline">
<label for="password">Password</label>
<input class="text-input" id="password" type="password" placeholder="Password" disabled>
</li>
<li class="input-container input-container--inline">
<label for="gender">Gender</label>
<select id="gender">
<option>Female</option>
<option>Male</option>
<option>Other</option>
</select>
</li>
<li class="input-container input-container--inline">
<label>Introduce yourself</label>
<textarea></textarea>
</li>
</li>
<li class="input-container input-container--inline">
<label for="newsletter">
<input id="newsletter" type="checkbox"> Send me the newsletter
</label>
</li>
<li class="input-container input-container--inline">
<button type="submit" class="btn">Sign in</button>
</li>
</ul>
</form>
</main>
</body>
</html>