Closed
Bug 1398653
Opened 7 years ago
Closed 7 years ago
content property is not reflected when the property is changed by CSSOM
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
INVALID
Tracking | Status | |
---|---|---|
firefox57 | --- | affected |
People
(Reporter: hiro, Unassigned)
Details
Attachments
(1 file)
513 bytes,
text/html
|
Details |
Something like this; <style> .before::before { content: 'initial'; width: 100px; height: 100px; background-color: blue; } </style> <div></div> <script> window.addEventListener('load', () => { setTimeout(() => { document.querySelector('div').classList.add('before'); setTimeout(() => { document.styleSheets[0].cssRules[0].style.backgroundColor = 'red'; document.styleSheets[0].cssRules[0].style.content = 'red'; }, 100); }, 500); }); </script> In this test case, background-color is properly changed, but content property is not reflected at all. Neither gecko nor stylo works. Note that chrome does not change background-color either.
Reporter | ||
Comment 1•7 years ago
|
||
Oops, I was about to file a new bug for this. Note that setProperty('content', '') (i.e. remove the property) works fine.
Comment 2•7 years ago
|
||
I believe this bug is invalid. `red` doesn't seem to be a valid value for content property. If you want the string "red", you should assign `"red"`.
Reporter | ||
Comment 3•7 years ago
|
||
Oh right. Thanks Xidorn! That was good that I did put you in CC. :)
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•