-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
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
fix(rrweb): Fix some css issues with :hover and rewrite max-device-width #17
Commits on Jun 21, 2024
-
We weren't recursing into media queries (or @supports etc.) to rewrit…
…e hover pseudoclasses
Configuration menu - View commit details
-
Copy full SHA for 8e0d43a - Browse repository at this point
Copy the full SHA 8e0d43aView commit details -
The early return meant that the stylesWithHoverClass cache wasn't bei…
…ng populated if there were no hover selectors on the stylesheet - not committing the test, but modifying the existing 'add a hover class to a previously processed css string' as follows shows the problem: --- a/packages/rrweb-snapshot/test/rebuild.test.ts +++ b/packages/rrweb-snapshot/test/rebuild.test.ts @@ -151,6 +185,7 @@ describe('rebuild', function () { path.resolve(__dirname, './css/benchmark.css'), 'utf8', ); + cssText = cssText.replace(/:hover/g, ''); const start = process.hrtime(); addHoverClass(cssText, cache);
Configuration menu - View commit details
-
Copy full SHA for 3c3cd01 - Browse repository at this point
Copy the full SHA 3c3cd01View commit details -
Replace
min-device-width
and similar withmin-width
as the former…… looks out at the browser viewport whereas we need it to look at the replayer iframe viewport
Configuration menu - View commit details
-
Copy full SHA for 22378f5 - Browse repository at this point
Copy the full SHA 22378f5View commit details -
Add some tests to show how the hover replacement works against select…
…or lists. I believe these were failing in a previous version of rrweb as I had some local patches that no longer seem to be needed to handle these cases
Configuration menu - View commit details
-
Copy full SHA for 3af0ac9 - Browse repository at this point
Copy the full SHA 3af0ac9View commit details -
Update name of function to reflect that 'addHoverClass' does more tha…
…n just :hover. I believe this function is only exported for the purposes of use in the tests
Configuration menu - View commit details
-
Copy full SHA for 89b3c17 - Browse repository at this point
Copy the full SHA 89b3c17View commit details -
Configuration menu - View commit details
-
Copy full SHA for bdb47dd - Browse repository at this point
Copy the full SHA bdb47ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for c7dfd53 - Browse repository at this point
Copy the full SHA c7dfd53View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8143ee1 - Browse repository at this point
Copy the full SHA 8143ee1View commit details -
Configuration menu - View commit details
-
Copy full SHA for d677cec - Browse repository at this point
Copy the full SHA d677cecView commit details -
Configuration menu - View commit details
-
Copy full SHA for a5343b5 - Browse repository at this point
Copy the full SHA a5343b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 60c8a1e - Browse repository at this point
Copy the full SHA 60c8a1eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 937a552 - Browse repository at this point
Copy the full SHA 937a552View commit details