2
0

_form-side.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. @use 'sass:color';
  2. @use 'sass:map';
  3. @use 'sass:math';
  4. @use '../tools' as *;
  5. .side-panel-open {
  6. @apply w-overflow-y-hidden sm:w-overflow-y-auto;
  7. }
  8. .side-panel-resizing {
  9. @apply w-select-none w-cursor-ew-resize;
  10. .form-side {
  11. @apply w-transition;
  12. }
  13. }
  14. .form-side {
  15. @apply w-absolute
  16. w-right-0
  17. w-top-full
  18. w-h-[calc(100vh-100%)]
  19. w-invisible
  20. w-transform
  21. w-translate-x-full
  22. rtl:-w-translate-x-full
  23. w-bg-surface-page
  24. w-box-border
  25. w-transition-all
  26. motion-reduce:w-transition-none
  27. w-duration-300
  28. w-border-l
  29. w-border-border-furniture
  30. w-min-w-full
  31. md:w-min-w-[22.875rem]
  32. w-max-w-full
  33. sm:w-max-w-[22.5rem]
  34. md:w-max-w-[35.937rem]
  35. lg:w-max-w-[31.25rem]
  36. xl:w-max-w-[46.875rem]
  37. more-contrast:w-border-border-furniture-more-contrast;
  38. z-index: calc(theme('zIndex.header') - 10);
  39. width: var(--side-panel-width, 100%);
  40. @include media-breakpoint-up(md) {
  41. width: var(--side-panel-width, theme('width.[1/3]'));
  42. }
  43. &--open {
  44. @apply w-translate-x-0 rtl:w-translate-x-0 w-visible;
  45. }
  46. &--initial {
  47. @apply w-transition-none;
  48. }
  49. &--preview {
  50. @apply sm:w-max-w-[70vw];
  51. }
  52. &__close-button {
  53. @apply w-text-icon-primary w-absolute w-left-3 w-top-3 hover:w-text-icon-primary-hover w-bg-surface-page w-p-3 w-transition;
  54. .icon {
  55. @apply w-w-4 w-h-4;
  56. }
  57. }
  58. &:has(.form-side__resize-grip:is(:hover, :focus-within)) {
  59. @apply w-text-icon-secondary-hover;
  60. }
  61. &__resize-grip-container {
  62. @apply w-absolute w-place-items-center w-hidden md:w-flex w-z-10 w-left-0;
  63. top: 50%;
  64. transform: translateY(-50%);
  65. }
  66. &__resize-grip {
  67. @apply w-text-icon-secondary hover:w-text-icon-secondary-hover w-border w-border-transparent w-rounded w-bg-surface-page w-py-2.5 w-pl-2.5 w-hidden w-touch-pinch-zoom w-cursor-ew-resize;
  68. .form-side--open & {
  69. @apply w-flex;
  70. }
  71. &:focus-within:has(:focus-visible) {
  72. @include focus-outline;
  73. }
  74. }
  75. &__resize-grip-icon {
  76. width: 0.3125rem;
  77. height: 1.375rem;
  78. border-inline-start: 1px solid currentColor;
  79. border-inline-end: 1px solid currentColor;
  80. @media (forced-colors: active) {
  81. background-color: ButtonText;
  82. }
  83. }
  84. &__width-input {
  85. @apply w-w-0 w-h-0 w-opacity-0 w-absolute w-pointer-events-none;
  86. }
  87. &__panel {
  88. @apply w-px-5 xl:w-px-10 w-py-4 w-w-full w-h-full w-overflow-y-auto w-scrollbar-thin;
  89. }
  90. }