Hacker News new | ask | show | jobs
by Theodores 2671 days ago
Flexbox is old hat, use your favourite search engine to see how easily it is done with CSS Grid - grid not flexbox.

You can nit pick on any example tutorial but do the research and you will find it all works great with CSS grid, you just might have to learn how it works rather than copy and paste.

The class bloat is another problem with div soup, also sometimes you need to put aside the mentality that everything has to be sooo complex, simplicity is hard, anyone can make everything complex and buy into the myth that everything has to be complex.

There is always a better element than 'div', the exception to the rule is where you need something that would have been an 'object', e.g. a Google 'recaptcha' needs a 'div'.

The same goes for 'span', unless you really need to change the colour of the second letter of a word there is always a better way, e.g. psuedo elements.

1 comments

> There is always a better element than 'div'

Please show me a better element for “a card to display an image and text”.

It would also be nice if that element used CSS grid.