Skip to content

Commit

Permalink
refactor: small styling improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Aug 23, 2024
1 parent 4e0674f commit 602e2e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion formatters/html/head.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ export function createStyleSheet() {
text-overflow: ellipsis;
padding: 0 10px;
}
.dumper-dump pre {
.dumper-dump pre, .dumper-dump code {
font-family: Menlo, Monaco, Consolas, monospace;
}
.dumper-dump pre {
line-height: 24px;
font-size: 15px;
overflow-x: scroll;
Expand All @@ -43,6 +45,8 @@ export function createStyleSheet() {
}
.dumper-dump .dumper-toggle span {
display: inline-block;
position: relative;
top: 3px;
}
.dumper-dump .dumper-toggle[aria-expanded="true"] span {
transform: rotate(90deg);
Expand Down
4 changes: 2 additions & 2 deletions formatters/html/printers/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
* file that was distributed with this source code.
*/

import { htmlEscape, wordWrap } from '../helpers.js'
import { HTMLFormatter } from '../main.js'
import type { TokenPrinters } from '../types.js'
import { htmlEscape, wordWrap } from '../helpers.js'

const dropdownIcon = `<svg version="1.1" role="presentation" viewBox="0 0 256 512" style="width: 20px; height: 16px; color: inherit; position: relative; top: 3px;"><path d="M246.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6l0 256c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l128-128z" fill="currentColor"></path> </svg>`
const dropdownIcon = `<svg version="1.1" role="presentation" viewBox="0 0 256 512" style="width: 20px; height: 16px; color: inherit;"><path d="M246.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6l0 256c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l128-128z" fill="currentColor"></path> </svg>`

function openingBrace(formatter: HTMLFormatter) {
return `<span style="${formatter.styles.braces}">{</span>`
Expand Down

0 comments on commit 602e2e3

Please sign in to comment.