_help-block.scss 1.4 KB

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