tgoop.com/codingWithElias/426
Last Update:
3. Mixins
In this example, we define a mixin called button-styles that takes two arguments: $bg-color and $text-color. The mixin contains a set of CSS rules that we want to apply to our buttons.
We then use the @include directive to include the button-styles mixin inside two different classes: .button-primary and .button-secondary. We pass different values for the $bg-color and $text-color arguments to create two different styles for our buttons.
By using mixins, we can reuse the same set of CSS rules across multiple classes, making our code more modular and easier to maintain. If we need to update the styles for our buttons, we only need to update the mixin in one place, and the changes will be reflected throughout our code.
#SASS
@javascript_tut @codingWithElias
BY Coding with Elias

Share with your friend now:
tgoop.com/codingWithElias/426