notification.sass 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. @import "../utilities/mixins"
  2. $notification-background-color: $background !default
  3. $notification-code-background-color: $scheme-main !default
  4. $notification-radius: $radius !default
  5. $notification-padding: 1.25rem 2.5rem 1.25rem 1.5rem !default
  6. $notification-padding-ltr: 1.25rem 2.5rem 1.25rem 1.5rem !default
  7. $notification-padding-rtl: 1.25rem 1.5rem 1.25rem 2.5rem !default
  8. $notification-colors: $colors !default
  9. .notification
  10. @extend %block
  11. background-color: $notification-background-color
  12. border-radius: $notification-radius
  13. position: relative
  14. +ltr
  15. padding: $notification-padding-ltr
  16. +rtl
  17. padding: $notification-padding-rtl
  18. a:not(.button):not(.dropdown-item)
  19. color: currentColor
  20. text-decoration: underline
  21. strong
  22. color: currentColor
  23. code,
  24. pre
  25. background: $notification-code-background-color
  26. pre code
  27. background: transparent
  28. & > .delete
  29. +ltr-position(0.5rem)
  30. position: absolute
  31. top: 0.5rem
  32. .title,
  33. .subtitle,
  34. .content
  35. color: currentColor
  36. // Colors
  37. @each $name, $pair in $notification-colors
  38. $color: nth($pair, 1)
  39. $color-invert: nth($pair, 2)
  40. &.is-#{$name}
  41. background-color: $color
  42. color: $color-invert
  43. // If light and dark colors are provided
  44. @if length($pair) >= 4
  45. $color-light: nth($pair, 3)
  46. $color-dark: nth($pair, 4)
  47. &.is-light
  48. background-color: $color-light
  49. color: $color-dark