2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

Create scss-docs shortcode to get some snippets from the Scs… (#30502)

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
Martijn Cuppens
2020-04-06 20:13:35 +02:00
committed by GitHub
parent 98ba40dc06
commit 83b49aa688
12 changed files with 71 additions and 86 deletions
+6 -20
View File
@@ -370,24 +370,10 @@ Validation states can be customized via Sass with the `$form-validation-states`
Please note that we do not recommend customizing these values without also modifying the `form-validation-state` mixin.
{{< highlight scss >}}
// Sass map from `_variables.scss`
// Override this and recompile your Sass to generate different states
$form-validation-states: (
"valid": (
"color": $form-feedback-valid-color,
"icon": $form-feedback-icon-valid
),
"invalid": (
"color": $form-feedback-invalid-color,
"icon": $form-feedback-icon-invalid
)
);
This is the Sass map from `_variables.scss`. Override this and recompile your Sass to generate different states:
// Loop from `_forms.scss`
// Any modifications to the above Sass map will be reflected in your compiled
// CSS via this loop.
@each $state, $data in $form-validation-states {
@include form-validation-state($state, map-get($data, color), map-get($data, icon));
}
{{< /highlight >}}
{{< scss-docs name="form-validation-states" file="scss/_variables.scss" >}}
This is the loop from `forms/_validation.scss.scss`. Any modifications to the above Sass map will be reflected in your compiled CSS via this loop:
{{< scss-docs name="form-validation-states-loop" file="scss/forms/_validation.scss" >}}