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:
444 bytes
|
Line | |
---|
1 | import cssifyDeclaration from './cssifyDeclaration';
|
---|
2 | export default function cssifyObject(style) {
|
---|
3 | var css = '';
|
---|
4 |
|
---|
5 | for (var property in style) {
|
---|
6 | var value = style[property];
|
---|
7 |
|
---|
8 | if (typeof value !== 'string' && typeof value !== 'number') {
|
---|
9 | continue;
|
---|
10 | } // prevents the semicolon after
|
---|
11 | // the last rule declaration
|
---|
12 |
|
---|
13 |
|
---|
14 | if (css) {
|
---|
15 | css += ';';
|
---|
16 | }
|
---|
17 |
|
---|
18 | css += cssifyDeclaration(property, value);
|
---|
19 | }
|
---|
20 |
|
---|
21 | return css;
|
---|
22 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.