[CSS utilities TG] Sizing > Migrate to Tailwind CSS
The following utilities need to be migrated to Tailwind CSS:
-
.gl-w-eighth
- !151567 (merged) -
.gl-w-5p
- !151567 (merged) -
.gl-w-10p
- !151567 (merged) -
.gl-w-15p
- !151567 (merged) -
.gl-w-20p
- !151567 (merged) -
.gl-w-30p
- !151567 (merged) -
.gl-w-40p
- !151567 (merged) -
.gl-w-quarter
- !151567 (merged) -
.gl-w-half
- !151567 (merged) -
.gl-w-70p
- !151567 (merged) -
.gl-w-85p
- !151567 (merged) -
.gl-w-90p
- !151567 (merged) -
.gl-w-grid-size-30
- !152516 (merged) -
.gl-w-max-content
- !152516 (merged) -
.gl-layout-w-limited
- !152516 (merged) -
.gl-h-100vh
- !152516 (merged) -
.gl-min-w-fit-content
- !152516 (merged) -
.gl-min-h-100vh
- !152516 (merged) -
.gl-max-w-max-content
- !152516 (merged) -
.gl-max-w-100vw
- !152516 (merged) -
.gl-max-w-50p
- !152516 (merged)
Migration steps
- If this issue has important/stateful/responsive siblings and they are simple enough, consider migrating them all at once.
- Ensure the util aligns with Tailwind's naming conventions
- Migrate all usages of the util to the Tailwind equivalent. It might be used in HAML, Ruby, Javascript and Vue files. This might warrant several MRs.
- If our Tailwind configuration doesn't seem to support a replacement, we might need to add the missing values to GitLab's
tailwind.config.js
. In doubt, reach out to the task group in#tg_css_utils
(internal). - If you did add new values to the configuration, please add a
TODO:
along with it if it needs to be backported to GitLab UI eventually.
Links
You may refer to the following Tailwind CSS documentation pages. Those should help in figuring out
the naming convention the utils should follow. Keep in mind that we use a custom preset, meaning that
our Tailwind equivalents should follow the same structure as what is outlined in Tailwind docs, but
the actual names and applied values might differ. For example, all our utilities use the gl-
prefix,
we use a custom color palette and spacing scale, etc.
Edited by Peter Hegman