Skip to content
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

CSS Class Name Changes in HTML Not Reflecting Correctly in Live Preview #2000

Open
devvaannsh opened this issue Dec 19, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@devvaannsh
Copy link
Contributor

Describe the bug

When working with an HTML file and referencing class names in the CSS file, updating class names in the HTML does not seem to reflect correctly under certain conditions. Specifically, if an element's class name is updated in the HTML file, the element may still be styled according to the properties defined for the original class name in the CSS file.

Reproduction

  1. Create an HTML file with multiple elements sharing the same class name (e.g., example-class).
  2. Reference this class in a CSS file but do not define any properties initially.
  3. Update the class name for some of these elements in the HTML file to a new name (e.g., new-class).
  4. Go back to the CSS file and define some properties for the original class name (example-class).

Expected behavior

Only elements that retain the original class name (example-class) should be styled according to the CSS properties defined.

OS, Browser and Phoenix versions

The CSS properties applied to the original class name (example-class) are unexpectedly affecting elements that have been updated to the new class name (new-class).

logs or debug stack trace if any

No response

Additional context

No response

@devvaannsh devvaannsh added the bug Something isn't working label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant