ByteGrad / Professional-JavaScript-Course

This repo contains everything you need as a student of the Professional JavaScript Course by ByteGrad.com
https://bytegrad.com/courses/professional-javascript
46 stars 27 forks source link

Doubt : Selection Property #2

Closed madhavanand-github closed 1 year ago

madhavanand-github commented 2 years ago

Project : CorpComment

In heading we have used pseudo-class selection , which I tried playing around and understood, but I couldn't understand the use case of former one with first-heading*::selection

I could see it's effect if I disable the property but couldn't really understand.

ByteGrad commented 2 years ago

The selector '.first-heading *::selection' will select all child elements in the first-heading (in this project, it's only the span-element).