Parent element's unique class repeating on all the child elements
See original GitHub issueDescribe the bug
Hi
As you see the parent’s class gets repeated on its all child elements.
Reproduction
https://github.com/babakfp/sveltekit-unique-class-repetition
Logs
No response
System Info
System:
OS: Windows 10 10.0.19043
CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
Memory: 6.67 GB / 15.84 GB
Binaries:
Node: 14.16.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.11 - ~\AppData\Roaming\npm\yarn.CMD
npm: 7.22.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1023.0), Chromium (93.0.961.38)
Internet Explorer: 11.0.19041.906
### Severity
annoyance
### Additional Information
### Severity
It won't look good for Sveltekit on v1.0 public release.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Select distinct child elements from repeating parent using XPath
Use the following axis instead of following-sibling, it will search all document starting from the current context: //catalog[not(.
Read more >Cascade, specificity, and inheritance - Learn web development
Inheritance also needs to be understood in this context — some CSS property values set on parent elements are inherited by their child...
Read more >nth-child - CSS-Tricks
The :nth-child selector allows you to select one or more elements ... will iterate through all the children of the parent element and...
Read more >WordPress School: HTML and CSS Parent-Child Relationship
Inheritance: If the styles of a child HTML element are not specified, the element inherits the styles of its parent, the HTML tag,...
Read more >CSS :has( ) A Parent Selector Now - Matthias Ott
When an element is rendered to the viewport, its parent is already there, including all its beautiful styling. Repainting the parent – and, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
no, the svelte compiler uses css class for scoping, not attributes. vite-plugin-svelte only changes the generated value to be a hash of the filename instead of a hash of the css content.
if you have technical concerns or actual reproducible bugs i’m eager to learn more, but if this is an aesthetic issue i’m afraid thats the way it is.
What if I add an attribute instead of a class? This HMR thing going to work then or not? I don’t know how it works but is it possible to use something like
data-vite-hmr="FKD*%0ruj"
?@dominikg