Pregunta

To select an element and all its descendant elements:

.media, .media * {color: #f00;}

Is there just one selector I can use instead of two selectors separated by a comma? I'm looking for a more efficient way to type this.

¿Fue útil?

Solución

With XPath you have the descendant-or-self axis

But there is no such selector in CSS.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top