feat(surfaces): COSS inset-highlight on floating surfaces - #27
Merged
Conversation
…ltip/hovercard Ports COSS's surface signature (packages/ui popover/dialog/select/tooltip): a before-pseudo inset top-highlight on floating surfaces — before:absolute before:inset-0 before:shadow-[0_1px_rgba(0,0,0,0.04)] dark:before:shadow-[0_-1px_rgba(255,255,255,0.06)] - Tooltip aligned to COSS: rounded-md + text-xs + shadow-md - Surfaces are divs (unlike inputs), so ::before ports cleanly with no composition conflict Verified: type-check, lint, build, and visual check (dialog open, selects page).
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.
Third batch of the COSS design match — the floating surface primitives.
What changed
Adds COSS's surface signature (from
packages/uipopover/dialog/select/tooltip) — abefore:pseudo-element inset top-highlight on:PopoverContent,SelectContent,DialogContent,HoverCardContentTooltipalso aligned to COSS:rounded-lg→rounded-md,text-sm→text-xs, +shadow-mdThe highlight:
before:absolute before:inset-0 before:shadow-[0_1px_rgba(0,0,0,0.04)](light) /dark:before:shadow-[0_-1px_rgba(255,255,255,0.06)]— the subtle raised edge COSS puts on cards/menus.Why this (and not the input wrapper)
Surfaces are
<div>s, so::beforeports cleanly. COSS's input wrapper can't be ported without breaking the 21 icon demos that rely on<Input>being a singlepeerelement with sibling-overlaid icons (peer-disabled:,class="peer ps-9") — documented as future work in MAINTAINING.md.Verification