Listing 3-40. Keyword Argument Example
.specialNote{
@include fancyBorder($borderColor:#00F, $borderWidth:1px)
}
You can make mixins even more flexible by allowing them to deal with an unknown number of
variables. Sass supports variable arguments. These are declared at the end of parameters for mixins/
functions that contain all additional arguments in the form of a list. These arguments look like normal
arguments, but have additional … at the end. Listing
3-41
shows a modified version of the previous code, and
it passes a variable parameter named fontProp to set the font attribute.
Chapter 3
■
advanCed SaSS
50
Do'stlaringiz bilan baham: |