penpot/frontend/src/app/main/ui/workspace/left_header.scss
Eva 5cfc135791 🐛 Fix typography dropdown menus being clipped out in the left sidebar
Co-authored-by: Belén Albeza <belen@hey.com>
2024-01-18 10:55:06 +01:00

174 lines
3.0 KiB
SCSS

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) KALEIDOS INC
@import "refactor/common-refactor.scss";
.workspace-header-left {
display: flex;
align-items: center;
padding: $s-8 $s-8 $s-4 $s-8;
}
.main-icon {
@include flexCenter;
width: $s-32;
height: $s-32;
margin-right: $s-4;
svg {
min-height: $s-32;
width: $s-32;
fill: var(--icon-foreground-hover);
}
}
.project-tree {
position: relative;
flex-grow: 1;
max-width: calc(100% - $s-64);
}
.project-name,
.file-name {
@include tabTitleTipography;
@include textEllipsis;
height: $s-16;
width: 100%;
padding-bottom: $s-2;
margin-top: calc(-1 * $s-2);
color: var(--title-foreground-color);
cursor: pointer;
}
.file-name {
@include medTitleTipography;
text-transform: none;
color: var(--title-foreground-color-hover);
}
.file-name-input {
@include flexCenter;
height: 100%;
width: 100%;
margin: 0;
border: 0;
border-radius: $br-4;
background-color: var(--input-background-color);
font-size: $fs-14;
color: var(--input-foreground-color);
z-index: $z-index-20;
white-space: break-spaces;
&:focus {
outline: none;
}
}
.shared-badge {
@include flexCenter;
width: $s-16;
height: $s-32;
margin-right: $s-4;
svg {
stroke: var(--button-secondary-foreground-color-rest);
fill: none;
height: $s-16;
width: $s-16;
}
}
.menu-btn {
@extend .button-tertiary;
height: $s-32;
width: calc($s-24 + $s-4);
padding: 0;
border-radius: $br-8;
svg {
@extend .button-icon;
stroke: var(--icon-foreground);
}
}
.menu {
@extend .menu-dropdown;
top: $s-48;
left: calc(var(--width, $s-256) - $s-16);
width: $s-192;
margin: 0;
}
.menu-item {
@extend .menu-item-base;
cursor: pointer;
.open-arrow {
@include flexCenter;
svg {
@extend .button-icon;
stroke: var(--icon-foreground);
}
}
&:hover {
color: var(--menu-foreground-color-hover);
.open-arrow {
svg {
stroke: var(--menu-foreground-color-hover);
}
}
.shortcut-key {
color: var(--menu-shortcut-foreground-color-hover);
}
}
}
.separator {
margin-top: $s-8;
height: $s-4;
border-top: $s-1 solid $db-secondary;
}
.shortcut {
@extend .shortcut-base;
}
.shortcut-key {
@extend .shortcut-key-base;
}
.sub-menu {
@extend .menu-dropdown;
left: calc(var(--width, $s-256) + $s-180);
width: $s-192;
min-width: calc($s-272 - $s-2);
width: 110%;
.submenu-item {
@extend .menu-item-base;
&:hover {
color: var(--menu-foreground-color-hover);
.shortcut-key {
color: var(--menu-shortcut-foreground-color-hover);
}
}
}
&.file {
top: $s-48;
}
&.edit {
top: $s-76;
}
&.view {
top: $s-116;
}
&.preferences {
top: $s-148;
}
&.help-info {
top: $s-196;
}
}