hedgedoc/global-styles/colors-only-bootstrap/_buttons.scss
Tilman Vatteroth ca25760d48 feat: vendor special version of bootstrap 5
The vendored version contains ONLY the color rules. This makes it easy to create custom themes on top of the original bootstrap.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-11-11 23:43:30 +01:00

67 lines
1.9 KiB
SCSS

/*!
* SPDX-FileCopyrightText: Original code: Copyright (c) 2011-2022 Twitter, Inc. + Copyright (c) 2011-2022 The Bootstrap Authors. Modification: 2022 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: MIT
*/
//
// Base styles
//
.btn {
// scss-docs-start btn-css-vars
--#{$prefix}btn-color: #{$body-color};
}
//
// Alternate buttons
//
// scss-docs-start btn-variant-loops
@each $color, $value in $theme-colors {
.btn-#{$color} {
@if $color == "light" {
@include button-variant(
$value,
$value,
$hover-background: shade-color($value, $btn-hover-bg-shade-amount),
$hover-border: shade-color($value, $btn-hover-border-shade-amount),
$active-background: shade-color($value, $btn-active-bg-shade-amount),
$active-border: shade-color($value, $btn-active-border-shade-amount)
);
} @else if $color == "dark" {
@include button-variant(
$value,
$value,
$hover-background: tint-color($value, $btn-hover-bg-tint-amount),
$hover-border: tint-color($value, $btn-hover-border-tint-amount),
$active-background: tint-color($value, $btn-active-bg-tint-amount),
$active-border: tint-color($value, $btn-active-border-tint-amount)
);
} @else {
@include button-variant($value, $value);
}
}
}
@each $color, $value in $theme-colors {
.btn-outline-#{$color} {
@include button-outline-variant($value);
}
}
// scss-docs-end btn-variant-loops
//
// Link buttons
//
// Make a button look and behave like a link
.btn-link {
--#{$prefix}btn-color: #{$btn-link-color};
--#{$prefix}btn-hover-color: #{$btn-link-hover-color};
--#{$prefix}btn-active-color: #{$btn-link-hover-color};
--#{$prefix}btn-disabled-color: #{$btn-link-disabled-color};
--#{$prefix}btn-focus-shadow-rgb: #{to-rgb(mix(color-contrast($primary), $primary, 15%))};
}