-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwc-polymer-textbox.html
63 lines (56 loc) · 1.98 KB
/
wc-polymer-textbox.html
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
<!-- Imports polymer -->
<link rel="import" href="../polymer/polymer.html">
<!-- Defines element markup -->
<dom-module id="wc-polymer-textbox">
<template>
<!-- Scoped styles -->
<style>
:host[type="text"] {
position : relative;
max-width: 530px;
width: 100%;
padding: 12px 14px 12px 7px;
border: 1px solid red;
box-sizing: border-box;
border-radius: 6px;
line-height: normal;
font-family: AvenirLTStd-Roman;
font-size::host(x-foo:host)14px;
font-style:normal;
font-variant:normal;
font-weight:normal;
color:rgb(75, 75, 75);
@apply(--wc-polymer-textbox);
}
@media only screen and (max-width: 914px) {
:host[type="text"] {
max-width: 100%;
@apply(--wc-polymer-textbox-rwd);
}
}
</style>
</template>
</dom-module>
<!-- Registers custom element -->
<script>
Polymer({
is: 'wc-polymer-textbox',
extends: 'input',
/* Fires when an instance of the element is created
but before property values are set and local DOM is initialized
Called only one time*/
created: function() {},
/* Fires when the local DOM has been fully prepared
Called after property values are set and local DOM is initialized
Called only one time */
ready: function() {},
/* Fires when the element was inserted into the document
Can be called multiple times during the lifetime of an element*/
attached: function() {},
/* Fires when the element was removed from the document
Can be called multiple times during the lifetime of an element */
detached: function() {},
// Fires when an attribute was added, removed, or updated
attributeChanged: function(attr, oldVal, newVal) {}
});
</script>