Skip to content

Commit 6792143

Browse files
authored
Merge pull request #1776 from basecamp/fizzy-menu-ui-updates
Add dividers and move icon to left
2 parents d3d3c55 + 0cbd8d1 commit 6792143

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

app/assets/stylesheets/nav.css

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,19 @@
102102
}
103103
}
104104

105+
.nav__section {
106+
border-block-end: 1px solid var(--color-ink-lighter);
107+
font-size: var(--text-small);
108+
109+
&:first-of-type {
110+
border-block-start: 1px solid var(--color-ink-lighter);
111+
}
112+
113+
&[open] {
114+
padding-block-end: 0.4rem;
115+
}
116+
}
117+
105118
.nav__header {
106119
--actions-width: 2rem;
107120

@@ -207,7 +220,6 @@
207220

208221
.nav__footer {
209222
background-color: var(--color-canvas);
210-
border-block-start: 1px solid var(--color-ink-lighter);
211223
font-size: var(--text-small);
212224
line-height: 1.6;
213225
margin-block-start: calc(-1 * var(--nav-section-gap));

app/assets/stylesheets/popup.css

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
--panel-padding: var(--block-space);
66
--panel-size: auto;
77
--popup-icon-size: 24px;
8-
--popup-item-padding-inline: 0.5rem;
8+
--popup-item-padding-inline: 0.4rem;
99
--popup-display: flex;
1010

1111
inset: 0 auto auto 50%;
@@ -53,10 +53,10 @@
5353
.popup__section-title {
5454
background: var(--color-canvas);
5555
font-size: var(--text-small);
56-
font-weight: bold;
56+
font-weight: 600;
5757
inset-block-start: 0;
5858
list-style: none;
59-
padding: var(--block-space-half) var(--inline-space-half);
59+
padding: 0.75ch var(--inline-space-half);
6060
position: sticky;
6161
text-transform: uppercase;
6262
z-index: 1;
@@ -65,17 +65,18 @@
6565
align-items: center;
6666
cursor: pointer;
6767
display: flex;
68-
gap: 2ch;
69-
justify-content: space-between;
7068
}
7169

7270
&::-webkit-details-marker {
7371
display: none;
7472
}
7573

7674
.icon--caret-down {
77-
opacity: 0.66;
75+
font-size: 1ch;
76+
inset: 50% auto auto 0;
77+
position: absolute;
7878
transition: rotate 150ms ease-out;
79+
translate: -100% -50%;
7980
}
8081

8182
.popup__section:not([open]) & {

app/helpers/filters_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ def filter_dialog(label, &block)
4141
end
4242

4343
def collapsible_nav_section(title, **properties, &block)
44-
tag.details class: "popup__section", data: { action: "toggle->nav-section-expander#toggle", nav_section_expander_target: "section", nav_section_expander_key_value: title.parameterize }, open: true, **properties do
44+
tag.details class: "nav__section popup__section", data: { action: "toggle->nav-section-expander#toggle", nav_section_expander_target: "section", nav_section_expander_key_value: title.parameterize }, open: true, **properties do
4545
concat(tag.summary(class: "popup__section-title") do
46-
concat title
4746
concat icon_tag "caret-down"
47+
concat title
4848
end)
4949
concat(tag.ul(class: "popup__list") do
5050
capture(&block)

0 commit comments

Comments
 (0)