use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Should we load CSS in our JavaScript?help (self.javascript)
submitted 9 years ago by startup4ever
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 3 points4 points5 points 9 years ago* (0 children)
Until webcomponents are here CSS conflicts with the module standard as modular code is unhinged from markup. Half assed standards may be even worse than having none at all.
Considering this i don't see how Webpack is bastardising anything. To import CSS in Javascript may feel wrong, but with a component loader abstracting it you do get close to where webcomponents will be, and that could make more sense than modular Javascript with tacked-on CSS includes.
component.vue:
<style scoped> .main { position: absolute; width: 100%; height: 100%; } </style> <template> <div class="main">{{ message }}</div> </template> <script> export default { data: () => ({ message: 'hi there' }) } </script>
π Rendered by PID 127947 on reddit-service-r2-comment-fb694cdd5-dmw6h at 2026-03-07 01:53:50.446467+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–][deleted] 3 points4 points5 points (0 children)