bulma/sass/elements/notification.sass

58 lines
2.0 KiB
Sass
Raw Normal View History

2020-08-15 23:40:51 +00:00
$notification-background-color: var(--background, #{$background}) !default
$notification-code-background-color: var(--scheme-main, #{$scheme-main}) !default
$notification-radius: var(--radius, #{$radius}) !default
2017-07-28 20:05:15 +00:00
$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
2020-08-15 23:40:51 +00:00
--notification-background-color: #{$notification-background-color}
--notification-radius: #{$notification-radius}
--notification-padding-ltr: #{$notification-padding-ltr}
--notification-padding-rtl: #{$notification-padding-rtl}
--notification-code-background-color: #{$notification-code-background-color}
2018-09-04 13:24:50 +00:00
@extend %block
2020-08-15 23:40:51 +00:00
background-color: var(--notification-background-color)
border-radius: var(--notification-radius)
color: var(--notification-color)
2016-01-24 00:03:43 +00:00
position: relative
2020-01-20 19:39:09 +00:00
+ltr
2020-08-15 23:40:51 +00:00
padding: var(--notification-padding-ltr)
2020-01-20 19:39:09 +00:00
+rtl
2020-08-15 23:40:51 +00:00
padding: var(--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
2020-08-15 23:40:51 +00:00
background: var(--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}
2020-08-15 23:40:51 +00:00
--notification-background-color: var(--#{$name}, #{$color})
--notification-color: var(--#{$name}-invert, #{$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
2020-08-15 23:40:51 +00:00
--notification-background-color: var(--#{$name}-light, #{$color-light})
--notification-color: var(--#{$name}-dark, #{$color-dark})