| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- :root {
- --editor-tab-max-path-length: 250px;
- --editor-tab-divider-color: var(--neutral-70);
- --editor-tab-row-height: var(--review-panel-header-height, 36px);
- --editor-tab-drop-indicator-width: 5px;
- --editor-tab-divider-width: 1px;
- }
- @include theme('light') {
- --editor-tab-divider-color: var(--border-divider);
- }
- .editor-tabs-container {
- display: flex;
- flex-direction: row;
- align-items: center;
- flex: 0 0 auto;
- min-height: var(--editor-tab-row-height);
- background: var(--bg-secondary-themed);
- justify-content: space-between;
- .review-panel-header-slot {
- display: contents;
- }
- .editor-tabs-labs-icon {
- flex: 0 0 auto;
- padding: 0 var(--spacing-02);
- .material-symbols {
- font-size: 16px;
- }
- }
- }
- .editor-tabs-row {
- display: flex;
- flex-direction: row;
- height: var(--editor-tab-row-height);
- list-style: none;
- padding: 0;
- margin: 0;
- flex: 1;
- background: var(--bg-secondary-themed);
- overflow-x: auto;
- scrollbar-width: thin;
- }
- .editor-file-tab {
- --tab-bg-color: var(--bg-secondary-themed);
- --tab-text-color: var(--content-secondary-themed);
- display: flex;
- position: relative;
- border-right: var(--editor-tab-divider-width) solid
- var(--editor-tab-divider-color);
- padding: var(--spacing-01) var(--spacing-02) 0 var(--spacing-02);
- &:first-child {
- padding-left: 0;
- }
- &:last-child {
- padding-right: 0;
- }
- &.tab-selected,
- &:has(+ .tab-selected) {
- border-right-color: transparent;
- }
- .editor-file-tab-content {
- display: inline-flex;
- align-items: center;
- gap: var(--spacing-02);
- justify-content: center;
- box-sizing: border-box;
- padding: var(--spacing-02) var(--spacing-03);
- background: var(--tab-bg-color);
- color: var(--tab-text-color);
- font-size: var(--font-size-02);
- flex-direction: row;
- cursor: pointer;
- user-select: none;
- border: 1px solid transparent;
- border-bottom-width: 0;
- }
- &.tab-selected {
- --tab-bg-color: var(--bg-primary-themed);
- --tab-text-color: var(--content-primary-themed);
- .editor-file-tab-content {
- border-top-left-radius: var(--border-radius-medium);
- border-top-right-radius: var(--border-radius-medium);
- border-color: var(--editor-tab-divider-color);
- }
- }
- &:not(.tab-selected) .editor-file-tab-content:hover {
- background-color: var(--bg-tertiary-themed);
- border-radius: var(--border-radius-medium);
- }
- .material-symbols {
- vertical-align: middle;
- font-size: var(--font-size-03);
- }
- .file-tree-icon,
- .linked-file-highlight {
- color: var(--tab-text-color);
- }
- .editor-file-tab-icon {
- position: relative;
- display: inline-flex;
- align-items: center;
- flex: 0 0 auto;
- }
- .file-tree-icon {
- margin-right: var(--spacing-01);
- }
- .linked-file-icon {
- position: relative;
- left: -2px;
- }
- .linked-file-highlight {
- position: absolute;
- top: 6px;
- left: 6px !important;
- font-size: var(--font-size-01);
- }
- &.tab-drop-left::after,
- &.tab-drop-right::after,
- .editor-tabs-row-hovered &:last-child::after {
- content: '';
- position: absolute;
- top: 0;
- bottom: 0;
- width: var(--editor-tab-drop-indicator-width);
- background-color: var(--border-primary-themed);
- }
- &.tab-drop-right::after,
- .editor-tabs-row-hovered &:last-child::after {
- right: calc(
- var(--editor-tab-drop-indicator-width) /
- -2 - var(--editor-tab-divider-width)
- );
- }
- &.tab-drop-left::after {
- left: calc(var(--editor-tab-drop-indicator-width) / -2);
- }
- &.tab-temporary {
- font-style: italic;
- }
- .editor-file-tab-action {
- display: flex;
- align-items: center;
- }
- .editor-file-tab-close-action {
- background: transparent;
- opacity: 0;
- border: none;
- color: var(--tab-text-color);
- cursor: pointer;
- margin: 0;
- padding: 0;
- display: flex;
- align-items: center;
- &:hover {
- color: var(--content-primary-themed);
- }
- }
- &:hover,
- &:focus-within,
- &.tab-selected {
- .editor-file-tab-close-action {
- opacity: 1;
- }
- }
- }
- .editor-file-tab-path {
- text-wrap: nowrap;
- max-width: var(--editor-tab-max-path-length);
- text-overflow: ellipsis;
- white-space: nowrap;
- direction: rtl;
- overflow: hidden;
- }
|