Repository navigation
feat(mosaic): clean up spacing and radii #10688
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
dc6c4cb
72a726b
52756b7
3b62457
0a9fb15
62c16c8
7181ccb
32d21cd
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 |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --- | ||
| --- |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,21 +25,29 @@ export const styles = stylex.create({ | |
| height: 'calc(var(--_cl-input-group-height) - 2 * var(--_cl-input-group-inset))', | ||
| }, | ||
| iconButton: { | ||
| width: 'calc(var(--_cl-input-group-height) - 2 * var(--_cl-input-group-inset))', | ||
| backgroundColor: 'transparent', | ||
| color: { | ||
| default: colorVars['--cl-color-foreground-secondary'], | ||
|
Comment on lines
+28
to
+30
Contributor
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.
|
||
| '@media (hover: hover)': { | ||
| default: null, | ||
| ':not([data-disabled]):hover': colorVars['--cl-color-foreground'], | ||
| }, | ||
| }, | ||
| width: `calc(2 * (${space['5']} - var(--_cl-input-group-inset)))`, | ||
| }, | ||
| start: { | ||
| borderEndStartRadius: 'max(0px, calc(var(--_cl-input-group-radius) - 1px))', | ||
| borderStartStartRadius: 'max(0px, calc(var(--_cl-input-group-radius) - 1px))', | ||
| paddingInlineStart: { | ||
| default: space['3'], | ||
| default: `calc(${space['3']} - 1px)`, | ||
| [stylex.when.descendant(':where(*)', buttonScope)]: 'max(0px, calc(var(--_cl-input-group-inset) - 1px))', | ||
| }, | ||
| }, | ||
| end: { | ||
| borderEndEndRadius: 'max(0px, calc(var(--_cl-input-group-radius) - 1px))', | ||
| borderStartEndRadius: 'max(0px, calc(var(--_cl-input-group-radius) - 1px))', | ||
| paddingInlineEnd: { | ||
| default: space['3'], | ||
| default: `calc(${space['3']} - 1px)`, | ||
| [stylex.when.descendant(':where(*)', buttonScope)]: 'max(0px, calc(var(--_cl-input-group-inset) - 1px))', | ||
| }, | ||
| }, | ||
|
|
||
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.
it'd be nice to have some sort of feedback hovering the buttons. there doesn't look to be any hint anymore.
Uh oh!
There was an error while loading. Please reload this page.
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.
Yeah, agreed, it needed some kind of feedback. I took the ghost fill off on purpose though. The button is a 34×26 target sitting 3px inside the input border, so a hover fill turns into a wide rectangle that crowds the edge and makes the icon feel pushed up against it. I wanted the icon to sit in the same spot as the other icons, like the chevrons in the select and combobox, so the spacing stays consistent.
Currently the icon button is a 26px square, which puts the icon 8px from the edge. The chevrons in the select and combobox sit 12px in, so the eye was 4px off from the rest of the icons and read as crammed into the corner, especially with the fill showing on hover.
I thought about making it wider so it sat the same distance away, but it felt off to me. Not 100% opposed though if you like it better. Can also raise it to the rest of the design team if we don't feel confident.

This is what I just updated and meant to have. This matches what I am doing with the hover state for the selects as well.
