Disconnect between attribute and CSS selector – styles are not implemented as expected.

I just got some amazing help to add an id attribute to an elelement in a react component, but now that I want to add some styling the selector doesn't seem to affect the element: I'm using this video as inspiration, and want the header element to fade out when it gets id scrolling added on scrolling. https://www.youtube.com/watch?v=V-CBdlfCPic React component: https://github.com/AMarlonG/Website/blob/main/web-app/PageComponents/FrontPage.tsx CSS modules file: https://github.com/AMarlonG/Website/blob/main/web-app/PageComponents/frontPage.module.css The element in question is the header within mainInfo > mainInfoContent, which gets id="scrolling" when page scrolls. No blue border is being added when I scroll. Which is weird to me ...
5 Replies
Rook
Rook2y ago
forgot you were using CSS modules, if you use styles.scrolling instead of 'scrolling' inside of the React component, it might work
Å Marlon G
Å Marlon GOP2y ago
... I don't think I told you that it was modules, so no fault of yours. And again, it worked. So here we go again ...
Å Marlon G
Å Marlon GOP2y ago
Thank you!
Rook
Rook2y ago
np!
Want results from more Discord servers?
Add your server