DEV Community

Discussion on: You can create these elements without JavaScript

Collapse
 
moopet profile image
Ben Sinclair

If you think that relying on extra HTML is a downside (and I do, too) then solutions like the "pure CSS" floating label you've included are off the table. That uses extra divs and spans and data attributes.
I know people often say that HTML + CSS is "pure CSS" but it's definitely not!

Collapse
 
vonas profile image
Jonas

Why do you think that it's a downside?

Collapse
 
moopet profile image
Ben Sinclair

If you have a site and want to change its appearance, doing so in a stylesheet makes sense. Why would it make sense to go through the content, which is usually going to be held in a database by a CMS, to change the structure of things? There's no reason I can think of to marry style and content.