Comment

Comment by deckiedan

I think the specific problem of CSS & JS (rather than the more interesting 'separation of concerns' conversation) is partly due to CSS itself not being fully separatable.

It's used for style & design, but also for functionality. In some ways, ideally, function related CSS would be stored with the module, but site-level design CSS would be separate.

Additionally, CSS by design has greedy selectors. If I put in a:

   a { text-decoration: none; border-bottom: 1px solid pink;}
in my site.css, it will muck up any components which use an <a> tag, but don't specifically re-write the border.

Are there good solutions to this?

I kind of feel in some ways, with SPAs and web apps being a thing rather than simple pages, we need a new way of defining styling, which then compiles to CSS, figuring out the correct over-rides along the way.

parent deckiedan 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton