2
0

_form-side.scss 2.5 KB

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