Skip to content

Commit badcf91

Browse files
committed
shorter style tag definitions
1 parent 388ceba commit badcf91

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

src/core/render/tpl.js

+4-8
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,10 @@ export function markdownParagraph(className, content) {
137137

138138
export function theme(color) {
139139
return (
140-
<style
141-
innerHTML={
142-
/* css */ `
143-
:root {
144-
--theme-color: ${color};
145-
}
146-
`
140+
<style>{/* css */ `
141+
:root {
142+
--theme-color: ${color};
147143
}
148-
></style>
144+
`}</style>
149145
);
150146
}

src/core/util/dom.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function toggleClass(el, type, val) {
101101
}
102102

103103
export function style(content) {
104-
appendTo(head, <style innerHTML={content}></style>);
104+
appendTo(head, <style>{content}</style>);
105105
}
106106

107107
/**

src/core/util/polyfill/css-vars.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default function(color) {
2828
}
2929

3030
get(href).then(res => {
31-
const style = <style innerHTML={res}></style>;
31+
const style = <style>{res}</style>;
3232

3333
dom.head.appendChild(style);
3434
replaceVar(style, color);

0 commit comments

Comments
 (0)