Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A grouping of form controls and labels that together represent a piece of form data is a field. True, HTML doesn't have any exact `field` tag, but the notion of a field has always been there, see `<fieldset>`. Working with custom "fantasy" elements is quite typical of modern frontend development, and very productive to work in.

Nevertheless, in the more restricted question of using custom elements to replace CSS classes, you may have a point; many libraries that try to do this typically end up with a far more restricted use case since a custom components library is less open to extension than CSS classes, and custom components authors often fail to anticipate ways in which CSS frameworks are used. (e.g. using a CSS class with a standard HTML tag, and then, using a CSS class with a custom component)



    Working with custom "fantasy" elements is quite
    typical of modern frontend development
And eating too much fat is quite typical of the modern diet. I prefer to eat healthy nontheless.


This isn't quite analogous. Developers use custom components because they encapsulate a common structure in Web apps not provided out of the box in vanilla HTML.

To use a more accurate analogy, they are akin to building an ALU with the use of a an adder (a fantasy component abstracting away the NAND gates) rather than completely in NAND gates.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: