Closed bhardin closed 8 years ago
From my point of view, you should not style directly on element names. If so, your code becomes less flexible. If you apply styles using classes, you'll be free to apply any style to any element.
Imagine you have an <h2 class="text-medium">whatever</h2>
, and you need to style it as a very big text. But you don't want to change the SEO structure. Simply replace like this: <h2 class="text-big">whatever</h2>
.
If you don't develop like that that, you'll be forced to replace the h2
for an h1
, which is not always interesting.
Anyways, maybe there are some exceptions. There are alot of ways to develop, but we found this one very useful.
Yeah. That makes sense. I didn't know the design pattern reasoning. I appreciate your explanation, but unfortunately, I will not be able to use this library with Jekyll since when the markdown is converted to HTML it doesn't add class structure around element tags. :(
@bhardin More info (and better explained!): http://cssguidelin.es/#css-selectors
I apologize if this is a fairly neophyte question. But it's hard to keep up with speed at which CSS stuff moves. What is the decision for only using class names for styling and not element names?
For instance,
<h2>Heading</h2>
will not be styled while<h2 class="text-big">Heading</h2>
will be.I attempted to use Sierra on jekyll and can't due to this constraint.