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

Add styles for <kbd> elements #1906

Merged
merged 1 commit into from
Oct 9, 2022
Merged

Conversation

brettchalupa
Copy link
Contributor

Allows for special styles to call them out since they're different than normal text and different than code. They can make use of styles they inherit for font style and weight.

Notes on changes:

  • Added new CSS variables for reused elements
  • The font-* rules are separate for each aspect so that they can inherit bold/italic/etc
  • I picked the color vars based on what looks good, not necessarily based on logical name reuse

Closes #1813

Screenies

image

Screen Shot 2022-10-06 at 4 07 32 PM

Screen Shot 2022-10-06 at 4 07 28 PM

Screen Shot 2022-10-06 at 4 07 24 PM

Screen Shot 2022-10-06 at 4 07 20 PM

And here's how it looks in a list with bold styles applied:

Screen Shot 2022-10-06 at 4 07 13 PM

Allows for special styles to call them out since they're different than
normal text and different than code. They can make use of styles they
inherit for font style and weight.

Notes on changes:

- Added new CSS variables for reused elements
- The font-* rules are separate for each aspect so that they can inherit
  bold/italic/etc

Closes rust-lang#1813
Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

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

Thanks!

@ehuss ehuss merged commit f8df8ed into rust-lang:master Oct 9, 2022
@brettchalupa brettchalupa deleted the kbd-styles-1813 branch October 10, 2022 14:05
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.

Feature Suggestion: Keyboard Keys Rendering
3 participants