source: imaps-frontend/node_modules/nano-css/addon/styled.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 2.2 KB
Line 
1'use strict';
2
3var tags = [
4 'a',
5 'abbr',
6 'address',
7 'area',
8 'article',
9 'aside',
10 'audio',
11 'b',
12 'base',
13 'bdi',
14 'bdo',
15 'big',
16 'blockquote',
17 'body',
18 'br',
19 'button',
20 'canvas',
21 'caption',
22 'cite',
23 'code',
24 'col',
25 'colgroup',
26 'data',
27 'datalist',
28 'dd',
29 'del',
30 'details',
31 'dfn',
32 'dialog',
33 'div',
34 'dl',
35 'dt',
36 'em',
37 'embed',
38 'fieldset',
39 'figcaption',
40 'figure',
41 'footer',
42 'form',
43 'h1',
44 'h2',
45 'h3',
46 'h4',
47 'h5',
48 'h6',
49 'head',
50 'header',
51 'hgroup',
52 'hr',
53 'html',
54 'i',
55 'iframe',
56 'img',
57 'input',
58 'ins',
59 'kbd',
60 'keygen',
61 'label',
62 'legend',
63 'li',
64 'link',
65 'main',
66 'map',
67 'mark',
68 'marquee',
69 'menu',
70 'menuitem',
71 'meta',
72 'meter',
73 'nav',
74 'noscript',
75 'object',
76 'ol',
77 'optgroup',
78 'option',
79 'output',
80 'p',
81 'param',
82 'picture',
83 'pre',
84 'progress',
85 'q',
86 'rp',
87 'rt',
88 'ruby',
89 's',
90 'samp',
91 'script',
92 'section',
93 'select',
94 'small',
95 'source',
96 'span',
97 'strong',
98 'style',
99 'sub',
100 'summary',
101 'sup',
102 'table',
103 'tbody',
104 'td',
105 'textarea',
106 'tfoot',
107 'th',
108 'thead',
109 'time',
110 'title',
111 'tr',
112 'track',
113 'u',
114 'ul',
115 'var',
116 'video',
117 'wbr',
118
119 // SVG
120 'circle',
121 'clipPath',
122 'defs',
123 'ellipse',
124 'foreignObject',
125 'g',
126 'image',
127 'line',
128 'linearGradient',
129 'mask',
130 'path',
131 'pattern',
132 'polygon',
133 'polyline',
134 'radialGradient',
135 'rect',
136 'stop',
137 'svg',
138 'text',
139 'tspan',
140];
141
142exports.addon = function (renderer) {
143 if (process.env.NODE_ENV !== 'production') {
144 require('./__dev__/warnOnMissingDependencies')('styled', renderer, ['style']);
145 }
146
147 var styled = function (tag) {
148 return function (styles, dynamicTemplate, block) {
149 return renderer.style(tag, styles, dynamicTemplate, block);
150 };
151 };
152
153 var tag;
154
155 for (var i = 0; i < tags.length; i++) {
156 tag = tags[i];
157 styled[tag] = styled(tag);
158 }
159
160 renderer.styled = styled;
161};
Note: See TracBrowser for help on using the repository browser.