Skip to content

Commit da7985b

Browse files
committed
reduce styles.js diff
1 parent 1582d5f commit da7985b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

browser-extension/src/overtype/styles.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Embedded in JavaScript to ensure single-file distribution
44
*/
55

6-
import { themeToCSSVars } from './themes.js'
6+
import { themeToCSSVars } from "./themes.js"
77

88
/**
99
* Generate the complete CSS for the editor
@@ -12,17 +12,17 @@ import { themeToCSSVars } from './themes.js'
1212
*/
1313
export function generateStyles(options = {}) {
1414
let {
15-
fontSize = '14px',
15+
fontSize = "14px",
1616
lineHeight = 1.6,
1717
/* System-first, guaranteed monospaced; avoids Android 'ui-monospace' pitfalls */
1818
fontFamily = '"SF Mono", SFMono-Regular, Menlo, Monaco, "Cascadia Code", Consolas, "Roboto Mono", "Noto Sans Mono", "Droid Sans Mono", "Ubuntu Mono", "DejaVu Sans Mono", "Liberation Mono", "Courier New", Courier, monospace',
19-
padding = '20px',
19+
padding = "20px",
2020
theme = null,
2121
mobile = {},
2222
} = options
2323

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

2727
// Generate mobile overrides
2828
const mobileStyles =
@@ -33,17 +33,17 @@ export function generateStyles(options = {}) {
3333
.overtype-wrapper .overtype-preview {
3434
${Object.entries(mobile)
3535
.map(([prop, val]) => {
36-
const cssProp = prop.replace(/([A-Z])/g, '-$1').toLowerCase()
36+
const cssProp = prop.replace(/([A-Z])/g, "-$1").toLowerCase()
3737
return `${cssProp}: ${val} !important;`
3838
})
39-
.join('\n ')}
39+
.join("\n ")}
4040
}
4141
}
4242
`
43-
: ''
43+
: ""
4444

4545
// Generate theme variables if provided
46-
const themeVars = theme && theme.colors ? themeToCSSVars(theme.colors) : ''
46+
const themeVars = theme && theme.colors ? themeToCSSVars(theme.colors) : ""
4747

4848
return `
4949
/* OverType Editor Styles */

0 commit comments

Comments
 (0)