OLD | NEW |
| (Empty) |
1 SKY MODULE - exports some basic HTML-like elements | |
2 <import src="element.sky"/> | |
3 | |
4 <!-- note: accessibility handling is not implemented yet, because the | |
5 mojo ax service isn't yet ready --> | |
6 | |
7 <import src="scrollable-block.sky"> | |
8 <element name=html> | |
9 <style> | |
10 :host { display: scrollable-block; } | |
11 </style> | |
12 </element> | |
13 | |
14 <element name=head /> | |
15 <element name=body /> | |
16 <element name=p /> | |
17 | |
18 <element name=h1> | |
19 <style> | |
20 :host { margin-top: 0.67em; margin-bottom: 0.67em; font-size: 2.00em; font-wei
ght: bold; } | |
21 </style> | |
22 </element> | |
23 | |
24 <element name=h2> | |
25 <style> | |
26 :host { margin-top: 0.83em; margin-bottom: 0.83em; font-size: 1.50em; font-wei
ght: bold; } | |
27 </style> | |
28 </element> | |
29 | |
30 <element name=h3> | |
31 <style> | |
32 :host { margin-top: 1.00em; margin-bottom: 1.00em; font-size: 1.17em; font-wei
ght: bold; } | |
33 </style> | |
34 </element> | |
35 | |
36 <element name=h4> | |
37 <style> | |
38 :host { margin-top: 1.33em; margin-bottom: 1.33em; font-size: 1.00em; font-wei
ght: bold; } | |
39 </style> | |
40 </element> | |
41 | |
42 <element name=h5> | |
43 <style> | |
44 :host { margin-top: 1.67em; margin-bottom: 1.67em; font-size: 0.83em; font-wei
ght: bold; } | |
45 </style> | |
46 </element> | |
47 | |
48 <element name=h6> | |
49 <style> | |
50 :host { margin-top: 2.33em; margin-bottom: 2.33em; font-size: 0.67em; font-wei
ght: bold; } | |
51 </style> | |
52 </element> | |
53 | |
54 <element name=b> | |
55 <style> | |
56 :host { font-weight: bold; } | |
57 </style> | |
58 </element> | |
59 | |
60 <element name=data> | |
61 <script> | |
62 module.currentScript.parentNode.setPrototype({ | |
63 get value () { | |
64 return this.getAttribute('value'); | |
65 }, | |
66 set value (newValue) { | |
67 this.setAttribute('value', newValue); | |
68 }, | |
69 }); | |
70 </script> | |
71 </element> | |
72 | |
73 <element name=progress> | |
74 <template> | |
75 <div> ... </div> | |
76 </template> | |
77 <script> | |
78 module.currentScript.parentNode.setPrototype({ | |
79 ... | |
80 }); | |
81 </script> | |
82 </element> | |
83 | |
84 <element name=details> | |
85 <style> | |
86 :host { display: block; } | |
87 .outer { border: solid; } | |
88 .header { display: inline; } | |
89 .summary { display: inline; } | |
90 </style> | |
91 <template> | |
92 <div class="outer"> | |
93 <div class="header"> | |
94 <div class="button">OPEN</div> | |
95 <div class="summary"><content select="summary"/></div> | |
96 </div> | |
97 <div class="contents"> | |
98 <content/> | |
99 </div> | |
100 </div> | |
101 </template> | |
102 <script> | |
103 module.currentScript.parentNode.setPrototype({ | |
104 init: function () { | |
105 | |
106 }, | |
107 open() { | |
108 | |
109 } | |
110 }); | |
111 </script> | |
112 </element> | |
OLD | NEW |