bulma/sass/components/message.sass

62 lines
1.4 KiB
Sass
Raw Normal View History

2016-01-24 00:03:43 +00:00
.message
2016-09-22 22:14:18 +00:00
+block
2016-06-29 22:59:48 +00:00
background-color: $background
2016-01-24 00:03:43 +00:00
border-radius: $radius
2016-10-30 19:20:51 +00:00
font-size: $size-normal
2016-04-10 15:00:32 +00:00
// Colors
2016-01-24 00:03:43 +00:00
@each $name, $pair in $colors
$color: nth($pair, 1)
$color-invert: nth($pair, 2)
2016-10-30 19:20:51 +00:00
$color-lightning: max((100% - lightness($color)) - 2%, 0%)
$color-luminance: colorLuminance($color)
$darken-percentage: $color-luminance * 70%
$desaturate-percentage: $color-luminance * 30%
2016-01-24 00:03:43 +00:00
&.is-#{$name}
2016-10-30 19:20:51 +00:00
background-color: lighten($color, $color-lightning)
2016-01-24 00:03:43 +00:00
.message-header
2016-06-29 22:59:48 +00:00
background-color: $color
2016-01-24 00:03:43 +00:00
color: $color-invert
.message-body
border-color: $color
2016-10-30 19:20:51 +00:00
color: desaturate(darken($color, $darken-percentage), $desaturate-percentage)
.message-header
align-items: center
background-color: $text
border-radius: $radius $radius 0 0
color: $text-invert
display: flex
justify-content: space-between
line-height: 1.25
padding: 0.5em 0.75em
position: relative
2016-12-23 12:45:52 +00:00
a,
2016-10-30 19:20:51 +00:00
strong
color: inherit
2016-12-23 12:45:52 +00:00
a
text-decoration: underline
2016-10-30 19:20:51 +00:00
.delete
flex-grow: 0
flex-shrink: 0
margin-left: 0.75em
& + .message-body
2016-12-23 12:45:52 +00:00
border-top-left-radius: 0
border-top-right-radius: 0
2016-10-30 19:20:51 +00:00
border-top: none
.message-body
border: 1px solid $border
border-radius: $radius
color: $text
padding: 1em 1.25em
2016-12-23 12:45:52 +00:00
a,
2016-10-30 19:20:51 +00:00
strong
color: inherit
2016-12-23 12:45:52 +00:00
a
text-decoration: underline
2016-10-30 23:44:50 +00:00
code,
pre
background: $white
pre code
background: transparent