Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Question about a Framework I am working on.

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #43116
    fuqlibs
    Member

    I know by defining elements for list items and links below are not only more pure oocss because you are not relying on elements, but it is also faster to read by selector engines. I would like to put out a github of a framework I am working on, but want to know how much of a pain it would be for people to define things this way.

    I know inuit.css and bootstrap style li’s and a’s making it less typing – but I don’t think it is a good way of doing it.

    #126808
    Alen
    Participant

    This is not OOCSS. It’s just bad semantics.

    #126942
    fuqlibs
    Member

    I’m sorry for sounding harsh, but you do not know what you are talking about. It is good semantics based on the B.E.M naming convention and name-based scoping rules. “Elements” are not scoped to a tag but a Block in B.E.M. Semantics do not live inside the tags alone.

    Like I mentioned, selector engines read selectors from right to left. It would have to evaluate all the li and a tags. The class name soup you see on the li’s is how you define an element of the nav block. It is tag independent. This means the same code could be written in an ol, ul, dl, div, or any other block tag.

    The only disadvantage I see is having developers painfully define the elements of the nav objects block. For me its worth the payoff to keep it more pure.

    #126949
    fuqlibs
    Member

    I wanted to add that the popular .media object by Nicole Sullivan that popularized these principles RARELY scope to a tag, but warned against the practice.

    Otherwise it would look like this:

    .media
    {
    }

    .media img (instead of .media__body or .media .image)
    {
    }

    .media div (instead of .media__body or .media .body)
    {
    }

    It would mean that you HAD to use a div for the body, which she knew is wrong.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.