_tabs.scss 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. .w-tabs {
  2. &__wrapper {
  3. @apply w-mb-8 w-overflow-x-auto w-scrollbar-thin w-flex w-items-center w-justify-between w-flex-wrap w-gap-4;
  4. }
  5. &__list {
  6. @apply w-flex w-pr-0 w-my-[3px] w-space-x-6 w-border-b w-border-border-furniture w-w-fit;
  7. }
  8. &__tab {
  9. @apply w-label-3
  10. w-box-border
  11. w-inline-flex
  12. w-text-text-meta
  13. hover:w-text-text-label
  14. w-whitespace-nowrap
  15. w-py-4
  16. w-font-medium
  17. w-relative
  18. after:w-block
  19. after:w-w-0
  20. after:w-h-[2px]
  21. after:w-bg-icon-primary
  22. after:w-absolute
  23. after:w-left-0
  24. after:-w-bottom-px
  25. after:w-transition-all
  26. after:forced-colors:w-h-1
  27. after:forced-colors:w-bg-LinkText
  28. hover:after:w-w-full
  29. hover:after:forced-colors:w-w-full
  30. motion-reduce:after:w-transition-none;
  31. &[aria-selected='true'] {
  32. @apply after:w-w-full w-text-text-label after:forced-colors:w-w-full;
  33. }
  34. }
  35. &__errors {
  36. @apply w-hidden
  37. w-absolute
  38. -w-mr-3
  39. w-py-0.5
  40. w-px-[0.325rem]
  41. w-top-1
  42. -w-right-1
  43. w-text-[0.5625rem]
  44. w-font-bold
  45. w-bg-critical-200
  46. w-text-white
  47. w-border
  48. w-border-surface-page
  49. w-rounded-[1rem];
  50. }
  51. &__list,
  52. .tab-content {
  53. @apply w-px-5 sm:w-px-10 md:w-px-20;
  54. // If tab contents are nested inside of a nice-padding block then don't apply the admin padding
  55. .nice-padding & {
  56. padding-inline-start: 0;
  57. padding-inline-end: 0;
  58. }
  59. }
  60. // Optional animate attr for tabs to animate in
  61. &[data-tabs-animate] &__panel {
  62. @apply motion-reduce:w-transition-none w-transition w-duration-150 w-translate-y-1 w-opacity-0;
  63. &.animate-in {
  64. @apply w-translate-y-0 w-opacity-100;
  65. }
  66. }
  67. }