Utility Classes & Vars
Core Framework allows you to create utility classes and variables in all cases. Variables are automatically generated in cases where you might reuse them, such as colors, text size and spacing!
Last updated
Core Framework allows you to create utility classes and variables in all cases. Variables are automatically generated in cases where you might reuse them, such as colors, text size and spacing!
Last updated
With the flexibility of Core Framework, we offer options where you can create utility classes from variables.
In this example, the Spacing section allows you to generate 3 different sets of utility classes ranging from gap, margin, and padding:
This will automatically create utility classes using all of the variables created from the section above it. In the CSS, you will see that many new classes have been generated.
For example, .gap-m
will now have a value of var(--space-m)
applied to it. Very powerful stuff! 🔥
Creating a new group is very simple. At the bottom of the section you're in, simply click on the "Create a selector group" button. Enter a name for your group and then start adding your selectors along with the properties and values!
You may notice that adding values will bring up a list of your existing variables! 🔥
To create a new variable group, simply click on the "Create a variable group" button at the bottom right. Then, give the group a name and start adding your variables. You'll notice that your variables will always be prefixed with --.