[FEATURE REQUEST] Config to make internal styles in head AND to insert rules directly to the CSSStyleSheet
See original GitHub issueRelated issue
Issues
Issue | Effect |
---|---|
JSS doesn’t follow the exact same process to apply styles for all cases by default. At least two cases are already documented in the related issue above. | Worsens developer experience and performance |
How to solve
Set the default mode to insert style rules directly to the CSSStyleSheet using CSSStyleSheet.insertRule
- instead of doing the extra step of inlining styles to the
<head>
, making styles internal and leaving the browser to process style rules from the HTML finally applying them to the CSSStyleSheet of the StyleSheet interface.
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (11 by maintainers)
Top Results From Across the Web
Style Sheets in HTML documents - W3C
Introduction to style sheets; Adding style to HTML. Setting the default style sheet language; Inline style information; Header style information: the STYLE ......
Read more >CSSStyleSheet - Web APIs | MDN
Chrome Edge
CSSStyleSheet Full support. Chrome1. Toggle history Full support. Edge12...
CSSStyleSheet() constructor Full support. Chrome73. Toggle history Full support. Edge79...
addRule(). Deprecated Full support. Chrome1....
Read more >[4.0.1-beta] Unwanted CSSStyleSheet.insertRule behavior ...
[FEATURE REQUEST] Config to make internal styles in head AND to insert rules directly to the CSSStyleSheet cssinjs/jss#1102.
Read more >HTML Styles CSS - W3Schools
Internal - by using a <style> element in the <head> section; External - by using a <link> element to link to an external...
Read more >Inline Styles in HTML - Codecademy
Inline Style Syntax. Inline styles look and operate much like CSS, with a few differences. Inline styles directly affect the tag they are...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have been playing around with a way to render styles in dev mode over DOM API to make it visible in style tags DOM inspector and editable in styles tab. I think I have some ideas. Opening a new clean issue #1125
I put thumbs up when I understand the message. If you want to talk, ping me in dm on twitter or gitter. I honestly lost your point and at the moment don’t really know what you want.