_help-block.scss 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. @use 'sass:color';
  2. @use 'sass:map';
  3. // Help text formatters
  4. .help-block {
  5. padding: 1em;
  6. margin: 1em 0;
  7. clear: both;
  8. color: $color-text-base;
  9. p {
  10. margin-top: 0;
  11. &:last-child {
  12. margin-bottom: 0;
  13. }
  14. }
  15. a {
  16. color: $color-link;
  17. }
  18. }
  19. .help-info,
  20. .help-warning,
  21. .help-critical {
  22. border-radius: 3px;
  23. padding-inline-start: 3.5em;
  24. position: relative;
  25. .icon {
  26. @include svg-icon(1.25rem);
  27. position: absolute;
  28. inset-inline-start: 1.125rem;
  29. top: 0.8125rem;
  30. }
  31. }
  32. .help-info {
  33. background-color: theme('colors.info.50');
  34. .icon-help {
  35. color: theme('colors.info.100');
  36. }
  37. }
  38. .help-warning {
  39. background-color: theme('colors.warning.50');
  40. .icon-warning {
  41. color: theme('colors.warning.100');
  42. }
  43. }
  44. .help-critical {
  45. background-color: theme('colors.critical.50');
  46. .icon-warning {
  47. color: theme('colors.critical.200');
  48. }
  49. }
  50. // Media for Windows High Contrast
  51. @media (forced-colors: active) {
  52. .help-block {
  53. border: 3px solid currentColor; // ensure visible separation in Windows High Contrast mode
  54. }
  55. .help-warning {
  56. border-style: dotted;
  57. }
  58. .help-critical {
  59. border-style: dashed;
  60. }
  61. }