HTML attributes being transformed even on custom components
See original GitHub issueI’ve noticed HTML attributes being transformed.
=""
added for value-attributes:
<base-flex wrap><base-text title>Title</base-text></base-flex>
// formatted to <base-flex wrap=""><base-text title="">Title</base-text></base-flex>
hyphen removed when this attribute without hyphen exists:
<base-list item-type="contact"><!-- --></base-list>
// formatted to <base-list itemtype="contact"><!-- --></base-list>
I can understand why I probably shouldn’t even use global HTML attributes like itemtype or title on custom components, but should I really be prevented to use the wrap attributes on a custom component just because it’s defined for <textarea>?
Thanks for your time.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Using Attributes and Properties in Custom Elements
Global attributes are attributes common to all HTML elements; they can be used on all elements, though they may have no effect on...
Read more >Attributes on custom HTML elements - Stack Overflow
Web components are custom elements. They have no defined set of attributes, you define them yourself. Whether or not you use data- attributes...
Read more >Handling data with Web Components | by Andreas Remdt
Attributes for custom elements are not different from the attributes ... Even passed numbers like items="2" will be converted into a string.
Read more >Custom Elements v1 - Reusable Web Components
Custom elements allow web developers to define new HTML tags, extend existing ones, and create reusable web components.
Read more >Using custom elements - Web Components | MDN
Customized built-in elements inherit from basic HTML elements. To create one of these, you have to specify which element they extend (as implied ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@rndmerle @ScreamZ I opened a new issue for that https://github.com/Prettyhtml/prettyhtml/issues/53
@StarpTech I’m using
vuetify
with vetur which is a completion extension for vsCode for vueJS.I’m always using things like
<v-layout row wrap>
and this get converted to<v-layout row wrap="">
is there any way to prevent this ? (confort)Regards