Skip to content
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

Merged
merged 10 commits into from Dec 15, 2022
Merged

Conversation

debs-obrien
Copy link
Contributor

  • 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

Screenshot 2022-12-02 at 13 26 40

Screenshot 2022-12-02 at 13 27 00

text-align: center;
padding: 5px 8px;
font-size: 14px;
color: var(--vscode-sideBarTitle-foreground);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already defined.

Copy link
Contributor Author

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;
Copy link
Member

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?

Copy link
Contributor Author

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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Contributor Author

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;
Copy link
Member

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?

Copy link
Contributor Author

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;
Copy link
Member

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?

Copy link
Contributor Author

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;
Copy link
Member

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.

Copy link
Contributor Author

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>;
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants