Skip to content

Commit a8d7ac5

Browse files
committed
Fix nested dropdowns blocking parent clicks (picocss/pico#614).
Fix double border in grouped outline buttons (#3).
1 parent ff41d7d commit a8d7ac5

25 files changed

Lines changed: 48 additions & 21 deletions

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ These µCSS rules exist to fix PicoCSS default behaviors:
6060
- `[data-tooltip] { display: inline-block }` — Fix tooltip mispositioned on inline elements in Chromium (picocss/pico#678) — remove when fixed upstream
6161
- `[data-tooltip]::before/::after` use `--mu-inverted-background`/`--mu-inverted-color` instead of themed contrast — PicoCSS contrast is theme-dependent in µCSS, not always readable as tooltip background
6262
- `[data-tooltip]::before { white-space: pre-line; width: max-content; max-width: 20rem }` — Fix tooltip overflow on long text, support explicit line breaks, comfortable width (picocss/pico#665, picocss/pico#715) — remove when fixed upstream
63+
- `details.dropdown details.dropdown[open] > summary::before { display: none }` — Fix nested dropdowns blocking parent clicks (picocss/pico#614) — remove when fixed upstream
6364
- `small { font-size: var(--mu-font-size) }` — Fix `<small>` font-size not applied (picocss/pico#561) — remove when fixed upstream
6465
- `code, kbd, samp { padding: 0.125rem 0.375rem }` — Fix inline code vertical padding too thick (picocss/pico#651) — remove when fixed upstream
6566
- PicoCSS sets `:where(table) { width: 100% }` — all tables are fullwidth by default, no `.table-fullwidth` class needed

DECISIONS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Fixes integrated into µCSS. The "Temporary" column indicates workarounds that s
1111
| #540, #700 | Helper text (`<small>`) not styled after input groups | mu.utilities.css | Yes |
1212
| #634, #664 | Safari 18.2+ truncates dropdown text in nav | mu.component.nav.css | Yes |
1313
| #561 | `<small>` font-size not applied (variable set but unused) | mu.utilities.css | Yes |
14+
| #614 | Nested dropdowns: parent menu clicks blocked by inner overlay | mu.utilities.css | Yes |
1415
| #651 | Inline code/kbd/samp vertical padding too thick | mu.utilities.css, mu.component.var.css | Yes |
1516
| #663 | Striped table: hidden rows break odd/even alternation | mu.component.table.css | Yes |
1617
| #665, #715 | Tooltip overflow on long text, multiline support | mu.utilities.css | Yes |

css/mu.component.button.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,20 @@
195195
color: var(--mu-primary-hover);
196196
}
197197

198+
/*
199+
* Grouped outline buttons: fix double border at junction.
200+
* PicoCSS uses margin-left: calc(border-width * -1) to overlap adjacent borders,
201+
* but user-agent button margins can prevent exact overlap.
202+
* Fix: reset margins on all group children, and remove the inner left border
203+
* on non-first outline buttons (both PicoCSS .outline and µCSS .btn-outline).
204+
*/
205+
[role=group] > :is(button, [type=submit], [type=button], [type=reset], [role=button]) {
206+
margin: 0;
207+
}
208+
[role=group] > :not(:first-child):is(.outline, .btn-outline) {
209+
border-left-width: 0;
210+
}
211+
198212
/* Disabled */
199213
.btn[aria-disabled="true"] {
200214
opacity: 0.5;

css/mu.utilities.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ li ol {
4848
max-width: 20rem;
4949
}
5050

51+
/*
52+
* PicoCSS bugfix: nested dropdowns block parent clicks (picocss/pico#614) — remove when fixed upstream
53+
* PicoCSS adds a 100vw × 100vh fixed overlay on every open dropdown's summary::before
54+
* to catch outside clicks. With nested dropdowns, the inner overlay (later in source order)
55+
* paints over the parent's menu items and prevents interaction.
56+
* Fix: disable the overlay on nested dropdowns — the parent's overlay still handles outside clicks.
57+
*/
58+
details.dropdown details.dropdown[open] > summary::before {
59+
display: none;
60+
}
61+
5162
/* PicoCSS bugfix: <small> font-size not applied (picocss/pico#561) — remove when fixed upstream */
5263
/* PicoCSS sets --pico-font-size: 0.875em on small but never applies it; browser uses "smaller" instead */
5364
small {

dist/mu.amber.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mu.azure.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mu.blue.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mu.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mu.cyan.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mu.fuchsia.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)