Skip to content

Commit be54a18

Browse files
Add built files
1 parent 2dc060c commit be54a18

File tree

4 files changed

+31
-10
lines changed

4 files changed

+31
-10
lines changed

dist/css/floatl.css

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
.floatl--active .floatl__label {
66
opacity: 1;
7-
top: .35em;
7+
top: 1px;
88
}
99

1010
.floatl--active.floatl--focused .floatl__label {
@@ -14,15 +14,26 @@
1414
.floatl__label {
1515
-webkit-transition: all 175ms ease-in-out 200ms;
1616
transition: all 175ms ease-in-out 200ms;
17-
position: absolute;
18-
top: .5em;
19-
left: .5em;
2017
opacity: 0;
21-
font-size: .8em;
18+
position: absolute;
19+
display: block;
20+
top: 9px;
21+
left: 6px;
22+
padding: 4px 3px 3px 3px;
23+
font-size: 11px;
24+
line-height: 1em;
2225
font-weight: bold;
23-
color: #a8a8a8;
26+
color: #4f595f;
27+
background-color: white;
28+
background: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.95) 80%, rgba(255, 255, 255, 0) 100%);
29+
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.95) 80%, rgba(255, 255, 255, 0) 100%);
2430
}
2531

2632
.floatl__input {
27-
padding: 1.2em 0.5em 0.5em 0.5em;
33+
margin-top: 0;
34+
margin-left: 0;
35+
padding: 17px 8px 5px 8px;
36+
font-size: 15px;
37+
border: 1px solid #e6e6e6;
38+
border-radius: 3px;
2839
}

dist/css/floatl.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/floatl.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = Floatl = (function() {
1212
function Floatl(element) {
1313
this.handleChange = bind(this.handleChange, this);
1414
var event, i, len, ref;
15-
this.element = element;
15+
this.element = this.getElement(element);
1616
this.label = this.element.querySelectorAll('.floatl__label')[0];
1717
this.input = this.element.querySelectorAll('.floatl__input')[0];
1818
this.addEventListener(this.input, 'focus', (function(_this) {
@@ -32,6 +32,16 @@ module.exports = Floatl = (function() {
3232
}
3333
}
3434

35+
Floatl.prototype.getElement = function(el) {
36+
if (el.tagName != null) {
37+
return el;
38+
} else if ((typeof jQuery !== "undefined" && jQuery !== null) && el instanceof jQuery) {
39+
return el.get(0);
40+
} else {
41+
throw new TypeError(el + " 'is not a valid element. Valid options are: DOM Element, jQuery.'");
42+
}
43+
};
44+
3545
Floatl.prototype.handleChange = function(event) {
3646
if (this.input.value === '') {
3747
return this.removeClass(this.element, ACTIVE_CLASS);

dist/js/floatl.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)