Skip to content
Snippets Groups Projects
Commit e81b3ea2 authored by lain's avatar lain
Browse files

Fix style setting in Chrome.

parent 4314b489
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@ const setStyle = (href) => {
const setDynamic = () => {
const baseEl = document.createElement('div')
body.appendChild(baseEl)
baseEl.setAttribute('class', 'base05')
const base05Color = window.getComputedStyle(baseEl).getPropertyValue('color')
baseEl.setAttribute('class', 'base08')
......@@ -29,6 +30,7 @@ const setStyle = (href) => {
const styleEl = document.createElement('style')
head.appendChild(styleEl)
const styleSheet = styleEl.sheet
body.removeChild(baseEl)
styleSheet.insertRule(`a { color: ${base08Color}`, 'index-max')
styleSheet.insertRule(`body { color: ${base05Color}`, 'index-max')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment