We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.12.0 +
见示例
<!DOCTYPE html> <html> <head> <style> :root { --blue: #1e90ff; --white: #ffffff; } body { background-color: var(--blue); } h2 { border-bottom: 2px solid var(--blue); } .container { color: var(--blue); background-color: var(--white); padding: 15px; } button { background-color: var(--white); color: var(--blue); border: 1px solid var(--blue); padding: 5px; } </style> <script> // Get the root element var r = document.querySelector(':root'); setTimeout(() => { r.style.setProperty('--blue', 'lightblue'); //UICommandType.setStyle, id: 2 args[0]: -blue args[1]: lightblue nativePtr: Pointer<Never>: address=0x0 }, 3000); </script> </head> <body> <h1>Change CSS Variable With JavaScript</h1> <div class="container"> <h2>Lorem Ipsum</h2> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam semper diam at erat pulvinar, at pulvinar felis blandit.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam semper diam at erat pulvinar, at pulvinar felis blandit.</p> <p> <button>Yes</button> <button>No</button> </p> </div> <br> </body> </html>
work
not work
The text was updated successfully, but these errors were encountered:
fix:var attribute dynamic modification exception
cc7dfac
fix: #144
d3482b4
devjiangzhou
Successfully merging a pull request may close this issue.
Affected version
0.12.0 +
No same issues found.
Steps to Reproduce
见示例
Code example
Expected results
work
Actual results
not work
The text was updated successfully, but these errors were encountered: