2017-07-28 20:05:15 +00:00
|
|
|
$message-background-color: $background !default
|
|
|
|
$message-radius: $radius !default
|
|
|
|
|
|
|
|
$message-header-background-color: $text !default
|
|
|
|
$message-header-color: $text-invert !default
|
|
|
|
$message-header-padding: 0.5em 0.75em !default
|
|
|
|
$message-header-radius: $radius !default
|
|
|
|
|
|
|
|
$message-body-border: 1px solid $border !default
|
|
|
|
$message-body-color: $text !default
|
|
|
|
$message-body-padding: 1em 1.25em !default
|
|
|
|
$message-body-radius: $radius !default
|
|
|
|
|
|
|
|
$message-body-pre-background-color: $white !default
|
|
|
|
$message-body-pre-code-background-color: transparent !default
|
|
|
|
|
2016-01-24 00:03:43 +00:00
|
|
|
.message
|
2016-09-22 22:14:18 +00:00
|
|
|
+block
|
2017-07-28 20:05:15 +00:00
|
|
|
background-color: $message-background-color
|
|
|
|
border-radius: $message-radius
|
2016-10-30 19:20:51 +00:00
|
|
|
font-size: $size-normal
|
2017-07-28 20:05:15 +00:00
|
|
|
// Sizes
|
|
|
|
&.is-small
|
|
|
|
font-size: $size-small
|
|
|
|
&.is-medium
|
|
|
|
font-size: $size-medium
|
|
|
|
&.is-large
|
|
|
|
font-size: $size-large
|
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
|
2017-07-28 20:05:15 +00:00
|
|
|
background-color: $message-header-background-color
|
|
|
|
border-radius: $message-header-radius $message-header-radius 0 0
|
|
|
|
color: $message-header-color
|
2016-10-30 19:20:51 +00:00
|
|
|
display: flex
|
|
|
|
justify-content: space-between
|
|
|
|
line-height: 1.25
|
2017-07-28 20:05:15 +00:00
|
|
|
padding: $message-header-padding
|
2016-10-30 19:20:51 +00:00
|
|
|
position: relative
|
2017-07-19 21:52:22 +00:00
|
|
|
a:not(.button),
|
2016-10-30 19:20:51 +00:00
|
|
|
strong
|
2017-07-05 20:27:23 +00:00
|
|
|
color: currentColor
|
2017-07-19 21:52:22 +00:00
|
|
|
a:not(.button)
|
2016-12-23 12:45:52 +00:00
|
|
|
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
|
2017-07-28 20:05:15 +00:00
|
|
|
border: $message-body-border
|
|
|
|
border-radius: $message-body-radius
|
|
|
|
color: $message-body-color
|
|
|
|
padding: $message-body-padding
|
2017-07-19 21:52:22 +00:00
|
|
|
a:not(.button),
|
2016-10-30 19:20:51 +00:00
|
|
|
strong
|
2017-07-05 20:27:23 +00:00
|
|
|
color: currentColor
|
2017-07-19 21:52:22 +00:00
|
|
|
a:not(.button)
|
2016-12-23 12:45:52 +00:00
|
|
|
text-decoration: underline
|
2016-10-30 23:44:50 +00:00
|
|
|
code,
|
|
|
|
pre
|
2017-07-28 20:05:15 +00:00
|
|
|
background-color: $message-body-pre-background-color
|
2016-10-30 23:44:50 +00:00
|
|
|
pre code
|
2017-07-28 20:05:15 +00:00
|
|
|
background-color: $message-body-pre-code-background-color
|