mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-27 21:01:32 +08:00
fix(SelectionAssistant): customCSS should not override background (#6746)
fix: customCSS should not override background
This commit is contained in:
parent
9c89676030
commit
958f8387d0
@ -157,9 +157,11 @@ const SelectionToolbar: FC<{ demo?: boolean }> = ({ demo = false }) => {
|
||||
}
|
||||
|
||||
if (customCss) {
|
||||
const newCustomCss = customCss.replace(/background(-image|-color)?\s*:[^;]+;/gi, '')
|
||||
|
||||
customCssElement = document.createElement('style')
|
||||
customCssElement.id = 'user-defined-custom-css'
|
||||
customCssElement.textContent = customCss
|
||||
customCssElement.textContent = newCustomCss
|
||||
document.head.appendChild(customCssElement)
|
||||
}
|
||||
}, [customCss])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user