Comments on: “If” CSS Gets Inline Conditionals https://css-tricks.com/if-css-gets-inline-conditionals/ Tips, Tricks, and Techniques on using Cascading Style Sheets. Sat, 03 Aug 2024 15:50:55 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: Daniel Schwarz https://css-tricks.com/if-css-gets-inline-conditionals/#comment-1861783 Sat, 03 Aug 2024 15:50:55 +0000 https://css-tricks.com/?p=379002#comment-1861783 Please.

]]>
By: Murray Chapman https://css-tricks.com/if-css-gets-inline-conditionals/#comment-1853096 Mon, 29 Jul 2024 00:10:29 +0000 https://css-tricks.com/?p=379002#comment-1853096 I feel like I need a cold shower after reading this article. The possiblities are mind blowing. There goes my sleep.

]]>
By: kartofelek007 https://css-tricks.com/if-css-gets-inline-conditionals/#comment-1849899 Tue, 23 Jul 2024 19:18:19 +0000 https://css-tricks.com/?p=379002#comment-1849899 CSS is becoming less and less unintuitive. If a few years ago people who knew CSS well could be enumerated on the fingers of one, max two hands. Now you can even assume that there is no such person.
They mix up the syntax terribly. Don’t tell me that this is readable code: https://codepen.io/t_afif/pen/vYweZQa

]]>
By: Mirko https://css-tricks.com/if-css-gets-inline-conditionals/#comment-1845665 Fri, 12 Jul 2024 10:37:47 +0000 https://css-tricks.com/?p=379002#comment-1845665 Some other comments cover almost everything I hate about working in this field. They are shortsighted, opinionated, solely based upon one’s very own needs and some are even hostile against others.

Have you even tried to look at it from other viewpoints? Have you tried to find practical use-cases for it outside your current bubble? One of the benefits could well be to finally not be dependent on certain types of CSS/JS frameworks anymore. It could be the next step towards a vanilla web development. Towards easier to implement styled web components. Towards easy to set up, fully customizable theming. Towards even more DRY, compact CSS.

Honestly, I see a lot more pros than cons. My cons being more on the side of performance and syntax. But those are exactly the things the working group is for, to either sort those out or say “nah, not worth the effort”.

Those comments look like hasty calls for stagnation; change isn’t welcome. Would this mindset be prevalent, we would still be sitting in front of CRTs, use the bgcolor attribute and do table layouts like in the late 1990s, early 2000s. Ah, strike that! We would probably still paint cave walls with ochre paints.

Also, in regard to the hostile comment mentioned above: Calling others idiots, arseholes or dumb. Really? Someone’s in need for self validation here?

]]>
By: Kev Bonett https://css-tricks.com/if-css-gets-inline-conditionals/#comment-1843661 Thu, 11 Jul 2024 07:29:54 +0000 https://css-tricks.com/?p=379002#comment-1843661 My brain hurts!

However, I’ve used conditionals in my Sass code for years. For example, passing args into mixins, and testing for their values.

Hopefully this native behaviour will become a reality one day… but without creating some sort of “Frankenstein” syntax to achieve it.

]]>
By: Bitten https://css-tricks.com/if-css-gets-inline-conditionals/#comment-1843403 Thu, 11 Jul 2024 02:57:04 +0000 https://css-tricks.com/?p=379002#comment-1843403 In reply to Solomon.

Agree with all comments, utterly strange hype for a completely pointless abstraction.

What pray tell will set the success variable value true or false?

Yeah the same code that worked to toggle a classname or conditionally alter the styles currently.

All this does is confuse devs on where to look if bugs occur since functionality could be in css or code now.

It also will make testing functionality just a tad more difficult.

]]>
By: Novembrine https://css-tricks.com/if-css-gets-inline-conditionals/#comment-1843171 Wed, 10 Jul 2024 16:22:59 +0000 https://css-tricks.com/?p=379002#comment-1843171 In reply to Dallas Ransom.

It has been done https://dev.to/thormeier/dont-try-this-at-home-css-as-the-backend-what-3oih

]]>
By: Solomon https://css-tricks.com/if-css-gets-inline-conditionals/#comment-1843166 Wed, 10 Jul 2024 07:23:32 +0000 https://css-tricks.com/?p=379002#comment-1843166 I hand never needed to use if conditions in css. I think this goes against what css is meant for, which is a cascading stylesheet… cascading being the key weird here. This is further complicating a simple and beauty language into something it’s not meant to be. KISS

]]>
By: Dallas Ransom https://css-tricks.com/if-css-gets-inline-conditionals/#comment-1843165 Wed, 10 Jul 2024 00:41:28 +0000 https://css-tricks.com/?p=379002#comment-1843165 Apart from not needing anything like this, this will be a terrible day for CSS if it gets implemented. The good thing about CSS is that it’s still relatively unscathed by idiot programmer influences – but adding this will open the floodgates to all sorts of dumb stuff.

The next thing you know some arsehole will code a web server out of CSS and this will usher in a new era of super abstracted, inscrutable UI frameworks that will require a some kind of node extension to run and will require a web server restart everytime you make a change, further preventing devs from actually learning CSS.

If there’s a developer out there that actually thinks this is a win for CSS then they probably shouldn’t be writing CSS. Stick to Java or C because you wouldn’t know how to code layout if your life depended on it.

]]>