Gunnar Bittersmann: Frage zum Wiki-Artikel „empty“

Beitrag lesen

problematische Seite

@@Voll?

Ist es bekannt, daß :empty als Style anders funktioniert als :empty in einem querySelector bzw. querySelectorAll?

Das ist weder bekannt noch ist das überhaupt so. Guckst du: :empty in CSS and JavaScript.

Genau diejenigen Türen, die CSS per p:empty rot gefärbt hat, färbt JavaScript per querySelectorAll('p:empty') schwarz. Und die anderen bleiben farblos.

I see a red door and I want to paint it black
No colours anymore, I want to paint it black

— The Rolling Stones, Paint It Black

🖖 Live long and prosper

--
In our chants of “ICE out now”
Our city’s heart and soul persists
Through broken glass and bloody tears
On the streets of Minneapolis

— Bruce Springsteen, Streets of Minneapolis