tab.css 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. :root {
  2. --tab-main-height: calc(100vh - 3rem);
  3. }
  4. .tabs {
  5. @apply z-10;
  6. }
  7. .tab-main {
  8. @apply z-1;
  9. @apply border-l;
  10. @apply border-r;
  11. @apply border-b;
  12. @apply border-tint-300;
  13. min-height: var(--tab-main-height);
  14. }
  15. .tab-content {
  16. @apply bg-white;
  17. @apply text-sm;
  18. min-height: var(--tab-main-height);
  19. }
  20. .tab-content-section {
  21. @apply py-8;
  22. @apply border-t-2;
  23. @apply border-tint-200;
  24. }
  25. .tab-content-section:first-child {
  26. @apply border-t-0;
  27. }
  28. .tab-nav {
  29. position: sticky;
  30. position: -webkit-sticky;
  31. @apply grid;
  32. @apply justify-center;
  33. @apply cols-auto;
  34. @apply gap-2;
  35. @apply top-0;
  36. @apply w-full;
  37. @apply z-10;
  38. @apply bg-gray-700;
  39. @apply p-1;
  40. @apply shadow-lg;
  41. @apply rounded-t-sm;
  42. @apply text-xs;
  43. }
  44. .tab-bar {
  45. @apply grid;
  46. @apply cols-auto;
  47. @apply justify-start;
  48. @apply gap-1;
  49. @apply overflow-x-auto;
  50. @apply overflow-y-hidden;
  51. }
  52. .tab-bar::-webkit-scrollbar {
  53. height: 2px;
  54. }
  55. @screen sm {
  56. .tab-bar {
  57. @apply justify-center;
  58. }
  59. }
  60. .tab {
  61. @apply px-4;
  62. @apply text-gray-300;
  63. @apply whitespace-no-wrap;
  64. @apply rounded-sm;
  65. @apply h-10;
  66. @apply text-sm;
  67. }
  68. .tab-delimiter {
  69. @apply border-l;
  70. @apply border-gray-600;
  71. }
  72. .tab:hover {
  73. @apply bg-tint-400;
  74. @apply text-white;
  75. }
  76. .tab-active,
  77. .tab-active:hover {
  78. @apply bg-tint-600;
  79. @apply text-white;
  80. }