@@Matthias Scharwies
und setze den Wert mit setProperty immer wieder um 30px höher.
Nein, so nicht.
Wenn man einen Zähler implementiert, dann zählt man um 1 höher. (Wir sind hier nicht bei Zeilennummern in BASIC.)
Mit dem aktuellen Zählerstand dann padding: calc(var(--counter) * 30px)
. Besser noch mit einer an die Schriftgröße gekoppelten Einheit, also em
bzw. rem
.
😷 LLAP
--
“When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down ‘happy.’ They told me I didn’t understand the assignment, and I told them they didn’t understand life.” —John Lennon
“When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down ‘happy.’ They told me I didn’t understand the assignment, and I told them they didn’t understand life.” —John Lennon