mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 03:10:08 +08:00
fix(SelectionAssistant): customCSS should not override background (#6746)
fix: customCSS should not override background
This commit is contained in:
parent
8998bbff27
commit
242ea279ee
@ -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