Migrate translate utilities to Tailwind
What does this MR do and why?
Migrates gl-translate-x-n50
to -gl-translate-x-1/2
and gl-translate-y-n50
to -gl-translate-y-1/2
.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
User profile busy badge |
---|
Wiki sidebar (mouse over link) |
---|
How to set up and validate locally
-
-gl-translate-x-1/2
- Set your status to
Busy
. - Navigate to your profile page.
- Observe that the
Busy
badge is properly positioned below your avatar.
- Set your status to
-
-gl-translate-y-1/2
- Navigate to a Wiki page.
- Place the mouse cursor over a link in the right navbar.
- Observe that the
+
icon is properly positioned.
-
CSS-in-Js
- Run the following script to produce a diff for the CSS-in-Js config:
git checkout master rm config/helpers/tailwind/css_in_js.js && yarn tailwindcss:build git add --force config/helpers/tailwind/css_in_js.js git checkout 456636-tailwind-translate rm config/helpers/tailwind/css_in_js.js && yarn tailwindcss:build git diff config/helpers/tailwind/css_in_js.js
- This should cause the
translate-x-n50
andtranslate-y-n50
utils to be dropped from the config.translate-y-n100
is still there because it's used in GitLab UI.
diff --git a/config/helpers/tailwind/css_in_js.js b/config/helpers/tailwind/css_in_js.js index 5acd7badd749..30ab0e1f8bad 100644 --- a/config/helpers/tailwind/css_in_js.js +++ b/config/helpers/tailwind/css_in_js.js @@ -1,5 +1,5 @@ /** - * The following 640 definitions need to be migrated to Tailwind. + * The following 638 definitions need to be migrated to Tailwind. * Let's do this! 🚀 */ module.exports = { @@ -699,8 +699,6 @@ module.exports = { 'max-width': '82%', }, '.text-truncate': { overflow: 'hidden', 'text-overflow': 'ellipsis', 'white-space': 'nowrap' }, - '.translate-x-n50': { transform: 'translateX(-50%)' }, - '.translate-y-n50': { transform: 'translateY(-50%)' }, '.translate-y-n100': { transform: 'translateY(-100%)' }, '.transition-property-stroke': { 'transition-property': 'stroke' }, '.transition-property-stroke-opacity': { 'transition-property': 'stroke-opacity' },
Related to #456636 (closed)