--

It is enough to use max-height, instead of height.

That will allow to remove the JS part.

Still a work around, but way better than your JS solution!

[id^="toggleNext_"] + label + * {

overflow:hidden;

transition:max-height 0.5s;

background:#FFF;

max-height: 0;

}

[id^="toggleNext_"]:checked + label + * {

max-height: 1000px;

}

“limiting their utility to nothing more than a crutch for people who didn’t know how to search and replace in their editor.”

Yes, editor replace is better than variables… I wonder why Martin doesn’t state this concept in his clean code books…

--

--

Andrea Koutifaris
Andrea Koutifaris

Responses (1)