Skip to content

Commit a2d8a38

Browse files
committed
Fix inline code/kbd/samp/var vertical padding (picocss/pico#651). Align var padding with code elements.
1 parent 158e324 commit a2d8a38

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,6 @@ These µCSS rules exist to fix PicoCSS default behaviors:
5858
- `:where([role=group], [role=search]) + small` — Fix helper text not styled after input groups (picocss/pico#540, picocss/pico#700) — remove when fixed upstream
5959
- `[data-tooltip] { display: inline-block }` — Fix tooltip mispositioned on inline elements in Chromium (picocss/pico#678) — remove when fixed upstream
6060
- `[data-tooltip]::before { white-space: pre-line; max-width: 20rem }` — Fix tooltip overflow on long text, support explicit line breaks (picocss/pico#665, picocss/pico#715) — remove when fixed upstream
61+
- `code, kbd, samp { padding: 0.125rem 0.375rem }` — Fix inline code vertical padding too thick (picocss/pico#651) — remove when fixed upstream
6162
- PicoCSS sets `:where(table) { width: 100% }` — all tables are fullwidth by default, no `.table-fullwidth` class needed
6263
- PicoCSS `.outline` button style (3 colors) coexists with µCSS `.btn-outline` (11 colors) — different selectors, no conflict

css/mu.component.var.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var {
88
font-size: 0.875em;
99
font-style: italic;
1010
display: inline-block;
11-
padding: 0.375rem;
11+
padding: 0.125rem 0.375rem;
1212
border-radius: var(--mu-border-radius);
1313
background: var(--mu-code-background-color);
1414
color: var(--mu-code-color);

css/mu.utilities.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ li ol {
3535
max-width: 20rem;
3636
}
3737

38+
/* PicoCSS bugfix: inline code vertical padding too thick (picocss/pico#651) — remove when fixed upstream */
39+
code, kbd, samp {
40+
padding: 0.125rem 0.375rem;
41+
}
42+
3843
/* Positioning */
3944

4045
/* Stick to top on scroll (stays in document flow) */

0 commit comments

Comments
 (0)