-
Notifications
You must be signed in to change notification settings - Fork 842
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
[EuiText] Add kbd
styles
#6049
[EuiText] Add kbd
styles
#6049
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_6049/ |
I wonder if we do want to go the component route for this as it would allow controlling the presentation for combinations like Cmd + C e.g. If it isn't something we want to enforce, this adding styles for |
Preview documentation changes for this PR: https://eui.elastic.co/pr_6049/ |
@chandlerprall and @constancecchen, For this type of implementation a component But for other usages, like documentation, just the HTML tag
So I'm assuming that docs sites are the best candidates to use this component/element. @chandlerprall do we need this as a component to be used in Regarding the
So I don't think we should enforce that in a component. But it is a very common practice to use the Concluding. I'm ok with the Let me know your thoughts. |
Haha I just argued against the component route in the spec doc 🙈 To be honest I think it's overkill, like making a component for the Like Elizabet said, I'm also not a huge fan of EDIT: From Michail's keyboard shortcuts research in elastic/kibana#90515, it looks like Google uses |
Let's keep this simple then and stick with
The page body is wrapped in an EuiText so the styles should automatically apply. mdx will use the browser's element unless the app overwrites it. Everything should Just Work right out of the box 🥳 |
- Remove extra newlines - Remove extra semicolons (already added by logicalCSS() util) - Refactor 1px border width to `thin` var - Refactor conditional kdb logic to `euiScaleText` vs a new util
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.
🎉
Preview documentation changes for this PR: https://eui.elastic.co/pr_6049/ |
Summary
Closes #5016.
This PR adds styles for
kbd
's withinEuiText
.src-docs/src/views/text/text.js
with the content from: https://gist.github.com/miukimiu/ed2274e98af630f46013fd767b4a9799.kbd
within differentEuiText
sizes:Code vs Figma
The implementation differs a little bit from Figma because of the way the font is rendered.
Checklist