-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
chore: recorder button styling #19231
Conversation
debs-obrien
commented
Dec 2, 2022
- improved styling based on GitHub paddings but with VS Code colors
- added a span for buttons with text and icon to easily add padding
- added type for button for better accessibility
- improved padding of wrapper for explore text
text-align: center; | ||
padding: 5px 8px; | ||
font-size: 14px; | ||
color: var(--vscode-sideBarTitle-foreground); |
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.
This is already defined.
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.
ok removed except for padding which is needed
display: inline-flex; | ||
align-items: center; | ||
border-radius: 6px; |
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.
What are you aligning the visual language with?
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.
using the border radius of 6px as same as githubs buttons
display: inline-flex; | ||
align-items: center; | ||
border-radius: 6px; | ||
border: 1px solid var(--vscode-dropdown-border); |
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.
ditto
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.
these seems to be best color for border for both light and dark mode as inspired by github buttons
display: inline-flex; | ||
align-items: center; | ||
border-radius: 6px; | ||
border: 1px solid var(--vscode-dropdown-border); | ||
font-family: inherit; |
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.
What are you resetting from?
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.
removed
border-radius: 6px; | ||
border: 1px solid var(--vscode-dropdown-border); | ||
font-family: inherit; | ||
line-height: 20px; |
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.
We already do flex + align items, why is this needed?
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.
removed
font-family: inherit; | ||
line-height: 20px; | ||
white-space: nowrap; | ||
vertical-align: middle; |
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.
You should not use this style in flex.
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.
removed
onClick = () => {}, | ||
}) => { | ||
let className = `toolbar-button ${icon}`; | ||
if (toggled) | ||
className += ' toggled'; | ||
return <button className={className} onClick={onClick} title={title} disabled={!!disabled}><span className={`codicon codicon-${icon}`}></span>{ children }</button>; | ||
return <button className={className} type={type} onClick={onClick} title={title} disabled={!!disabled}><span className={`codicon codicon-${icon}`}></span>{ children }</button>; |
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.
How can toolbar button be a submit / reset?
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.
you're right