Skip to content

Add default styles for <code> and <pre> HTML elements

What does this MR do and why?

The <code> and <pre> HTML elements have default styles applied from Bootstrap. These styles are inconsistent with GitLab implementations so GitLab UI consumers are overriding with very similar styles:

This MR proposes shifting-left on <code> and <pre> styles to be applied in GitLab UI, remove Bootstrap styles, and eventually remove styles from consumers so that they are visually consistent.

Note: gitlab-org/gitlab-ui!5002 (merged) adds basic typography stories to validate changes to <code> and <pre> elements in https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/scss-typography--default

Screenshots

Before After
localhost_2018_example localhost_2018_example__2_
localhost_2018_example__1_ localhost_2018_example__3_

References

How to set up and validate locally

  1. View typography story in Storybook
  2. Validate <code> and <pre> visual rendering

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Scott de Jonge

Merge request reports

Loading