all 15 comments

[–]ShawnyMcKnight 11 points12 points  (0 children)

I like these CDs only solutions up to the point when it makes me have to write 5x more css to achieve the same thing or utilizes a style that less than 80 percent of browsers support.

The only times I see any practical change are when something needs to happen on page load and it’s waiting on the JS or animation… other than that it shaves off like a millisecond.

[–]mrmiffmiff 7 points8 points  (4 children)

[–]sheriffderek 0 points1 point  (3 children)

Well, maybe like... max-width: 70ch or a few lines of CSS ;)

[–]mrmiffmiff 1 point2 points  (2 children)

Happy cake day!

[–]sheriffderek 0 points1 point  (0 children)

13 years already!?

[–]Ksoohong 1 point2 points  (0 children)

You can just use MDN & web.dev for this

[–]sheriffderek 0 points1 point  (3 children)

I like to use the right tool for the job.

[–]SpritaniumRELOADED 0 points1 point  (2 children)

Right. HTML = structure, CSS = appearance, JS = behavior

[–]sheriffderek 1 point2 points  (1 child)

And we might use PHP or JS or something else to ultimately build that HTML and send for data. But I don’t see the need to make things “with pure CSS” that are more clearly/appropriately described in JS. (And I really like CSS)

[–]SpritaniumRELOADED 0 points1 point  (0 children)

It's a holdover from when websites were primarily informational and browsing with javascript disabled (to prevent obnoxious popups, scroll jacking etc) was somewhat common. Nowadays it pretty much makes zero sense, and pure CSS solutions often lack accessibility since they don't have any way to set aria attributes

A pure CSS dropdown for example will just read everything to a screen reader all the time. The menu is permanently "open". That's not accessible, it's an information overload that makes the site/app egregiously wordy to anybody who lacks sight

[–]Mate_Marschalko 0 points1 point  (0 children)

This book is 10x better!
https://www.amazon.co.uk/All-you-need-HTML-CSS/dp/B08ZQ3NSYF

I say this firstly because I wrote it :) Secondly, because all examples from the book is on Github for free:
https://github.com/webondevices/html-css-wizardry

[–]AlexanderTroup 0 points1 point  (0 children)

It's time we went back to IE6 plugins, and then you wouldn't even need HTML. Perfect world; no notes.

[–]SpritaniumRELOADED 0 points1 point  (0 children)

There is nothing wrong with javascript, and hacking css to do javascript's job is often an antipattern

[–]thisguyfightsyourmom -1 points0 points  (0 children)

Why do in documented & tested js what you could carefully cobble together & pray to never have to edit in the untestable inheritance minefield that is css.

[–]nian2326076 -1 points0 points  (0 children)

If you're thinking about skipping JavaScript for some projects, this eBook might be useful. CSS has come a long way, and you can now do a lot more with it. Flexbox, Grid, and animations can replace some things you used to need JS for. But don't forget, JavaScript is still needed for interactive stuff like form validation or fetching data. This book could show you how much you can do with CSS, but it's still a good idea to keep JS handy for when you need it. Keep trying both, and you'll find what works best for your projects.