mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-20 04:11:39 +02:00
Migrate some Sass vars to be local to specific stylesheets
- Update ScssDocs tags where appropriate - Removed a null Sass variable, $table-th-font-weight - Removed $table-caption-color because we put table Sass vars in the _tables.scss file away from the _reboot.scss file - Fix docs styles as needed
This commit is contained in:
@@ -5,6 +5,20 @@
|
||||
@use "../mixins/border-radius" as *;
|
||||
@use "../mixins/box-shadow" as *;
|
||||
|
||||
// scss-docs-start thumbnail-variables
|
||||
$thumbnail-padding: .25rem !default;
|
||||
$thumbnail-bg: var(--#{$prefix}body-bg) !default;
|
||||
$thumbnail-border-width: var(--#{$prefix}border-width) !default;
|
||||
$thumbnail-border-color: var(--#{$prefix}border-color) !default;
|
||||
$thumbnail-border-radius: var(--#{$prefix}border-radius) !default;
|
||||
$thumbnail-box-shadow: var(--#{$prefix}box-shadow-sm) !default;
|
||||
// scss-docs-end thumbnail-variables
|
||||
|
||||
// scss-docs-start figure-variables
|
||||
$figure-caption-font-size: $small-font-size !default;
|
||||
$figure-caption-color: var(--#{$prefix}secondary-color) !default;
|
||||
// scss-docs-end figure-variables
|
||||
|
||||
@layer content {
|
||||
// Responsive images (ensure images don't scale beyond their parents)
|
||||
//
|
||||
|
@@ -362,20 +362,18 @@
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: $table-cell-padding-y;
|
||||
padding-bottom: $table-cell-padding-y;
|
||||
color: $table-caption-color;
|
||||
padding-top: .5rem;
|
||||
padding-bottom: .5rem;
|
||||
color: var(--#{$prefix}secondary-color);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
// 1. Removes font-weight bold by inheriting
|
||||
// 2. Matches default `<td>` alignment by inheriting `text-align`.
|
||||
// 3. Fix alignment for Safari
|
||||
// 1. Matches default `<td>` alignment by inheriting `text-align`.
|
||||
// 2. Fix alignment for Safari
|
||||
|
||||
th {
|
||||
font-weight: $table-th-font-weight; // 1
|
||||
text-align: inherit; // 2
|
||||
text-align: -webkit-match-parent; // 3
|
||||
text-align: inherit; // 1
|
||||
text-align: -webkit-match-parent; // 2
|
||||
}
|
||||
|
||||
thead,
|
||||
|
@@ -5,6 +5,55 @@
|
||||
@use "../functions" as *;
|
||||
@use "../layout/breakpoints" as *;
|
||||
|
||||
// scss-docs-start table-variables
|
||||
$table-cell-padding-y: .5rem !default;
|
||||
$table-cell-padding-x: .5rem !default;
|
||||
$table-cell-padding-y-sm: .25rem !default;
|
||||
$table-cell-padding-x-sm: .25rem !default;
|
||||
|
||||
$table-cell-vertical-align: top !default;
|
||||
|
||||
$table-color: var(--#{$prefix}emphasis-color) !default;
|
||||
$table-bg: var(--#{$prefix}body-bg) !default;
|
||||
$table-accent-bg: transparent !default;
|
||||
|
||||
$table-striped-color: $table-color !default;
|
||||
$table-striped-bg-factor: .05 !default;
|
||||
$table-striped-bg: rgba(var(--#{$prefix}emphasis-color-rgb), $table-striped-bg-factor) !default;
|
||||
|
||||
$table-active-color: $table-color !default;
|
||||
$table-active-bg-factor: .1 !default;
|
||||
$table-active-bg: rgba(var(--#{$prefix}emphasis-color-rgb), $table-active-bg-factor) !default;
|
||||
|
||||
$table-hover-color: $table-color !default;
|
||||
$table-hover-bg-factor: .075 !default;
|
||||
$table-hover-bg: rgba(var(--#{$prefix}emphasis-color-rgb), $table-hover-bg-factor) !default;
|
||||
|
||||
$table-border-factor: .2 !default;
|
||||
$table-border-width: var(--#{$prefix}border-width) !default;
|
||||
$table-border-color: var(--#{$prefix}border-color) !default;
|
||||
|
||||
$table-striped-order: odd !default;
|
||||
$table-striped-columns-order: even !default;
|
||||
|
||||
$table-group-separator-color: currentcolor !default;
|
||||
|
||||
$table-bg-scale: -80% !default;
|
||||
// scss-docs-end table-variables
|
||||
|
||||
// scss-docs-start table-loop
|
||||
$table-variants: (
|
||||
"primary": shift-color($primary, $table-bg-scale),
|
||||
"secondary": shift-color($secondary, $table-bg-scale),
|
||||
"success": shift-color($success, $table-bg-scale),
|
||||
"info": shift-color($info, $table-bg-scale),
|
||||
"warning": shift-color($warning, $table-bg-scale),
|
||||
"danger": shift-color($danger, $table-bg-scale),
|
||||
"light": $light,
|
||||
"dark": $dark,
|
||||
) !default;
|
||||
// scss-docs-end table-loop
|
||||
|
||||
@layer content {
|
||||
// scss-docs-start table-variant
|
||||
@mixin table-variant($state, $background) {
|
||||
|
Reference in New Issue
Block a user