[Webkit-unassigned] [Bug 253041] New: CSSStyleRule.selectorText contains unquoted colon
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Feb 27 16:36:10 PST 2023
https://bugs.webkit.org/show_bug.cgi?id=253041
Bug ID: 253041
Summary: CSSStyleRule.selectorText contains unquoted colon
Product: WebKit
Version: Safari 16
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
Assignee: webkit-unassigned at lists.webkit.org
Reporter: vojacem at gmail.com
CSSStyleRule.selectorText contains unquoted colons. Recreating rules with colons leads to broken syntax.
Steps to reproduce:
# Open `about:blank`
# Run the following piece of code, the red box is not shown in Safari.
const styleElement = document.createElement('style')
styleElement.innerHTML = `
[a\\:b], .red {
background-color: red;
width: 100px;
height: 100px;
}
`
const divElement = document.createElement('div')
divElement.className = 'red'
document.body.append(styleElement, divElement)
console.log(styleElement.sheet.cssRules[0].selectorText + " should be [a\\:b], .red")
styleElement.innerHTML = styleElement.sheet.cssRules[0].cssText
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230228/c5821610/attachment.htm>
More information about the webkit-unassigned
mailing list