components
1 week ago
styles
1 week ago
edit.js
1 week ago
index.js
1 week ago
index.php
1 week ago
tb_generatecss.js
1 week ago
tb_styling.js
1 week ago
tb_generatecss.js
30 lines
| 1 | function tb_generateCSS ( selectors, id, isResponsive = false, responsiveType = "" ) { |
| 2 | |
| 3 | var tb_styling_css = "" |
| 4 | |
| 5 | for( var i in selectors ) { |
| 6 | |
| 7 | tb_styling_css += id |
| 8 | |
| 9 | tb_styling_css += i + " { " |
| 10 | |
| 11 | var sel = selectors[i] |
| 12 | var css = "" |
| 13 | |
| 14 | for( var j in sel ) { |
| 15 | |
| 16 | css += j + ": " + sel[j] + ";" |
| 17 | } |
| 18 | |
| 19 | tb_styling_css += css + " } " |
| 20 | } |
| 21 | |
| 22 | // if ( isResponsive ) { |
| 23 | // styling_css += " }" |
| 24 | // } |
| 25 | |
| 26 | return tb_styling_css |
| 27 | } |
| 28 | |
| 29 | export default tb_generateCSS |
| 30 |