tabs.css 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. [data-component="tabs"] {
  2. width: 100%;
  3. height: 100%;
  4. display: flex;
  5. flex-direction: column;
  6. background-color: var(--background-stronger);
  7. overflow: clip;
  8. [data-slot="list"] {
  9. height: 48px;
  10. width: 100%;
  11. position: relative;
  12. display: flex;
  13. align-items: center;
  14. overflow-x: auto;
  15. /* Hide scrollbar */
  16. scrollbar-width: none;
  17. -ms-overflow-style: none;
  18. &::-webkit-scrollbar {
  19. display: none;
  20. }
  21. /* After element to fill remaining space */
  22. &::after {
  23. content: "";
  24. display: block;
  25. flex-grow: 1;
  26. height: 100%;
  27. border-bottom: 1px solid var(--border-weak-base);
  28. background-color: var(--background-base);
  29. }
  30. &:empty::after {
  31. display: none;
  32. }
  33. }
  34. [data-slot="trigger"] {
  35. position: relative;
  36. height: 100%;
  37. padding: 14px 24px;
  38. display: flex;
  39. align-items: center;
  40. color: var(--text-base);
  41. /* text-14-medium */
  42. font-family: var(--font-family-sans);
  43. font-size: 14px;
  44. font-style: normal;
  45. font-weight: var(--font-weight-medium);
  46. line-height: var(--line-height-large); /* 142.857% */
  47. letter-spacing: var(--letter-spacing-normal);
  48. white-space: nowrap;
  49. flex-shrink: 0;
  50. border-bottom: 1px solid var(--border-weak-base);
  51. border-right: 1px solid var(--border-weak-base);
  52. background-color: var(--background-base);
  53. &:disabled {
  54. pointer-events: none;
  55. color: var(--text-weaker);
  56. }
  57. &:focus-visible {
  58. outline: none;
  59. box-shadow: 0 0 0 2px var(--border-focus);
  60. }
  61. &[data-selected] {
  62. color: var(--text-strong);
  63. background-color: transparent;
  64. border-bottom-color: transparent;
  65. }
  66. &:hover:not(:disabled):not([data-selected]) {
  67. color: var(--text-strong);
  68. }
  69. }
  70. [data-slot="content"] {
  71. overflow-y: auto;
  72. flex: 1;
  73. /* Hide scrollbar */
  74. scrollbar-width: none;
  75. -ms-overflow-style: none;
  76. &::-webkit-scrollbar {
  77. display: none;
  78. }
  79. &:focus-visible {
  80. outline: none;
  81. }
  82. }
  83. }