mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-30 00:29:52 +02:00
Update docs for color and bg utilities
- Split colors from background utilities with new docs page - Add Sass docs for both pages
This commit is contained in:
@@ -22,6 +22,7 @@ $utilities: map-merge(
|
||||
property: overflow,
|
||||
values: auto hidden visible scroll,
|
||||
),
|
||||
// scss-docs-start utils-display
|
||||
"display": (
|
||||
responsive: true,
|
||||
print: true,
|
||||
@@ -29,6 +30,7 @@ $utilities: map-merge(
|
||||
class: d,
|
||||
values: inline inline-block block grid table table-row table-cell flex inline-flex none
|
||||
),
|
||||
// scss-docs-end utils-display
|
||||
"shadow": (
|
||||
property: box-shadow,
|
||||
class: shadow,
|
||||
@@ -440,6 +442,7 @@ $utilities: map-merge(
|
||||
center: center,
|
||||
)
|
||||
),
|
||||
// scss-docs-start utils-color
|
||||
"color": (
|
||||
property: color,
|
||||
class: text,
|
||||
@@ -455,6 +458,7 @@ $utilities: map-merge(
|
||||
)
|
||||
)
|
||||
),
|
||||
// scss-docs-end utils-color
|
||||
"line-height": (
|
||||
property: line-height,
|
||||
class: lh,
|
||||
@@ -465,6 +469,7 @@ $utilities: map-merge(
|
||||
lg: $line-height-lg,
|
||||
)
|
||||
),
|
||||
// scss-docs-start utils-bg-color
|
||||
"background-color": (
|
||||
property: background-color,
|
||||
class: bg,
|
||||
@@ -477,6 +482,7 @@ $utilities: map-merge(
|
||||
)
|
||||
)
|
||||
),
|
||||
// scss-docs-end utils-bg-color
|
||||
"gradient": (
|
||||
property: background-image,
|
||||
class: bg,
|
||||
|
@@ -5,6 +5,7 @@
|
||||
|
||||
// Color system
|
||||
|
||||
// scss-docs-start gray-color-variables
|
||||
$white: #fff !default;
|
||||
$gray-100: #f8f9fa !default;
|
||||
$gray-200: #e9ecef !default;
|
||||
@@ -16,8 +17,10 @@ $gray-700: #495057 !default;
|
||||
$gray-800: #343a40 !default;
|
||||
$gray-900: #212529 !default;
|
||||
$black: #000 !default;
|
||||
// scss-docs-end gray-color-variables
|
||||
|
||||
// fusv-disable
|
||||
// scss-docs-start gray-colors-map
|
||||
$grays: (
|
||||
"100": $gray-100,
|
||||
"200": $gray-200,
|
||||
@@ -29,8 +32,10 @@ $grays: (
|
||||
"800": $gray-800,
|
||||
"900": $gray-900
|
||||
) !default;
|
||||
// scss-docs-end gray-colors-map
|
||||
// fusv-enable
|
||||
|
||||
// scss-docs-start color-variables
|
||||
$blue: #0d6efd !default;
|
||||
$indigo: #6610f2 !default;
|
||||
$purple: #6f42c1 !default;
|
||||
@@ -41,6 +46,7 @@ $yellow: #ffc107 !default;
|
||||
$green: #198754 !default;
|
||||
$teal: #20c997 !default;
|
||||
$cyan: #0dcaf0 !default;
|
||||
// scss-docs-end color-variables
|
||||
|
||||
// scss-docs-start colors-map
|
||||
$colors: (
|
||||
@@ -60,6 +66,7 @@ $colors: (
|
||||
) !default;
|
||||
// scss-docs-end colors-map
|
||||
|
||||
// scss-docs-start theme-color-variables
|
||||
$primary: $blue !default;
|
||||
$secondary: $gray-600 !default;
|
||||
$success: $green !default;
|
||||
@@ -68,6 +75,7 @@ $warning: $yellow !default;
|
||||
$danger: $red !default;
|
||||
$light: $gray-100 !default;
|
||||
$dark: $gray-900 !default;
|
||||
// scss-docs-end theme-color-variables
|
||||
|
||||
// scss-docs-start theme-colors-map
|
||||
$theme-colors: (
|
||||
@@ -228,7 +236,9 @@ $variable-prefix: bs- !default;
|
||||
//
|
||||
// The gradient which is added to components if `$enable-gradients` is `true`
|
||||
// This gradient is also added to elements with `.bg-gradient`
|
||||
// scss-docs-start variable-gradient
|
||||
$gradient: linear-gradient(180deg, rgba($white, .15), rgba($white, 0)) !default;
|
||||
// scss-docs-end variable-gradient
|
||||
|
||||
// Spacing
|
||||
//
|
||||
|
@@ -1,5 +1,6 @@
|
||||
// Gradients
|
||||
|
||||
// scss-docs-start gradient-bg-mixin
|
||||
@mixin gradient-bg($color: null) {
|
||||
background-color: $color;
|
||||
|
||||
@@ -7,7 +8,9 @@
|
||||
background-image: var(--#{$variable-prefix}gradient);
|
||||
}
|
||||
}
|
||||
// scss-docs-end gradient-bg-mixin
|
||||
|
||||
// scss-docs-start gradient-mixins
|
||||
// Horizontal gradient, from left to right
|
||||
//
|
||||
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
||||
@@ -41,3 +44,4 @@
|
||||
@mixin gradient-striped($color: rgba($white, .15), $angle: 45deg) {
|
||||
background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
|
||||
}
|
||||
// scss-docs-end gradient-mixins
|
||||
|
Reference in New Issue
Block a user