5 ms·
The only thing I still couldn't live without is nested selectors. Writing maintainable CSS at scale is impossible without them. I really wonder why they haven't
by _bxg1 8y ago
The only thing I still couldn't live without is nested selectors. Writing maintainable CSS at scale is impossible without them. I really wonder why they haven't been made native yet.
- digianarchist 8y agoPostCSS [0] can do this and is far easier to install. https://github.com/postcss/postcss-nested https://github.com/postcss/postcss-nested
- _bxg1 8y agoNot sure how the install could be easier than "get a single command line tool and run it against your root source file". If you're talking about the Ruby version, node-sass doesn't require any of those extra steps
- digianarchist 8y agoHave you ever tried to get libsass installed on a CI server? Painful.
- _bxg1 8y agoNope, though you're generally supposed to use a project that uses libsass (of which there are many), not use it directly. If the issue is the binary itself, then maybe the Ruby version is what you want after all.
- digianarchist 8y agoThat's not the point. Installing via a library is actually worse. NPM will bypass proxy settings via the postinstall script. My point is that the libsass library should be ported to WASM to ease the installation in a CI environment.
- BigJono 8y ago> The only thing I still couldn't live without is nested selectors. Writing maintainable CSS at scale is impossible without them. Bullshit.
- _bxg1 8y agoUm, okay. You raise a compelling point.
- BigJono 8y agoSorry, I'll elaborate. These kind of sweeping statements are usually pretty obviously false. You can write anything cleanly at scale. Those MS-DOS sources that were released a while back are pleasant enough to read despite being in assembly.
- _bxg1 8y agoThe implied meaning of "impossible" in this kind of context is "unreasonably difficult". Just as it would be unreasonably difficult to write modern Windows in assembly, it would be unreasonably difficult to maintain a large CSS codebase without nested selectors.
- lyjackal 8y agoYou make a good point. CSS to SCSS doesn't seem like that big of a step up though. I don't really think nesting is really the greatest solution to the problem. It's got priority caveats over BEM, and can cause messes of it's own when used without precision.
- djrobstep 8y ago"This hard and annoying thing you experience isn't really hard and annoying, and you should learn to do it the hard and annoying way. It really isn't hard and annoying, and if it is, I like it being hard and annoying anyway. I had to learn it the hard and annoying way, so why shouldn't the kids?" This attitude is strangely pervasive on Hacker News, and it's very annoying. Last time I posted about database migrations (a topic I've written fairly popular tools for and presented on) I was confidently told by a commenter: "Database migrations aren't hard. Simply write change scripts manually and apply them."