_summary.scss 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. .w-summary {
  2. // set up responsive font size for icon and number as local custom property
  3. --w-summary-item-font-size: clamp(
  4. theme('fontSize.30') * 1.5,
  5. 6.5vw,
  6. calc(theme('fontSize.30') * 3)
  7. );
  8. color: theme('colors.text-link-default');
  9. margin-bottom: theme('spacing.8');
  10. padding-top: theme('spacing.8');
  11. .w-summary__list {
  12. @include unlist();
  13. display: flex;
  14. flex-wrap: wrap;
  15. justify-content: space-evenly;
  16. width: 100%;
  17. }
  18. /* Summary item */
  19. li {
  20. display: flex;
  21. align-items: center;
  22. flex: 1 1 auto;
  23. flex-wrap: nowrap;
  24. margin-bottom: theme('spacing.6');
  25. }
  26. /* Summary icon */
  27. .icon {
  28. font-size: var(--w-summary-item-font-size);
  29. height: 1em;
  30. margin-inline-end: 0.15em;
  31. width: 1em;
  32. }
  33. /* Summary label (a link, use parent colours ) */
  34. a {
  35. color: inherit;
  36. text-align: start;
  37. display: inline-flex;
  38. flex-direction: column;
  39. gap: theme('spacing.[1.5]');
  40. @include media-breakpoint-up(sm) {
  41. font-size: theme('fontSize.18');
  42. }
  43. /* Summary big number */
  44. > span {
  45. display: block;
  46. font-size: calc(var(--w-summary-item-font-size) * 0.6);
  47. font-weight: theme('fontWeight.bold');
  48. line-height: 0.9em; // label underneath to come in tight against the number
  49. }
  50. }
  51. }
  52. // Media for Windows High Contrast Mode
  53. @media (forced-colors: active) {
  54. .w-summary {
  55. .icon {
  56. color: LinkText;
  57. opacity: 1;
  58. }
  59. }
  60. }