-
Notifications
You must be signed in to change notification settings - Fork 12
Reduce rounded corner radius for markdown dropdown bars and atom cards #5672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,6 +64,11 @@ export default class MarkdownEditorModeSelect extends GlimmerComponent<Signature | |
|
|
||
| <style scoped> | ||
| .markdown-editor-mode-select { | ||
| /* Trim the trigger's corners: the default form-control radius reads a | ||
| touch too rounded here, so drop it 2px (scoped to this select). */ | ||
| --boxel-form-control-border-radius: calc( | ||
| var(--boxel-border-radius) - 2px | ||
| ); | ||
| /* Compact the trigger: tight padding and a small label↔caret gap, | ||
| via the BoxelSelect trigger tokens. */ | ||
| --boxel-select-trigger-padding: var(--boxel-sp-5xs) var(--boxel-sp-xxs); | ||
|
|
@@ -91,9 +96,20 @@ export default class MarkdownEditorModeSelect extends GlimmerComponent<Signature | |
| {{! template-lint-disable require-scoped-style }} | ||
| <style> | ||
| .boxel-select__dropdown.markdown-editor-mode-select-dropdown { | ||
| /* Match the trigger: 2px less rounded than the default menu radius. */ | ||
| --boxel-form-control-border-radius: calc( | ||
| var(--boxel-border-radius) - 2px | ||
| ); | ||
|
Comment on lines
+99
to
+102
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Claude Code 🤖] Confirmation — this second token override is required, not redundant. It can look like the trigger-side
So this rule is the only path by which the menu's This also stays correct if the select ever stops using |
||
| width: max-content; | ||
| min-width: 7rem; | ||
| } | ||
| /* Shorter rows: tighten the vertical padding so the menu reads less tall. | ||
| (0,3,0) specificity wins over BoxelSelect's own row rules regardless of | ||
| stylesheet order. */ | ||
| .boxel-select__dropdown.markdown-editor-mode-select-dropdown | ||
| .boxel-select-option-item { | ||
| padding-block: var(--boxel-sp-3xs); | ||
| } | ||
|
Comment on lines
+106
to
+112
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Claude Code 🤖] Confirmation — the specificity claim in this comment checks out. BoxelSelect's default row padding ( |
||
| .markdown-editor-mode-select-dropdown .boxel-select-option-text { | ||
| white-space: nowrap; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Claude Code 🤖] Confirmation — the hover overlay ring follows this change automatically. The overlay that draws the outline around a hovered atom (
packages/host/app/components/operator-mode/overlays.gts, theoffsetmiddleware) mirrorsgetComputedStyle(reference).borderRadiusfrom the registered card element onto the floating overlay, and this slot span is that reference (it carriescontext.cardComponentModifier). So the ring tracks the reduced radius with no host-side change needed — the two won't drift.Two small notes, neither blocking:
--boxel-border-radiusis undefined, the fallback math lands atcalc(4px - 2px)= 2px — proportionally a much bigger cut than 10px → 8px. In practice the token is always defined via boxel-ui's variables.css, and keeping the4pxfallback matches this file's convention, so this is fine as written.--boxel-border-radiusbelow 2px, the calc result goes negative and CSS clamps it to 0 at used-value time, so there's no invalid-declaration fallout.