question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTML attributes being transformed even on custom components

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
StarpTechcommented, Oct 23, 2018
0reactions
ScreamZcommented, Oct 23, 2018

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found