4 ms·
This is a great tutorial, but why obfuscate the CSS as SCSS? In most cases here there’s essentially nothing gained.
by indubitably 10y ago
This is a great tutorial, but why obfuscate the CSS as SCSS? In most cases here there’s essentially nothing gained.
- bobwaycott 10y agoHow exactly is SCSS an obfuscation of CSS?
- indubitably 10y agoSince you _italicized_ I guess I better answer! The tutorial is ostensibly about flexbox, not about CSS precompilation. So, if the you happen not to know SCSS, then it’s obfuscated. Er, then it’s _obfuscated_.
- bobwaycott 10y agoExcept it's not, because even though SCSS may alter the presentation of some of the rules, it does not render them unintelligible to the reader. My italics were to call out you specifically saying SCSS was obfuscating the CSS, when it isn't. None of the styles rules shown are made incomprehensible to the reader.
- davegauer 10y ago'Obfuscation' might be taking it a bit far, but demonstrating a CSS feature in anything other than vanilla CSS is, in my opinion, a really poor choice. It's like having an explanation of a JavaScript feature...in TypeScript.
- bobwaycott 10y agoI'll happily agree. I was only pointing out that obfuscation of CSS was not happening.
- simonw 10y ago& + & { margin-left: 5px; }
- bobwaycott 10y agoAlright, a fair enough example of making this rule confusing for someone who doesn't know SCSS to immediately intuit what element this rule is being applied to. But that still doesn't mean the CSS rule itself is obfuscated (anyone familiar with CSS will know this is applying a left margin of 5px to something). Far different from, say, something like: wsze2NfA3sjX0eKampvYIZbUISElk+AhNvIs2iYnISsh/fP1MjvHODcrODXA68T5xgcMyDAwPwQ5DQ8WDAfNBAkLFxPYwwsfCwge That is obfuscated CSS.
- indubitably 10y agoI get it, you don’t like my choice of adjective.
- bobwaycott 10y agoNot quite. Obfuscation means something, particularly within the realm of software development. It's not like you chose a synonym, and I'm over here being an asshole, pedantically quibbling over why my choice of synonym is the better choice. Obfuscating something in code means rendering it un-parseable by humans. There's a huge difference between SCSS and obfuscated CSS.
- indubitably 10y agoChrist, I get it.
- cjcenizal 10y agoHey, author here. You make a great point. I'll update the examples to be in CSS. Thanks!