question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrate away from _utilities.legacy.scss

See original GitHub issue

Is 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:open
  • Created a year ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

0reactions
lb-commented, Nov 7, 2022

@Lovelyfin00 just a heads up divider-before is not used but divider-after is used in multiple places and serves a purpose.

Screen Shot 2022-11-08 at 8 26 44 am

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found