mirror of
https://github.com/jgthms/bulma.git
synced 2024-11-14 11:14:24 +00:00
92 lines
2.2 KiB
SCSS
92 lines
2.2 KiB
SCSS
@import "../utilities/mixins";
|
|
|
|
$notification-background-color: getVar("background") !default;
|
|
$notification-code-background-color: getVar("scheme-main") !default;
|
|
$notification-radius: getVar("radius") !default;
|
|
$notification-padding: 1.25rem 2.5rem 1.25rem 1.5rem !default;
|
|
$notification-padding-ltr: 1.25rem 2.5rem 1.25rem 1.5rem !default;
|
|
$notification-padding-rtl: 1.25rem 1.5rem 1.25rem 2.5rem !default;
|
|
|
|
$notification-colors: $colors !default;
|
|
|
|
:root {
|
|
@include register-vars(
|
|
(
|
|
notification-background-color: #{$notification-background-color},
|
|
notification-code-background-color: #{$notification-code-background-color},
|
|
notification-radius: #{$notification-radius},
|
|
notification-padding: #{$notification-padding},
|
|
notification-padding-ltr: #{$notification-padding-ltr},
|
|
notification-padding-rtl: #{$notification-padding-rtl},
|
|
)
|
|
);
|
|
}
|
|
|
|
.#{$class-prefix}notification {
|
|
@extend %block;
|
|
|
|
background-color: getVar("notification-background-color");
|
|
border-radius: getVar("notification-radius");
|
|
position: relative;
|
|
|
|
@include ltr {
|
|
padding: getVar("notification-padding-ltr");
|
|
}
|
|
|
|
@include rtl {
|
|
padding: getVar("notification-padding-rtl");
|
|
}
|
|
|
|
a:not(.#{$class-prefix}button):not(.#{$class-prefix}dropdown-item) {
|
|
color: currentColor;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
strong {
|
|
color: currentColor;
|
|
}
|
|
|
|
code,
|
|
pre {
|
|
background: getVar("notification-code-background-color");
|
|
}
|
|
|
|
pre code {
|
|
background: transparent;
|
|
}
|
|
|
|
& > .#{$class-prefix}delete {
|
|
@include ltr-position(0.5rem);
|
|
position: absolute;
|
|
top: 0.5rem;
|
|
}
|
|
|
|
.#{$class-prefix}title,
|
|
.#{$class-prefix}subtitle,
|
|
.#{$class-prefix}content {
|
|
color: currentColor;
|
|
}
|
|
|
|
// Colors
|
|
@each $name, $pair in $notification-colors {
|
|
$color: nth($pair, 1);
|
|
$color-invert: nth($pair, 2);
|
|
|
|
&.is-#{$name} {
|
|
background-color: $color;
|
|
color: $color-invert;
|
|
|
|
// If light and dark colors are provided
|
|
@if length($pair) >= 4 {
|
|
$color-light: nth($pair, 3);
|
|
$color-dark: nth($pair, 4);
|
|
|
|
&.is-light {
|
|
background-color: $color-light;
|
|
color: $color-dark;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|