opencode/packages/ui/src/components/tabs.css

95 lines
2.0 KiB
CSS
Raw Normal View History

2025-10-15 01:06:13 +08:00
[data-component="tabs"] {
2025-10-17 03:53:44 +08:00
width: 100%;
height: 100%;
2025-10-15 01:06:13 +08:00
display: flex;
flex-direction: column;
2025-10-18 01:05:52 +08:00
background-color: var(--background-stronger);
2025-10-17 03:53:44 +08:00
overflow: clip;
2025-10-15 01:06:13 +08:00
2025-10-23 06:31:44 +08:00
[data-slot="list"] {
2025-10-24 04:27:31 +08:00
height: 40px;
2025-10-17 03:53:44 +08:00
width: 100%;
2025-10-15 01:06:13 +08:00
position: relative;
display: flex;
align-items: center;
overflow-x: auto;
/* Hide scrollbar */
scrollbar-width: none;
-ms-overflow-style: none;
&::-webkit-scrollbar {
display: none;
}
/* After element to fill remaining space */
&::after {
content: "";
display: block;
flex-grow: 1;
2025-10-17 03:53:44 +08:00
height: 100%;
border-bottom: 1px solid var(--border-weak-base);
2025-10-18 01:05:52 +08:00
background-color: var(--background-base);
2025-10-15 01:06:13 +08:00
}
&:empty::after {
2025-10-17 03:53:44 +08:00
display: none;
2025-10-15 01:06:13 +08:00
}
}
2025-10-23 06:31:44 +08:00
[data-slot="trigger"] {
2025-10-15 01:06:13 +08:00
position: relative;
2025-10-24 04:27:31 +08:00
height: 100%;
padding: 8px 24px;
2025-10-15 01:06:13 +08:00
display: flex;
align-items: center;
2025-10-24 04:27:31 +08:00
color: var(--text-base);
/* text-14-medium */
font-family: var(--font-family-sans);
font-size: 14px;
font-style: normal;
2025-10-15 01:06:13 +08:00
font-weight: var(--font-weight-medium);
2025-10-24 04:27:31 +08:00
line-height: var(--line-height-large); /* 142.857% */
letter-spacing: var(--letter-spacing-normal);
2025-10-23 06:31:44 +08:00
2025-10-15 01:06:13 +08:00
white-space: nowrap;
flex-shrink: 0;
2025-10-17 03:53:44 +08:00
border-bottom: 1px solid var(--border-weak-base);
border-right: 1px solid var(--border-weak-base);
2025-10-24 04:27:31 +08:00
background-color: var(--background-base);
2025-10-15 01:06:13 +08:00
&:disabled {
pointer-events: none;
2025-10-17 03:53:44 +08:00
color: var(--text-weaker);
2025-10-15 01:06:13 +08:00
}
&:focus-visible {
outline: none;
2025-10-17 03:53:44 +08:00
box-shadow: 0 0 0 2px var(--border-focus);
2025-10-15 01:06:13 +08:00
}
&[data-selected] {
2025-10-24 04:27:31 +08:00
color: var(--text-strong);
2025-10-17 03:53:44 +08:00
background-color: transparent;
2025-10-15 01:06:13 +08:00
border-bottom-color: transparent;
}
&:hover:not(:disabled):not([data-selected]) {
2025-10-17 03:53:44 +08:00
color: var(--text-strong);
2025-10-15 01:06:13 +08:00
}
}
2025-10-23 06:31:44 +08:00
[data-slot="content"] {
2025-10-15 01:06:13 +08:00
overflow-y: auto;
flex: 1;
/* Hide scrollbar */
scrollbar-width: none;
-ms-overflow-style: none;
&::-webkit-scrollbar {
display: none;
}
&:focus-visible {
outline: none;
}
}
}