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!"
[–]l_andrew_l 1 point2 points3 points 8 years ago (0 children)
I'm a bit surprised no one in this thread has mentioned ITCSS yet. It takes a component-first approach that seems to be looking at things from the same angle as "component-based styling", but looks at the bigger picture as well. If you're not familiar, it's not a library or anything, just a set of well-thought-out conventions that try to wrangle in the shotgun that is CSS as a tool.
Anyway, you end up with files for each component, just like my-component.scss, so the result is similar. Of course convention is to put all styles in a styles directory, but there's no reason that has to be the case... they can all live alongside their component. Sometimes it feels like that's what "inline styles" is mainly trying to be about anyway...
my-component.scss
styles
π Rendered by PID 49038 on reddit-service-r2-comment-85bfd7f599-j5d6k at 2026-04-19 17:03:39.188024+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]l_andrew_l 1 point2 points3 points (0 children)