Commenting is Now Available Thanks to Giscus
How I added comments to my blog using Giscus.
How I added comments to my blog using Giscus.
Creative people can often create design rules that... complicate the life of a developer. Everything from overlapping elements to odd shapes at different screen sizes. Even showing or hiding elements based on where you are at on the page and which direction you are scrolling. This last feature is something I want to talk about today.
In web development, the challenge of targeting a parent element based on a specific child can be overcome with the powerful :has pseudo-selector in CSS. The versatility extends to JavaScript, providing a seamless and consistent approach for element identification.
Traditionally the way a developer handles this is they have an event that is triggered by some action, such as on slide change, where it finds the iframe for the video player then copies the contents of the "src" attribute into a benign attribute such as "original\_src" and then changes the contents of src to either empty or an image of some sort.