packagephobia icon indicating copy to clipboard operation
packagephobia copied to clipboard

Move CSS in head

Open XhmikosR opened this issue 6 years ago • 3 comments

This should allow us to make further optimizations (autoprefixer, minification etc).

Also, we could try moving the results CSS to a separate file so that it's cached, and keep the index page CSS inlined.

Just thinking out loud BTW :)

Another gain will be that we'll have one place to handle the CSS (minus the bars height/width and any other inline styles that cannot be moved of course)

XhmikosR avatar Nov 13 '19 14:11 XhmikosR

Hi! I also think that types of style should be unified. What about solutions such as Styled Components?

JB1905 avatar Nov 13 '19 20:11 JB1905

Does it work with TypeScript? I want to catch typos in styles.

styfle avatar Nov 13 '19 21:11 styfle

Does it work with TypeScript? I want to catch typos in styles.

It works only with props passed to styled component. https://www.styled-components.com/docs/api#typescript

However, there is available stylelint extension for Styled Components

JB1905 avatar Nov 13 '19 21:11 JB1905