mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 05:20:01 +00:00
202 lines
3.7 KiB
SCSS
202 lines
3.7 KiB
SCSS
:host {
|
|
display: flex;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
user-select: none;
|
|
-webkit-user-drag: none;
|
|
will-change: transform;
|
|
cursor: default;
|
|
animation: 0.5s ease-out fadeIn;
|
|
transition: 0.25s background;
|
|
|
|
--tabs-height: calc(38px * var(--spaciness));
|
|
--side-tab-width: calc(200px * var(--spaciness));
|
|
}
|
|
|
|
$tab-border-radius: 4px;
|
|
|
|
.wrap {
|
|
display: flex;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
flex-direction: row;
|
|
}
|
|
|
|
.content {
|
|
width: 100vw;
|
|
flex: 1 1 0;
|
|
min-height: 0;
|
|
display: flex;
|
|
flex-direction: column-reverse;
|
|
|
|
&.tabs-on-top {
|
|
flex-direction: column;
|
|
}
|
|
|
|
&.tabs-on-side {
|
|
flex-direction: row-reverse;
|
|
|
|
&.tabs-on-top {
|
|
flex-direction: row;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
.content.tabs-on-side > .tab-bar {
|
|
height: 100%;
|
|
width: var(--side-tab-width);
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
flex-direction: column;
|
|
background: rgba(0, 0, 0, 0.25);
|
|
|
|
.tabs {
|
|
width: var(--side-tab-width);
|
|
flex: none;
|
|
flex-direction: column;
|
|
|
|
tab-header {
|
|
flex: 0 0 var(--tabs-height);
|
|
}
|
|
}
|
|
|
|
.drag-space {
|
|
flex: auto;
|
|
}
|
|
|
|
&>.inset {
|
|
opacity: 0;
|
|
}
|
|
|
|
::ng-deep tab-header {
|
|
width: 100% !important;
|
|
}
|
|
}
|
|
|
|
|
|
.tab-bar {
|
|
flex: none;
|
|
height: var(--tabs-height);
|
|
display: flex;
|
|
width: 100%;
|
|
|
|
.btn-tab-bar {
|
|
line-height: calc(var(--tabs-height) + 2px);
|
|
height: var(--tabs-height);
|
|
cursor: pointer;
|
|
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0 12px;
|
|
flex: 0 0 auto;
|
|
border-bottom: 2px solid transparent;
|
|
transition: 0.125s all ease-out;
|
|
font-size: 12px;
|
|
|
|
text-transform: uppercase;
|
|
font-weight: bold;
|
|
color: #aaa;
|
|
border: none;
|
|
border-radius: 0;
|
|
|
|
align-items: center;
|
|
|
|
&.dropdown-toggle::after {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
&>.tabs {
|
|
flex: 0 1 auto;
|
|
display: flex;
|
|
min-width: 0;
|
|
}
|
|
|
|
&>.drag-space {
|
|
min-width: 1px;
|
|
flex: 1 0 1%;
|
|
margin-top: 2px; // for window resizing
|
|
-webkit-app-region: drag;
|
|
|
|
&.persistent {
|
|
min-width: 72px; // 2 x 36 px height, ie 2 squares
|
|
}
|
|
}
|
|
|
|
& > .inset {
|
|
width: calc(70px + 15px * var(--spaciness));
|
|
height: var(--tabs-height);
|
|
flex: none;
|
|
-webkit-app-region: drag;
|
|
}
|
|
|
|
window-controls {
|
|
padding-left: 10px;
|
|
}
|
|
|
|
.cdk-drag-animating {
|
|
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
}
|
|
|
|
.cdk-drop-list-dragging tab-header:not(.cdk-drag-placeholder) {
|
|
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
}
|
|
}
|
|
|
|
.content {
|
|
flex: 1 1 0;
|
|
position: relative;
|
|
min-height: 0;
|
|
min-width: 0;
|
|
|
|
> .content-tab {
|
|
position: absolute;
|
|
top: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
|
|
left: -1000%;
|
|
|
|
&.content-tab-active {
|
|
left: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
hotkey-hint {
|
|
position: absolute;
|
|
bottom: 0;
|
|
right: 0;
|
|
max-width: 300px;
|
|
}
|
|
|
|
::ng-deep .btn-tab-bar svg,
|
|
::ng-deep .btn-tab-bar + .dropdown-menu svg {
|
|
width: calc(22px * var(--spaciness));
|
|
height: calc(16px * var(--spaciness));
|
|
fill: white;
|
|
fill-opacity: 0.75;
|
|
}
|
|
|
|
::ng-deep .btn-update svg {
|
|
fill: cyan;
|
|
}
|
|
|
|
::ng-deep .broadcast-status-warning {
|
|
background: red;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 50%;
|
|
padding: 5px 10px;
|
|
color: black;
|
|
border-radius: 0 0 5px 5px;
|
|
|
|
width: 300px;
|
|
margin-left: -150px;
|
|
text-align: center;
|
|
font-weight: bold;
|
|
}
|