2
\$\begingroup\$

Which one of these web components is designed better?

Option 1 contains an a tag within the custom element.

  <bootstrap-social service="github" size="lg">
    <a href="http://github.com/reggi">Sign in with Github</a>
  </bootstrap-social>

Option 2 the custom element has an href tag and the inner text is within the element.

  <bootstrap-social service="github" size="lg" href="http://github.com/reggi">
    Sign in with Github
  </bootstrap-social>
\$\endgroup\$
1
  • 2
    \$\begingroup\$ I suspect the first would be preferable for graceful degradation... \$\endgroup\$ – Schism Aug 8 '14 at 2:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.