@@Auge
Nee, wichtig ist nur, anzumerken, dass die Eigenschaften (auch von) von Safari unterstützt wird.
Oh, fein! Dann kann man ja Gedichte/Liedtexte formatieren: Wenn in einer Verszeile ein Umbruch stattfindet, soll danach eingerückt werden. ☞ Beispiel 33
Bislang habe ich dazu die Verszeilen in ein <x-l>
-Element gewrappt, mit
x-l { display: inline-block }
:
<p>
<x-l>Someday girl, I don’t know when, we’re gonna get to that place</<x-l><br/>
<x-l>Where we really want to go</<x-l><br/>
<x-l>And we’ll walk in the sun</<x-l><br/>
<x-l>But till then tramps like us</<x-l><br/>
<x-l>Baby we were born to run</<x-l>
</p>
— Bruce Springsteen, “Born to Run”
Mit hanging
und each-line
ist das nicht mehr nötig: Codepen
Und ohne <br/>
geht’s auch, white-space: pre-line
FTW: Codepen 2
Wenn jemand die oder eine der Eigenschaften einsetzt und sich Google dereinst dazu entscheidet, die Unterstützung als stabil zu markieren und aus dem experimentellen Status herauszuholen, funktioniert es binnen kurzer Zeit (fast) überall. Bäm!
Funktioniert auch jetzt schon – progressive enhancement. In Chromia ist nichts kaputt. Safari- und Firefox-Nutzer bekommen eine verbesserte Darstellung.
🖖 Live long and prosper
“In my home, the America I love, the America I've written about, that has been a beacon of hope and liberty for 250 years, is currently in the hands of a corrupt, incompetent and treasonous administration. Tonight, we ask all who believe in democracy and the best of our American spirit, to rise with us, raise your voices against authoritarianism, and let freedom reign.”
— Bruce Springsteen, Manchester 2025-05-14