3 ms·
What is a 'field'? I get the feeling that Buefy's approach is to use custom elements instead of native elements? So something like an <input> element becomes s
by TicklishTiger 8y ago
What is a 'field'?
I get the feeling that Buefy's approach is to use custom elements instead of native elements? So something like an <input> element becomes some <b-field> thing?
I am sceptical if that is a good thing. I would not want to swap out all regular html for some fantasy elements of a library.
- jhanschoo 8y agoA 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)
- TicklishTiger 8y agoWorking 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.
- jhanschoo 8y agoThis 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.