bulma/sass/elements/notification.sass

53 lines
1.4 KiB
Sass
Raw Normal View History

2020-10-31 23:52:27 +00:00
@import "../utilities/mixins"
2017-07-28 20:05:15 +00:00
$notification-background-color: $background !default
2019-10-13 14:12:30 +00:00
$notification-code-background-color: $scheme-main !default
2017-07-28 20:05:15 +00:00
$notification-radius: $radius !default
$notification-padding: 1.25rem 2.5rem 1.25rem 1.5rem !default
2020-01-20 19:39:09 +00:00
$notification-padding-ltr: 1.25rem 2.5rem 1.25rem 1.5rem !default
$notification-padding-rtl: 1.25rem 1.5rem 1.25rem 2.5rem !default
2017-07-28 20:05:15 +00:00
$notification-colors: $colors !default
2016-01-24 00:03:43 +00:00
.notification
2018-09-04 13:24:50 +00:00
@extend %block
2017-07-28 20:05:15 +00:00
background-color: $notification-background-color
border-radius: $notification-radius
2016-01-24 00:03:43 +00:00
position: relative
2020-01-20 19:39:09 +00:00
+ltr
padding: $notification-padding-ltr
+rtl
padding: $notification-padding-rtl
a:not(.button):not(.dropdown-item)
2017-03-31 21:25:53 +00:00
color: currentColor
text-decoration: underline
2017-07-05 20:27:23 +00:00
strong
color: currentColor
2016-10-30 23:44:50 +00:00
code,
pre
2019-10-13 14:12:30 +00:00
background: $notification-code-background-color
2016-10-30 23:44:50 +00:00
pre code
background: transparent
2017-03-26 16:33:13 +00:00
& > .delete
2020-01-22 09:14:04 +00:00
+ltr-position(0.5rem)
2016-10-30 10:41:53 +00:00
position: absolute
top: 0.5rem
2016-09-22 22:14:18 +00:00
.title,
.subtitle,
2016-09-22 22:14:18 +00:00
.content
2017-07-05 20:27:23 +00:00
color: currentColor
2016-04-10 15:00:32 +00:00
// Colors
@each $name, $pair in $notification-colors
2016-01-24 00:03:43 +00:00
$color: nth($pair, 1)
$color-invert: nth($pair, 2)
&.is-#{$name}
2016-06-29 22:59:48 +00:00
background-color: $color
2016-01-24 00:03:43 +00:00
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