mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-31 00:59:51 +02:00
Rewrite custom docs buttons
- Use CSS variables wherever possible - Rename purple-bright to violet for brevity, add CSS vars versions - Rename download to accent
This commit is contained in:
@@ -4,54 +4,32 @@
|
||||
|
||||
// scss-docs-start btn-css-vars-example
|
||||
.btn-bd-primary {
|
||||
font-weight: 600;
|
||||
color: $white;
|
||||
background-color: $bd-purple-bright;
|
||||
border-color: $bd-purple-bright;
|
||||
|
||||
&:hover,
|
||||
&:active {
|
||||
color: $white;
|
||||
background-color: shade-color($bd-purple-bright, 20%);
|
||||
border-color: shade-color($bd-purple-bright, 20%);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
box-shadow: 0 0 0 3px rgba($bd-purple-bright, .25);
|
||||
}
|
||||
--bs-btn-font-weight: 600;
|
||||
--bs-btn-color: var(--bs-white);
|
||||
--bs-btn-bg: var(--bd-violet);
|
||||
--bs-btn-border-color: var(--bd-violet);
|
||||
--bs-btn-hover-color: var(--bs-white);
|
||||
--bs-btn-hover-bg: #{shade-color($bd-violet, 20%)};
|
||||
--bs-btn-hover-border-color: #{shade-color($bd-violet, 20%)};
|
||||
--bs-btn-focus-shadow-rgb: var(--bd-violet-rgb);
|
||||
}
|
||||
// scss-docs-end btn-css-vars-example
|
||||
|
||||
.btn-bd-download {
|
||||
font-weight: 600;
|
||||
color: $bd-download;
|
||||
border-color: $bd-download;
|
||||
|
||||
&:hover,
|
||||
&:active {
|
||||
color: $bd-dark;
|
||||
background-color: $bd-download;
|
||||
border-color: $bd-download;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
box-shadow: 0 0 0 3px rgba($bd-download, .25);
|
||||
}
|
||||
.btn-bd-accent {
|
||||
--bs-btn-font-weight: 600;
|
||||
--bs-btn-color: var(--bd-accent);
|
||||
--bs-btn-border-color: var(--bd-accent);
|
||||
--bs-btn-hover-color: var(--bd-dark);
|
||||
--bs-btn-hover-bg: var(--bd-accent);
|
||||
--bs-btn-hover-border-color: var(--bd-accent);
|
||||
--bs-btn-focus-shadow-rgb: var(--bd-accent-rgb);
|
||||
}
|
||||
|
||||
.btn-bd-light {
|
||||
color: $gray-600;
|
||||
border-color: $gray-300;
|
||||
|
||||
.show > &,
|
||||
&:hover,
|
||||
&:active {
|
||||
color: $bd-purple-bright;
|
||||
background-color: $white;
|
||||
border-color: $bd-purple-bright;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
box-shadow: 0 0 0 3px rgba($bd-purple-bright, .25);
|
||||
}
|
||||
--bs-btn-color: var(--bs-gray-600);
|
||||
--bs-btn-border-color: var(--bs-gray-300);
|
||||
--bs-btn-active-color: var(--bd-violet);
|
||||
--bs-btn-active-bg: var(--bs-white);
|
||||
--bs-btn-active-border-color: var(--bd-violet);
|
||||
--bs-btn-focus-shadow-rgb: var(--bd-violet-rgb);
|
||||
}
|
||||
|
Reference in New Issue
Block a user