Skip to content

Commit

Permalink
add back the class target
Browse files Browse the repository at this point in the history
  • Loading branch information
danilo-leal committed Oct 11, 2023
1 parent 0920429 commit aea4529
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions docs/pages/experiments/docs/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,5 @@ https://spec.commonmark.org/0.30/#links

## kbd tag

**In isolation:** <kbd class="key">caps lock</kbd>

**In context:** The following demo shows how the `focusableWhenDisabled` prop works—use the <kbd>Tab</kbd> key to navigate within this document to see that only the second Button accepts the focus:
Make sure to include the `class="key"` in each individual `kbd` element.
That's because when referring to two keys that should be pressed together-for example, <kbd><kbd class="key">Ctrl</kbd>+<kbd class="key">N</kbd></kbd>-all the individual `kbd` elements should be wrapped by a parent `kbd`, and we don't add styles to just the tag.
4 changes: 2 additions & 2 deletions docs/src/modules/components/MarkdownElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ const Root = styled('div')(
flexShrink: 0,
backgroundColor: `var(--muidocs-palette-divider, ${lightTheme.palette.divider})`,
},
'& kbd': {
'& kbd.key': {
padding: 6,
display: 'inline-block',
whiteSpace: 'nowrap',
Expand Down Expand Up @@ -681,7 +681,7 @@ const Root = styled('div')(
'& a code': {
color: `var(--muidocs-palette-primary-light, ${darkTheme.palette.primary.light})`,
},
'& kbd': {
'& kbd.key': {
color: `var(--muidocs-palette-text-primary, ${darkTheme.palette.text.primary})`,
backgroundColor: `var(--muidocs-palette-primaryDark-800, ${darkTheme.palette.primaryDark[800]})`,
border: `1px solid var(--muidocs-palette-primaryDark-600, ${darkTheme.palette.primaryDark[600]})`,
Expand Down

0 comments on commit aea4529

Please sign in to comment.