_help-block.scss 1.4 KB

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