Giter Site home page Giter Site logo

Class names ideas about tachyons HOT 12 CLOSED

notenociz avatar notenociz commented on May 8, 2024
Class names ideas

from tachyons.

Comments (12)

notenociz avatar notenociz commented on May 8, 2024

I'll start off I guess.

How about using the same kind of names as Emmet uses. It is a common plugin used by people who use more visual editors such as Sublime Text and has the occasional user on command-based editors like VIM (Vi Improved). Thus, it would make sense to have it.

Here is the cheat sheet which will be useful when deciding.

from tachyons.

notenociz avatar notenociz commented on May 8, 2024

And, this is a pretty good round up of naming conventions.

from tachyons.

mrzmyr avatar mrzmyr commented on May 8, 2024

tl;dr: I like the 'css-property-to-class'-API, but it should be more consistent and separated from the components.

As I came across projects from @mrmrs, I liked them for their clearness and the fact that they are principle driven. So did I with Tachyons. What made me hesitating using Tachyons were also the naming conventions and the system they are built upon.

Low level API

On the one hand there is this low-level, lets call it API, which provides a way of assigning css properties by css classes. (e.g. .pos-abs for position: aboslute).

The naming behind it makes totally sense to me and is easy to adopt. For example, if i know .pos-abs and can pretty much guess what class I can use for position: relative.

But, what breaks my head is the inconsistency.
Example: .ttc is text-transform: capitalize; where .underline just uses its value instead of the property name. I'd rather expect something like .td-u.

@enociz, I like the idea of looking into the emmet conventions for consistency. (Could be easy parsed 😁)

Components ?

On the other hand there are some kind of low level components (e.g. in _type-scale.css), a bit more high level components (_typography.css or _forms.css) that are not separated from the 'css-property-to-class'-API.

May we should checkout an idea like ITCSS (by Harry Roberts) to make the difference and separation more clear.

from tachyons.

notenociz avatar notenociz commented on May 8, 2024

Good thoughts.

@csswizardy also recently did an article but I personally feel that it is a bit complicated and doesn't apply well to the Tachyons framework.

from tachyons.

mrzmyr avatar mrzmyr commented on May 8, 2024

csswizardy maintains / consults companies with huge / complex css bases and more in a corporate field, if I got his job right. We are talking in the scope of a framework here, which is slightly different I guess.

from tachyons.

notenociz avatar notenociz commented on May 8, 2024

Agreed, however, it is still a class naming methodology and so is valuable (even if used for a reference to bigger architectures) in this discussion.

from tachyons.

mrzmyr avatar mrzmyr commented on May 8, 2024

Ture. So, what are your thoughts on the components ?

from tachyons.

mrmrs avatar mrmrs commented on May 8, 2024

I also consult companies and deal in massive css codebases. That is not the reason for differences. Just different priorities and philosophies.

Sent from my iPhone

On Aug 8, 2015, at 7:20 PM, Moritz [email protected] wrote:

Csswizardy maintains / consults companies with huge / complex css bases and more in a corporate field, if I got his job right. We are talking in the scope of a framework here, which is slightly different I guess.


Reply to this email directly or view it on GitHub.

from tachyons.

notenociz avatar notenociz commented on May 8, 2024

@mrmrs — I agree with that but forgot to mention it.

@mrzmyr — what exactly did you mean by your components things. I didn't exactly understand. Could you perhaps explain with an example?

from tachyons.

mrzmyr avatar mrzmyr commented on May 8, 2024

@enociz – The difference of the 'property to css class' declaration and the components I described above.

@mrmrs – Totally agree, I meant the priorities there. What are your thoughts about sorting out the difference between components and 'property to css class' declaration?

from tachyons.

mrmrs avatar mrmrs commented on May 8, 2024

Inconsistencies in naming patterns are in most cases a result of observing what is easiest for people to grok. Don't really understand your definition of components @mrzmyr - to me components in this architecture are composed of a number of classes and not represented by the css in anyway.

from tachyons.

notenociz avatar notenociz commented on May 8, 2024

@mrmrs — Agreed

from tachyons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.