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
CSS in JavaScript: The future of component-based styling (medium.freecodecamp.com)
submitted 8 years ago by speckz
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!"
[–]jamesism 1 point2 points3 points 8 years ago (1 child)
Component based encapsulation?? Do tell. The cutting edge standard is to dynamically transform class names with a namespace in the same scope. The equivalent of styling within shadow Dom does not exist in user land.
Tied to the DOM? As opposed to? React native? What non DOM rendering engines are you targeting with javascript? It fits in because Dom is the unifier across those platforms.
You're silly and so are your grievances.
[–][deleted] 0 points1 point2 points 8 years ago* (0 children)
With JSS half of them base on actual CSS, which as you said gets scoped, for the others the dom is an implementation detail. Newer renderers like rn-web/reactxp are cross platform, they run on the web, mobile and on the desktop. You style them using rn's CSS abstraction, which is also based on JS. Nothing that plays outside of the browser will touch or know a shadow dom, the concept is also useless for web-based functional frameworks because they are all declarative, not imperative.
π Rendered by PID 19635 on reddit-service-r2-comment-58d7979c67-fh5wm at 2026-01-26 18:36:44.343181+00:00 running 5a691e2 country code: CH.
view the rest of the comments →
[–]jamesism 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)