nl-design-system / backlog

Central product backlog of the NL Design System.
European Union Public License 1.2
7 stars 1 forks source link

Rich text content #127

Open Robbert opened 3 years ago

Robbert commented 3 years ago

Container component that styles semantic HTML embedded inside.

Content from a CMS is frequently edited in a rich text editor, resulting in HTML. Styling from NL Design System is usually enterily opt-in, so only HTML elements with a specific nl-... class name are affected. Content from a CMS is usually outside of the control of a design system, so class names are used in that HTML and effectively all content from the CMS would be completely unstyled.

The Rich text content component could be the solution for this situation: all semantic content inside this container content will be affected with styling. This could mean the following elements:

julezrulez commented 3 years ago

Also think of other HTML elements like span like when an editor wants to add some partial language change in the text.

Example: <p>Deze tekst is in het Nederland wat in het Engels vertaald wordt als <span lang="en">This text is in Dutch</span.</p>

Also some elements are missing in the list like a, dl, dd, dt and caption.

Robbert commented 3 years ago

Thanks, I've included most of those in the list with links to their respective tickets on the backlog.

I am a bit sceptical about including dl/dd/dt at this stage, because I haven't seen it as requirement by any design system at this stage, and I suspect authoring tools in CMSes are very limited. But I looking forward to having my horizons broadened! I know they exist and have a purpose, I am not sure if they are practical and have if we could provide a generic look and feel.

Of course we will have specific components on the backlog that are best implemented with a dl, but not sure if those should be considered "rich text" components.