2
0

_form-side.scss 2.4 KB

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