Skip to content

fix(css): stabilize hover system regex replacements and prevent duplicate transition injection#735

Merged
neeru24 merged 1 commit into
neeru24:mainfrom
ANSHIKATYAGI30:fix-uuid-handling
Jun 12, 2026
Merged

fix(css): stabilize hover system regex replacements and prevent duplicate transition injection#735
neeru24 merged 1 commit into
neeru24:mainfrom
ANSHIKATYAGI30:fix-uuid-handling

Conversation

@ANSHIKATYAGI30

Copy link
Copy Markdown
Contributor

What does this PR do?

Changes made-:

  • Fixed incorrect conditional logic that prevented grouped hover styles from being appended properly.
  • Improved regex replacement safety for hover animation transformations and transitions.
  • Prevented duplicate CSS transition injection during repeated script runs.
  • Refactored hover-style injection logic for better maintainability and deterministic behavior.
  • Added safer detection checks before appending generated CSS blocks.
  • Improved compatibility of CSS modernization script with existing style structures.

Related Issue

Closes #731

Checklist

  • I have tested my changes
  • My code follows project guidelines
  • No new errors introduced

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for creating a PR for your Issue! ☺️

We'll review it as soon as possible.
In the meantime, please double-check the file changes and ensure that all commits are accurate.

If there are any unresolved review comments, feel free to resolve them. 🙌🏼

@ANSHIKATYAGI30

Copy link
Copy Markdown
Contributor Author

@neeru24
I checked the failing test and the issue appears to come from tests/test_app.py rather than the changes in modernize_hover.py.

Current API response:
"File content does not match any supported image format."

But the test still expects:
"Invalid image"

The failure occurs in:
tests/test_app.py::test_post_api_analyze_invalid_image

Since my PR only modifies hover animation/UI logic in app.py, I did not change the image validation flow.
Please review the PR whenever convenient.
Thank you!

@neeru24 neeru24 merged commit ce77d06 into neeru24:main Jun 12, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UUID Handling, Redundant Logic, and Unsafe CSS Regex Replacements

2 participants