Skip to content

Commit 697194b

Browse files
committed
Don't let pre tags switch to useragent monospace font.
1 parent 5aa99e3 commit 697194b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

browser-extension/src/overtype/styles.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ export function generateStyles(options = {}) {
2121
mobile = {},
2222
} = options;
2323

24-
fontFamily = "inherit !important"
25-
fontSize = "var(--text-body-size-medium) !important"
24+
fontFamily = "inherit";
25+
fontSize = "var(--text-body-size-medium)";
2626

2727
// Generate mobile overrides
2828
const mobileStyles =
@@ -47,6 +47,11 @@ export function generateStyles(options = {}) {
4747

4848
return `
4949
/* OverType Editor Styles */
50+
/* GitHub styles */
51+
.overtype-preview pre.code-block {
52+
font-family: ${fontFamily} !important;
53+
font-size: ${fontSize} !important;
54+
}
5055
5156
/* Middle-ground CSS Reset - Prevent parent styles from leaking in */
5257
.overtype-container * {

0 commit comments

Comments
 (0)