Usage
Color variables
If you're install via npm or yarn and using
This is an example of how to use the default variables, just choose a color and you're done.
Custom variables
You can declare your own color variables using existing variables or using different color codes.
@c-grey-light: @c-grey-300;
@c-grey: @c-grey-500;
@c-grey-dark: @c-grey-700;
// Or
@c-grey-light: #F5F5F5;
@c-grey: #BDBDBD;
@c-grey-dark: #757575;
.container {
background-color: @c-grey-light;
color: @c-grey-dark;
}
$c-grey-light: $c-grey-300;
$c-grey: $c-grey-500;
$c-grey-dark: $c-grey-700;
// Or
$c-grey-light: #F5F5F5;
$c-grey: #BDBDBD;
$c-grey-dark: #757575;
.container {
background-color: $c-grey-light;
color: $c-grey-dark;
}
Color classes
These classes are in the final css so you can use them even if you only included the CDN.
If you want to have the color palette directly in your html, Shido has two prefixes that you can use:
<div class="bg-teal-500 x:pad-all-5">
<p class="c-cyan-50 x:center">Hello world</p>
</div>
Hello world
Custom classes
The following mixins are always available in shido. You don't need to include the color file to be able to use them.
You can generate your own kinds of colors and backgrounds using the color mixin, just choose a color and the class name.
<div class="bg-my-custom-background">
<p class="c-my-custom-color">Hello world</p>
</div>
You can also generate both classes at the same time using the following mixin.
<div class="bg-my-custom-bg-and-color">
<p class="c-my-custom-bg-and-color">Hello world</p>
</div>
Color links
You can define another link color with the color classes, this will not affect the hover state.
<a href="#">Default link</a>
<a href="#" class="c-green-500">Green link</a>
<a href="#" class="c-purple-500">Purple link</a>