Skip to content

Commit dfdbd60

Browse files
committed
updated to 2.0
1 parent d6961f1 commit dfdbd60

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+83
-26
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bb_input_areas",
3-
"version": "1.4",
3+
"version": "2.0",
44
"homepage": "https://github.com/buildingfirefoxos/bb_input_areas",
55
"authors": [
66
"The gaia team"

input_areas.css

100644100755
+74-24
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ input[type="tel"],
88
input[type="search"],
99
input[type="url"],
1010
input[type="number"],
11+
input[type="date"],
1112
textarea {
1213
-moz-box-sizing: border-box;
1314
display: block;
14-
overflow: hidden;
1515
width: 100%;
1616
height: 4rem;
1717
resize: none;
@@ -60,7 +60,9 @@ form p + p {
6060
}
6161

6262
form p input + button[type="reset"],
63-
form p textarea + button[type="reset"] {
63+
form p textarea + button[type="reset"],
64+
form p input + button.reset,
65+
form p textarea + button.reset {
6466
position: absolute;
6567
top: 50%;
6668
right: 0;
@@ -75,18 +77,24 @@ form p textarea + button[type="reset"] {
7577
}
7678

7779
form.skin-dark p input + button[type="reset"],
78-
form.skin-dark p textarea + button[type="reset"] {
80+
form.skin-dark p textarea + button[type="reset"],
81+
form.skin-dark p input + button.reset,
82+
form.skin-dark p textarea + button.reset {
7983
background-image: url(input_areas/images/icons/clear-dark.png);
8084
}
8185

8286
/* To avoid colission with BB butons */
8387
li input + button[type="reset"]:after,
84-
li textarea + button[type="reset"]:after {
88+
li textarea + button[type="reset"]:after,
89+
li input + button.reset:after,
90+
li textarea + button.reset:after {
8591
background: none;
8692
}
8793

8894
form p input + button[type="reset"],
89-
form p textarea + button[type="reset"] {
95+
form p textarea + button[type="reset"],
96+
form p input + button.reset,
97+
form p textarea + button.reset {
9098
top: 0;
9199
margin: 0;
92100
}
@@ -100,7 +108,9 @@ form p input:focus {
100108
}
101109

102110
form p input:focus + button[type="reset"],
103-
form p textarea:focus + button[type="reset"] {
111+
form p textarea:focus + button[type="reset"],
112+
form p input:focus + button.reset,
113+
form p textarea:focus + button.reset {
104114
opacity: 1;
105115
pointer-events: all;
106116
}
@@ -151,6 +161,7 @@ fieldset section input[type="email"],
151161
fieldset section input[type="tel"],
152162
fieldset section input[type="search"],
153163
fieldset section input[type="number"],
164+
fieldset section input[type="date"],
154165
fieldset section textarea {
155166
height: 4rem;
156167
border: none;
@@ -258,7 +269,7 @@ form[role="search"] p input:focus {
258269
padding: 0 2rem 0 0;
259270
}
260271

261-
form[role="search"] p input:invalid,
272+
form[role="search"] p input:invalid,
262273
form[role="search"] p textarea:invalid {
263274
border: none;
264275
}
@@ -278,7 +289,6 @@ form[role="search"] button.icon {
278289
url(input_areas/images/ui/background.png) repeat-x 0 100%;
279290
background-size: auto 100%;
280291
border-radius: 0;
281-
margin: 0;
282292
padding: 0;
283293
margin: 0;
284294
position: relative;
@@ -294,7 +304,8 @@ form[role="search"] button.icon:before {
294304
left: 0;
295305
}
296306

297-
form[role="search"] p button[type="reset"] {
307+
form[role="search"] p button[type="reset"],
308+
form[role="search"] p button.reset {
298309
right: 0;
299310
}
300311

@@ -310,7 +321,6 @@ form[role="search"] button[type="submit"] {
310321
line-height: 3.7rem;
311322
background: url(input_areas/images/ui/separator.png) no-repeat 0 50%;
312323
background-size: auto 100%;
313-
border-radius: 0;
314324
width: auto;
315325
border-radius: 0;
316326
margin: 0;
@@ -363,33 +373,73 @@ form button::-moz-focus-inner {
363373
* Right-to-Left layout
364374
*/
365375

366-
html[dir="rtl"] form p input:valid,
367-
html[dir="rtl"] form p input:valid:focus {
368-
padding: 0 1.2rem 0 3rem;
369-
}
370-
371376
html[dir="rtl"] form p input + button[type="reset"],
372-
html[dir="rtl"] form p textarea + button[type="reset"] {
373-
right: auto;
377+
form p textarea + button[type="reset"],
378+
html[dir="rtl"] form p input + button.reset,
379+
form p textarea + button.reset {
374380
left: 0;
381+
right: auto;
375382
}
376383

377-
html[dir="rtl"] fieldset legend.action:after {
378-
margin: 0 0.5rem 0 0;
384+
html[dir="rtl"] form p input:focus {
385+
padding-left: 3rem;
386+
padding-right: inherit;
379387
}
380388

381389
html[dir="rtl"] fieldset legend {
382-
padding: 0 1.5rem 0 0.5rem;
390+
padding-left: .5rem;
391+
padding-right: 1.5rem;
383392
}
384393

385-
html[dir="rtl"] form[role="search"] p input {
386-
padding: 0;
394+
html[dir="rtl"] fieldset section {
395+
border-left: none;
396+
border-right: 0.1rem solid #ddd;
397+
border-radius: 0.3rem 0 0 0.3rem;
398+
margin-left: auto;
399+
margin-right: 9.5rem;
400+
}
401+
402+
html[dir="rtl"] form[role="search"]:before {
403+
left: auto;
404+
right: 1rem;
405+
}
406+
407+
html[dir="rtl"] form[role="search"] p {
408+
padding-left: 1.2rem;
409+
padding-right: 3.2rem;
387410
}
388411

389412
html[dir="rtl"] form[role="search"] p input:focus {
390-
padding: 0 0 0 2rem;
413+
padding-left: 2rem;
414+
padding-right: 0;
415+
}
416+
417+
html[dir="rtl"] form[role="search"] button.icon {
418+
float: right;
419+
background-position: 0 50%, 0 100%;
391420
}
392421

393-
html[dir="rtl"] form[role="search"] button[type="submit"] + p > button {
422+
html[dir="rtl"] form[role="search"] button.icon:before {
423+
left: auto;
424+
right: 0;
425+
}
426+
427+
html[dir="rtl"] form[role="search"] p button[type="reset"],
428+
html[dir="rtl"] form[role="search"] p button.reset {
394429
left: 0;
430+
right: auto;
431+
}
432+
433+
html[dir="rtl"] form[role="search"] button[type="submit"] {
434+
float: left;
435+
background-position: 100% 50%;
436+
}
437+
438+
html[dir="rtl"] fieldset legend.action {
439+
background-position: 0 100%;
440+
}
441+
442+
html[dir="rtl"] form[role="search"] button[type="submit"][disabled],
443+
html[dir="rtl"] form[role="search"].bottom button[type="submit"] {
444+
background-position: 100% 50%, 0 100%;
395445
}
218 Bytes

input_areas/images/icons/arrow.png

100644100755
-857 Bytes

input_areas/images/icons/arrow@1.5x.png

100644100755
-885 Bytes
244 Bytes

input_areas/images/icons/arrow@2x.png

100644100755
-885 Bytes
132 Bytes
169 Bytes
245 Bytes

input_areas/images/icons/clear-dark.png

100644100755
-955 Bytes

input_areas/images/icons/clear-dark@1.5x.png

100644100755
-214 Bytes
708 Bytes

input_areas/images/icons/clear-dark@2x.png

100644100755
-2.71 KB

input_areas/images/icons/clear.png

100644100755
-1.02 KB

input_areas/images/icons/clear@1.5x.png

100644100755
-1.08 KB
903 Bytes

input_areas/images/icons/clear@2x.png

100644100755
-1.07 KB

input_areas/images/icons/search-dark.png

100644100755
-921 Bytes

input_areas/images/icons/search-dark@1.5x.png

100644100755
-1.03 KB
642 Bytes

input_areas/images/icons/search-dark@2x.png

100644100755
-1 KB

input_areas/images/icons/search.png

100644100755
-975 Bytes

input_areas/images/icons/search@1.5x.png

100644100755
-1 KB
640 Bytes

input_areas/images/icons/search@2x.png

100644100755
-1 KB

input_areas/images/ui/active.png

100644100755
-853 Bytes

input_areas/images/ui/background-dark.png

100644100755
-1 KB

input_areas/images/ui/background.png

100644100755
-858 Bytes

input_areas/images/ui/separator-dark.png

100644100755
-863 Bytes

input_areas/images/ui/separator-dark@1.5x.png

100644100755
-360 Bytes

input_areas/images/ui/separator-dark@2x.png

100644100755
-878 Bytes

input_areas/images/ui/separator.png

100644100755
-868 Bytes

input_areas/images/ui/separator@1.5x.png

100644100755
-337 Bytes

input_areas/images/ui/separator@2x.png

100644100755
-918 Bytes

input_areas/images/ui/shadow-invert.png

100644100755
-858 Bytes

input_areas/images/ui/shadow-invert@1.5x.png

100644100755
-188 Bytes

input_areas/images/ui/shadow-invert@2x.png

100644100755
-8 Bytes

input_areas/images/ui/shadow-search.png

100644100755
-856 Bytes

input_areas/images/ui/shadow-search@1.5x.png

100644100755
-192 Bytes
-88 Bytes
Binary file not shown.

input_areas/images/ui/shadow.png

100644100755
-856 Bytes

input_areas/images/ui/shadow@1.5x.png

100644100755
-187 Bytes

input_areas/images/ui/shadow@2x.png

-82 Bytes
Binary file not shown.

input_areas/index.html

100644100755
+8-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@
3535
</head>
3636

3737
<body role="application">
38+
<p dir="ltr">
39+
<label>
40+
<input type="checkbox"
41+
onchange="document.documentElement.dir = this.checked ? 'rtl' : 'ltr'">
42+
RTL mode
43+
</label>
44+
</p>
3845

3946
<h2 class="bb-docs">Default inputs</h2>
4047
<form>
@@ -131,4 +138,4 @@ <h2 class="bb-docs">Forms: Text area</h2>
131138
</form>
132139

133140
</body>
134-
</html>
141+
</html>

0 commit comments

Comments
 (0)