Skip to content

Commit

Permalink
Merge pull request #663 from easyops-cn/steve/nav
Browse files Browse the repository at this point in the history
fix(): fix style in older browser without flex gap support
  • Loading branch information
qiaofengxi authored Dec 1, 2023
2 parents e1ff046 + e986947 commit 2f62743
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 19 deletions.
16 changes: 3 additions & 13 deletions bricks/nav/src/launchpad-button-v2/styles.shadow.css
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@

/* https://github.com/w3c/csswg-drafts/issues/3559#issuecomment-1758459996 */
@supports not (inset: 0) {
/* .content, */
.content,
.search-box,
.sidebar-menu,
.menu,
Expand All @@ -346,15 +346,6 @@
gap: 0;
}

.content {
display: grid;
grid-auto-flow: row;
}

.content:not(.loading) {
height: min-content;
}

.sidebar-menu > :not(:first-child),
.menu > :not(:first-child),
.sub-menu > :not(:first-child) {
Expand All @@ -373,8 +364,7 @@
margin-left: 8px;
}

/* .search-box,
.recent-visits {
.content > :not(:last-child) {
margin-bottom: 24px;
} */
}
}
32 changes: 26 additions & 6 deletions bricks/nav/src/launchpad-config/styles.shadow.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ ul {
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.sidebar-menu,
.menu,
.sub-menu {
display: flex;
Expand Down Expand Up @@ -119,11 +118,6 @@ ul {
width: 24px;
}

.menu-item > eo-dropdown-actions,
.menu-folder-label-wrapper > eo-dropdown-actions {
margin: -3px 0;
}

.menu-config:hover,
.menu-item > eo-link:hover::part(link),
.menu-item > eo-link:hover .menu-icon,
Expand All @@ -132,3 +126,29 @@ ul {
.menu-folder-label-wrapper > eo-link:hover .menu-item-toggle {
color: var(--color-brand-hover);
}

/* https://github.com/w3c/csswg-drafts/issues/3559#issuecomment-1758459996 */
@supports not (inset: 0) {
.sub-menu,
.menu,
.menu-group-label-wrapper,
.menu-folder-label-wrapper,
.menu-item:not(.folder),
.menu-item > eo-link::part(link) {
gap: 0;
}

.menu > :not(:first-child),
.sub-menu > :not(:first-child) {
margin-top: 14px;
}

.menu-icon {
margin-right: 8px;
}

eo-dropdown-actions,
.menu-item-toggle {
margin-left: 8px;
}
}

0 comments on commit 2f62743

Please sign in to comment.