News for hackers. Stuff that matters.
Re:Tasks That Can Be Done with Pure HTML and CSS by TeMPOraL on Monday February 11, 2019 @09:46AM (#19134789)
> What a lot of developers need to understand is that HTML shouldn't be use for layout. HTML should be use for semantic and information structure.

That was the great lie of the 2000s. It was oft repeated, but almost never adhered to. CSS Zen Garden was cool, but the typical attempt at "separating content from presentation" almost universally resulted in a div soup that was even worse than table layouts. If a div exists only to hang a class off it, so that it can be targeted in CSS, it's a part of layout, not semantic/information structure.

In a perfect world, in which most websites were not actively user-hostile, we could have separation of layout from content. It would include relinquishing control over rendering back to the users. It would require to stop obsessing so much over colors and layouts and custom controls. The very concept is anathema to the modern web, though.

Re:Tasks That Can Be Done with Pure HTML and CSS by dmix on Monday February 11, 2019 @12:24PM (#19136163)
> If a div exists only to hang a class off it, so that it can be targeted in CSS, it's a part of layout, not semantic/information structure.

Thanks, I've always thought this intuitively but never seen it written out.

Just as any academic theory hitting the reality through actual implementation, the theory should be more of a guiding force instead of a rigid structure to follow.

Much like how the military learned to plan battles (No battle plan ever survives contact with the enemy - Helmuth von Moltke the Elder) by giving troops higher-level objectives, rather than planning every single step of the attack, such as exactly where they should walk and hide, and expecting them to follow it to a T.

This is how I approach most programming/web design theories... including BEM.

Re:Tasks That Can Be Done with Pure HTML and CSS by Domenic_S on Tuesday February 12, 2019 @03:56PM (#19147406)
> div soup

At my last job we called it "divarrhea"