Merged
Conversation
Out of the box, x-navbar shipped as a rounded, fully-bordered card (`--x-navbar-radius: 1rem` and `border: 1px solid ...` on all four sides). The demo worked around this with its own overrides, which is a tell that the default was wrong for the primary use case. Drop the radius to 0 and replace the full border with a single 1px bottom separator so a bare `<x-navbar>` renders like a real site header. Each of the four variants had `border-color` / "no border" rules that assumed a 4-sided base border; updated to target `border-bottom-color` instead. Adds two computed-style regression tests: one asserting the default has border-bottom-only / 0px radius on all corners, and one confirming `--x-navbar-radius: 1rem` is still a valid escape hatch for consumers who want the rounded card look. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Out of the box
x-navbarshipped as a rounded, fully-bordered card (--x-navbar-radius: 1rem+border: 1px solid ...on all four sides), and the demo worked around it with its own overrides — a tell that the default was wrong for the primary use case. This PR makes a bare<x-navbar>look like a real site header: edge-to-edge, no rounded corners, a single 1px bottom separator.Changes
x_navbar.cljsstyles. Host default--x-navbar-radius→0.[part=base]replacesborder: 1px solid ...withborder: 0; border-bottom: 1px solid var(--x-navbar-border). The four variants (default,subtle,inverted,transparent) had border-related overrides assuming a 4-sided base border; rewritten to targetborder-bottom-colorinstead.docs/x-navbar.md.--x-navbar-radiusrow updated (default0) and renamed--x-navbar-borderdescription from "Border color" to "Bottom separator colour". Added a one-line note explaining the card look is one override away.demo/x-navbar.html. Removes the now-redundant--x-navbar-radius: 0on.topbar. The demo proves the new default matches the old demo visually without any override.default-has-bottom-border-only-testassertsborder-top/left/right-style: none, a non-noneborder-bottom-style, and0pxon all four border-*-radius corners;radius-escape-hatch-testconfirms thatstyle="--x-navbar-radius: 1rem"still takes effect for consumers who want the card look.Escape hatch
Anyone who relied on the old look sets
--x-navbar-radius: 1rem(e.g. via inline style or a wrapper class) and optionally wraps<x-navbar>in a container that provides page-edge padding. The--x-navbar-*custom properties are unchanged; only their default fallback values moved.Test plan
clj-kondo --lint src test— 0 warnings.npx shadow-cljs compile test— 0 warnings.npx shadow-cljs release lib— 0 warnings under Closure Advanced.npx shadow-cljs watch test→ http://localhost:8021 — allbaredom.components.x-navbar.*deftests green including the two new ones.npx shadow-cljs watch app→ http://localhost:8000 → x-navbar demo:stickyandelevatedstill work.variant="subtle": no visible separator, transparent feel.variant="inverted": dark background with a subtle bottom edge (not a four-sided border).variant="transparent": no background and no separator.style="--x-navbar-radius:1rem"on an ad-hoc navbar — rounded corners reappear.Risk
Anyone who dropped
<x-navbar>into a page without any styling will see a different look. The escape hatch is documented and one line. This is a default-CSS change rather than an API shape change, so no version bump in this PR — that's a release decision to make separately.🤖 Generated with Claude Code