_form-side.scss 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. z-index: calc(theme('zIndex.header') - 10);
  37. width: var(--side-panel-width, 100%);
  38. @include media-breakpoint-up(md) {
  39. width: var(--side-panel-width, theme('width.[1/3]'));
  40. }
  41. &--open {
  42. @apply w-translate-x-0 rtl:w-translate-x-0 w-visible;
  43. }
  44. &--initial {
  45. @apply w-transition-none;
  46. }
  47. &--preview {
  48. @apply sm:w-max-w-[70vw];
  49. }
  50. &__close-button {
  51. @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;
  52. .icon {
  53. @apply w-w-4 w-h-4;
  54. }
  55. }
  56. &:has(.form-side__resize-grip:is(:hover, :focus-within)) {
  57. @apply w-text-icon-secondary-hover;
  58. }
  59. &__resize-grip-container {
  60. @apply w-absolute w-place-items-center w-hidden md:w-flex w-z-10 w-left-0;
  61. top: 50%;
  62. transform: translateY(-50%);
  63. }
  64. &__resize-grip {
  65. @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;
  66. .form-side--open & {
  67. @apply w-flex;
  68. }
  69. &:focus-within:has(:focus-visible) {
  70. @include focus-outline;
  71. }
  72. @supports not selector(:focus-visible) {
  73. &:focus-within {
  74. /* Fallback for browsers without :focus-visible support */
  75. @include focus-outline;
  76. }
  77. }
  78. }
  79. &__resize-grip-icon {
  80. width: 0.3125rem;
  81. height: 1.375rem;
  82. border-inline-start: 1px solid currentColor;
  83. border-inline-end: 1px solid currentColor;
  84. @media (forced-colors: active) {
  85. background-color: ButtonText;
  86. }
  87. }
  88. &__width-input {
  89. @apply w-w-0 w-h-0 w-opacity-0 w-absolute w-pointer-events-none;
  90. }
  91. &__panel {
  92. @apply w-px-5 xl:w-px-10 w-py-4 w-w-full w-h-full w-overflow-y-auto w-scrollbar-thin;
  93. }
  94. }