Coder Social home page Coder Social logo

Comments (2)

ugumba avatar ugumba commented on May 20, 2024 1

Thanks for replying.
I've created a radio button component which generates an UUID id and an associated <label for="">.
For the other <label>s, this is sufficient for now:
label { display:block; /* fixes padding between label text and child elements */ }

from 7.css.

khang-nd avatar khang-nd commented on May 20, 2024

Hello, thanks for raising the concern. Because we are limiting the styling to semantic tags as much as possible, it is why we have to follow this pattern for the inputs.

If we were to support <label><input /></label>, we had to style all of the labels, which would introduce the collision with other labels that hold no input, and we have no possibility from CSS to select from input to the parent label. One workaround is adding a class to the label, but then it doesn't solve your concern about bloating the HTML.

from 7.css.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.