Migrate away from _utilities.legacy.scss
See original GitHub issueIs your proposal related to a problem?
- For contributors it is currently not clear what utilities classes should be used as some code uses the Tailwind classes and some uses the legacy utility classes.
- It would be good to remove the
client/scss/overrides/_utilities.legacy.scss
file and replace those usages with the appropriate Tailwind classes OR remove their usage completely (e.g..clear
). - Note: There is confusion also about when to use Tailwind classes for a whole component vs just a sub-set of adjustments, but that can be covered elsewhere.
Describe the solution you’d like
Remove the utilities legacy file and replace each usage if needed with either SCSS mixins OR the equivalent tailwind utility class.
class | Note |
---|---|
.u-hidden |
Replace with w-hidden - but validate each usage |
.clearfix |
Remove, replace with mixin clearfix() if used anywhere else, will be removed completely in the near future |
.nice-padding |
Convert to a Tailwind utility |
.divider-before |
Remove, not used |
.divider-after |
Review, may not be needed and does not add anything useful |
body.reordering |
Should probably be in layouts |
.show-transparency |
Convert to Tailwind utility |
.inline |
Replace usage with w-inline (validate each usage) |
.inline-block |
Replace usage with w-inline-block (validate each usage) |
.block |
Replace usage with w-block (validate each usage) |
.unlist |
Remove, only current usage is in Styleguide and this example could either removed or replaced with Tailwind classes |
.overflow |
Replace usage with appropriate w-overflow-... Tailwind class (validate each usage) OR remove if not used |
Describe alternatives you’ve considered
- Leave as is, each contributor can just keep using these for now.
Additional context
- We really need to provide a clearer guide somehow as to what Tailwind classes are available and the general approach that is recommended for contributions.
- There is separate work happening for removing floats https://github.com/wagtail/wagtail/issues/8126
Issue Analytics
- State:
- Created a year ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
How we migrated entirely to CSS Modules using codemods ...
Using a combination of Bootstrap utility classes. Using a custom class specific to the element. Using global styles inherited from the global ...
Read more >Migrate from ASP.NET to ASP.NET Core
This article serves as a reference guide for migrating ASP.NET apps to ASP.NET Core. Visual Studio has tooling to help migrate ASP.
Read more >Migrating to v4
In general this means a move away from floats and more across our components. ... Moved all .text- utilities to the _utilities.scss file....
Read more >Transitioning to SCSS at Scale
An Old and New CSS Pipeline; Converting Legacy Code; SCSS Clean; SCSS Diff ... of CSS preprocessors we decided to move forward with...
Read more >Tides of the Tailwind
CSS in JS. JS libraries like React and Vue started solving this problem by moving CSS into components. This got rid of cascading...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://docs.wagtail.org/en/stable/editor_manual/documents_images_snippets/documents.html https://docs.wagtail.org/en/stable/editor_manual/documents_images_snippets/snippets.html
@Lovelyfin00 just a heads up
divider-before
is not used butdivider-after
is used in multiple places and serves a purpose.See the line between the ‘filesize/usage’ column.
We possibly could migrate that to Tailwind utility classes but just flagging based on feedback on https://github.com/wagtail/wagtail/pull/9535