This file contains hidden or 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
Array.from(document.styleSheets).reduce((acc, cssStyleSheet) => { | |
const classNamesCount = Array.from(cssStyleSheet.cssRules).reduce( | |
(count, cssRule) => { | |
if (cssRule.selectorText && cssRule.selectorText.startsWith('.')) { | |
return count + 1; | |
} | |
return count; | |
}, | |
0 | |
); |
This file contains hidden or 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
import { createGlobalStyle } from 'styled-components' | |
import 'normalize.css' | |
export const Global = createGlobalStyle` | |
body, | |
html { | |
box-sizing: border-box; | |
overflow-x: hidden; | |
} |