3 ms·
(In response to some of these comments) Concise, semantic markup results in: * less complexity * easier maintenance * greater portability For one
by integraton 13y ago
(In response to some of these comments)
Concise, semantic markup results in:
* less complexity
* easier maintenance
* greater portability
For one example, what happens when you want to use another grid framework instead of bootstrap's? With non-semantic markup, you have to go through and strip out all those bootstrap classes on everything. On the other hand, if you use concise, semantic HTML and Sass (or LESS, if you don't mind totally abusing at-rule syntax), all you have to do is swap out the grid mixins (or, in the case of the approach in the OP, @extends) and related styles, often with no changes to the markup. Same with any other component you might want to swap out, such as form styles.
What happens when 3 years from now someone inherits your mess of HTML with presentational styles for a framework that's years old and no longer relevant? In addition to updating the styles, they also have the pleasure of spending hours or longer stripping out your outdated, framework-specific presentational classes and ids.
What happens when you HTML needs to be consumed in an unknown, unpredictable context? Content organizations are still dealing with the fallout of having inflexible HTML and CSS that can't easily be adapted for mobile.