mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
23 lines
864 B
SCSS
23 lines
864 B
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
|
||
|
*/
|
||
|
|
||
|
// scss-docs-start alert-modifiers
|
||
|
// Generate contextual modifier classes for colorizing the alert.
|
||
|
|
||
|
@each $state, $value in $theme-colors {
|
||
|
$alert-background: shift-color($value, $alert-bg-scale);
|
||
|
$alert-border: shift-color($value, $alert-border-scale);
|
||
|
$alert-color: shift-color($value, $alert-color-scale);
|
||
|
|
||
|
@if (contrast-ratio($alert-background, $alert-color) < $min-contrast-ratio) {
|
||
|
$alert-color: mix($value, color-contrast($alert-background), abs($alert-color-scale));
|
||
|
}
|
||
|
.alert-#{$state} {
|
||
|
@include alert-variant($alert-background, $alert-border, $alert-color);
|
||
|
}
|
||
|
}
|
||
|
// scss-docs-end alert-modifiers
|