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
In this case, the newly added element blinks when the button is clicked.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>tt</title> <style> .widget-name h2 { font-size: 12px; } .widget-name[min-width~='400px'] h2 { font-size: 18px; } .widget-name[min-width~='600px'] h2 { padding: 55px; text-align: center; font-size: 24px; } .widget-name[min-width~='700px'] h2 { font-size: 34px; color: red; } </style> <script src="./ResizeSensor.js"></script> <script src="./ElementQueries.js"></script> </head> <body> <button>click</button> <div class="container"></div> <script> document.querySelector('button').addEventListener('click', function () { const innerHTML = ` <div class="widget-name"> <h2>Element responsiveness FTW!</h2> </div> ` document.querySelector('.container').innerHTML = innerHTML }) </script> </body> </html>
The text was updated successfully, but these errors were encountered:
Is it okay to use MutationObserver for the body to listen for additions to the dom? @marcj
Sorry, something went wrong.
No branches or pull requests
In this case, the newly added element blinks when the button is clicked.
20241114-164216.mp4
The text was updated successfully, but these errors were encountered: