Skip to content

Commit

Permalink
Add styles for <kbd> in markdown view
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed Nov 8, 2024
1 parent e071c62 commit 5480462
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Changed `source` view to take `source`, `syntax`, `lineNum`, `refs` and `maxSourceSizeToHighlight` options. It attempts to derive these values from `data` when options are not explicitly provided for backward compatibility. The `source` can be derived from `data` as `content` (for backward compatibility) or `source` property
- Removed `mime`, `binary` and `size` data options for `source` view
- Added styles for `<kbd>` in `markdown` view
- Improved string rendering in the values popup of `signature` view
- Fixed optional values statistics in `signature` view

Expand Down
18 changes: 17 additions & 1 deletion src/views/text/markdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
padding: 0;
padding-left: 1em;
color: #6a737d;
border-left: .25em solid rgba(191, 197, 203, 0.5);
border-left: .25em solid rgba(191, 197, 197, 0.5);
}
.discovery-root-darkmode .view-markdown blockquote {
color: #808993;
Expand All @@ -36,6 +36,22 @@
background-color: rgba(116, 126, 136, 0.2);
}

.view-markdown kbd {
--border-color: #ddd;
--bg-color: #f8f8f8;
padding: .15em .4em;
font-family: var(--discovery-monospace-font-family);
font-size: 90%;
border: 1px solid var(--border-color, #888);
border-radius: 6px;
box-shadow: 0 -1px var(--border-color, #888) inset;
background-color: var(--bg-color);
}
.discovery-root-darkmode .view-markdown kbd {
--border-color: #484848;
--bg-color: #181818;
}

.view-markdown sup {
vertical-align: top;
}
Expand Down

0 comments on commit 5480462

Please sign in to comment.