! default is often used in Bootstrap Sass. It seems like the opposite! Important. All Bootstraps variables are set using! Default to allow the developer to further customize the download. FROM! By default, sass will only define a variable if it is not already set.
This provides more flexibility.
//Example1 Dress color = red $auroras-dress-color: blue; $auroras-dress-color: red; //Example2 Dress color = red $auroras-dress-color: blue !default; $auroras-dress-color: red; //Example3 Dress color = blue $auroras-dress-color: blue; $auroras-dress-color: red !default;
So why is this important? Bootstrap is a package. Most people do not edit the Bootstrap source. NEVER UPDATE SOURCE OF BOTSTRAP. To configure the download, you will add your own variable file and compile it using the boot code, but never touch your own download package. The Bootstrap sass page makes full sense of how to set up and compile it in documents.
I do not know why it does not do less. I have not worked with less and do not know if it has its own variable management mechanism.
Fiddle example https://jsfiddle.net/siggysid/344dnnwz/
Sarah M Giles Mar 07 '17 at 21:47 2017-03-07 21:47
source share