Elizabeth Leon-GuerreroFront End Web Development Techdegree Student 1,680 Points
What are the benefits of using Descendant Selectors?
Hi! At the end of the video, Guil mentions that using descendant selectors make the css rules less reusable and that we're better off using a class for the element.
So is there any particular benefit to using a descendant selector? and what are some situations in which a Descendant Selector would be more handy?
Steven Parker207,523 Points
They are always "handy" because you wouldn't need to modify the HTML. But since they depend on one thing being inside another, a more direct selection method (like giving things the same class) makes the rule more "reusable".
The situation would determine how much of a drawback this might be, as re-usability might not even be a factor in some cases.