Last active
April 23, 2019 13:46
-
-
Save codegino/2b9d6957cc757eef9eeb516347377b12 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const css: any = []; | |
for (let i = 0; i < document.styleSheets.length; i += 1) { | |
try { | |
const sheet: any = document.styleSheets[i]; | |
const rules = ('cssRules' in sheet) ? sheet.cssRules : sheet.rules; | |
for (let j = 0; j < rules.length; j += 1) { | |
const rule: any = rules[j]; | |
if ('cssText' in rule) { css.push(rule.cssText); } else { css.push(`${rule.selectorText} {\n${rule.style.cssText}\n}\n`); } | |
} | |
} catch (error) { | |
console.log(error); | |
} | |
} | |
const a = css.join('\n').replace(/\s/g, ''); | |
console.log('CSS', a); | |
return a; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.developerdrive.com/2017/07/creating-a-data-table-in-vue-js/ | |
{ | |
"editor.tabSize": 2, | |
"window.zoomLevel": 0, | |
"javascript.format.insertSpaceBeforeFunctionParenthesis": true, | |
"eslint.validate": [ | |
{ | |
"language": "vue", | |
"autoFix": true | |
}, | |
{ | |
"language": "javascript", | |
"autoFix": true | |
}, | |
], | |
"eslint.autoFixOnSave": true, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment