Jump to content

class question


jimfog

Recommended Posts

I am reading this tutorial here: http://coding.smashingmagazine.com/2013/10/21/challenging-css-best-practices-atomic-approach/

 

In a section of the article called MARKUP(there are more than one sections named MARKUO), I am talking about the one below a smashing magazine tweet.

 

In the section to which I am referring above it says

 

 

We are using five classes, none of which are related to content:

I cannot understand it. What about class Bfc Fz-s. Is in it related to content? Namely @thierrykoblentz 14 minutes ago

Link to comment
Share on other sites

I think by content/context he's saying that he is not using a complex selector to target specific relationships. He is using simple selectors. For example he is not using selectors to target img tags of a certain class that are inside a parent of a certain class. Instead he is going to use more small, simple classes and just apply more of them to elements as needed. The class attribute "Bfc Fz-s" is specifying two classes.

 

The argument is that complex selectors have created a lot of code bloat and redundancy that could be reduced if smaller, simpler classes were used. This essentially is a move toward something like inline-css, which is currently very much out of style. This approach complicates the html class attributes but simplifies the css style declarations.

Edited by davej
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...