kpn / kpn-style

Reusable (style) packages for anyone working on front-end for KPN.
https://style.kpn.com
MIT License
17 stars 3 forks source link

Make sure display modes are explicitly set everywhere #23

Open coenkoopmans opened 4 years ago

coenkoopmans commented 4 years ago

Description

Some display modes are inferred by the KPN Style portals' choices of HTML element. For example, the current documentation offers this example for a notification: <div class="notification notification--informative">

However, users of KPN Style might choose to make this a <span>-element, or even something else entirely. That could change the default display mode (which would be block for the div, but inline for the span), which could in turn lead to unexpected results. That could be detrimental to the delivery of consistent experiences by KPN Style.

Therefore, we should explicitly set display modes for at least all parent classes (such as notification, button, or card).

Acceptance criteria

jordybulten commented 4 years ago

We are not sure yet and should investigate further. If you do the parent tag, you also should do it for all child elements to be useful. Maybe it can also be fixed with a short documentation piece about symantic HTML