index.module.scss 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. @use "../theme";
  2. .card {
  3. display: flex;
  4. flex-direction: column;
  5. gap: theme.spacing(1);
  6. border-radius: theme.border-radius("2xl");
  7. text-decoration: none;
  8. color: unset;
  9. outline-offset: 0;
  10. outline: theme.spacing(1) solid transparent;
  11. transition-property: outline-color, border-color, box-shadow, background;
  12. transition-duration: 100ms;
  13. transition-timing-function: linear;
  14. border: 1px solid transparent;
  15. position: relative;
  16. padding: theme.spacing(1);
  17. isolation: isolate;
  18. -webkit-tap-highlight-color: transparent;
  19. @at-root button#{&} {
  20. cursor: pointer;
  21. width: 100%;
  22. }
  23. .cardHoverBackground {
  24. border-radius: theme.border-radius("2xl");
  25. position: absolute;
  26. inset: -1px;
  27. opacity: 0;
  28. transition: opacity 100ms linear;
  29. background: theme.color("button", "outline", "background", "hover");
  30. z-index: -1;
  31. }
  32. .header {
  33. display: flex;
  34. // padding: theme.spacing(3) theme.spacing(4);
  35. position: relative;
  36. flex-flow: column nowrap;
  37. .title {
  38. color: theme.color("heading");
  39. display: inline-flex;
  40. flex-flow: row nowrap;
  41. gap: theme.spacing(3);
  42. align-items: center;
  43. padding: theme.spacing(3);
  44. @include theme.text("lg", "medium");
  45. .icon {
  46. font-size: theme.spacing(6);
  47. height: theme.spacing(6);
  48. color: theme.color("button", "primary", "background", "normal");
  49. }
  50. }
  51. .toolbar {
  52. display: flex;
  53. flex-flow: row nowrap;
  54. gap: theme.spacing(2);
  55. align-items: center;
  56. justify-content: center;
  57. padding: theme.spacing(1.5);
  58. @include theme.breakpoint("lg") {
  59. position: absolute;
  60. right: theme.spacing(3);
  61. top: 0;
  62. bottom: theme.spacing(0);
  63. gap: theme.spacing(4);
  64. justify-content: unset;
  65. padding: 0;
  66. }
  67. &[data-always-on-top] {
  68. position: absolute;
  69. right: theme.spacing(3);
  70. top: 0;
  71. bottom: theme.spacing(0);
  72. gap: theme.spacing(4);
  73. }
  74. }
  75. }
  76. .footer {
  77. padding: theme.spacing(2);
  78. }
  79. &[data-variant="primary"] {
  80. background: theme.color("background", "card-highlight");
  81. &[data-hovered] {
  82. @include theme.elevation("primary", 2);
  83. }
  84. }
  85. &[data-variant="secondary"] {
  86. background: theme.color("background", "secondary");
  87. &[data-hovered] {
  88. @include theme.elevation("default", 2);
  89. }
  90. }
  91. &[data-variant="tertiary"] {
  92. background: theme.color("background", "primary");
  93. &[data-hovered] {
  94. @include theme.elevation("default", 2);
  95. }
  96. }
  97. &[data-hovered] .cardHoverBackground {
  98. opacity: 1;
  99. }
  100. &[data-focus-visible] {
  101. border-color: theme.color("focus");
  102. outline-color: theme.color("focus-dim");
  103. }
  104. }