Consider moving CSS file into JS
See original GitHub issueMoving all the CSS rules into JS to be applied at the time Terminal.open
is called would simplify use of the library and prevent people experiencing issues like this https://github.com/xtermjs/xterm.js/issues/3045. Overriding would also still be possible via !important
.
This would need some verification work after (checking VS Code still works) and documentation updates.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
The Many Ways to Include CSS in JavaScript Applications
Let us count the ways · Option 1: A dang ol' stylesheet · Option 2: CSS Modules · Option 3: CSS-in-JS.
Read more >How to load CSS files using JavaScript? - GeeksforGeeks
How to load CSS files using JavaScript? · Use document.getElementsByTagName() method to get HTML head element. · Create new link element using ...
Read more >Should CSS always precede JavaScript? - Stack Overflow
I believe that it is subjective, but I have a reason to explain you that it is better to put in CSS before...
Read more >How To Include CSS And Run JavaScript In HTML ... - YouTube
0:00 Where to enter / put / insert CSS code in HTML 0:10 Inline CSS with style attribute 1:04 user agent css stylesheet...
Read more >How to add CSS & Javascript to your HTML - YouTube
In this video, we create a starter template and link external CSS and Javascript files into our HTML file. We also look into...
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
Sounds good, let’s close this out with as designed then since we already call it out pretty prominently in the readme 👌
@Tyriar Thb I dont like this idea for a simple reason - CSS is there for styling, we should not move things that can be styled with predefined rules away from the domain, that is meant for that purpose. (I’d go a step further and actually think that terminal themes should be in CSS as well.)
If ppl have issues to get CSS correctly loaded, then either our documentation is bad in this regard, or they should learn how to correctly embed CSS. Sorry if this sounds harsh, but for me moving away from CSS and doing everything in JS is a clear antipattern.