Flat css classes to support utility class naming conventions.

I would really like to be able to create reusable classes that I can use on multiple elements in order to limit css file size.

For instance, it would be awesome to be able to add a mg-bottom-10 class to an element in order to give it a margin bottom of 10 but also be able to add a padding-left-10 class to it to give it padding on the left.

If I wanted to add just the padding to another element, then I would just add padding-left-10.

A ton of my classes are really for this type of purpose, but with nested css like Webflow builds it is impossible to create high-purpose css classes.

An example of a framework that uses this kind of class naming system is Tailwind CSS, and Bootstrap uses this as well with Bootstrap 4.

  • Christopher Wray
  • Jun 2 2020
  • Already exists
  • Arron Hunt commented
    June 19, 2020 22:07

    Christopher you commented that it exists, do you have any resources? I was just about to post this as a wishlist item

  • Christopher Wray commented
    June 02, 2020 20:25

    Looks like this already exists! I can't delete this idea, but it is possible to do this.

  • +2