Skip to content

Conversation

@colinrotherham
Copy link
Contributor

@colinrotherham colinrotherham commented May 19, 2025

Spike to support Sass module @forward/@use but keep @import for now

Not for consideration, only for research into #5981 and comes in two parts:

Optional imports restored

This PR mostly removes the workarounds necessary to resolve:

As predicted previously in #1671 (comment)

Why Sass modules?

It lets the compiler find issues that previously needed tests

For example:

  1. 01a4e9d Load missing members into all partials
  2. afc5fb8 Typography partial does not extend %govuk-list placeholder from other partial
  3. 103cb9a Private members suffixed with _ or $_ need renaming for public use in other partials
  4. 0246d50 Stray call to mq() which breaks unless sass-mq has @forward
  5. b2fb722 Workaround for $sass-mq-already-included does not work (but can be fixed)
  6. Custom $govuk-font-url-function value does not work due to scope
  7. Custom $govuk-image-url-function value does not work due to scope

This PR takes all the fixes from #5982 and turns them back into @import for backwards compatibility

It allows service teams to use Sass modules until #1791 can be picked up

@colinrotherham colinrotherham changed the title Sass module @import backwards compatibility [SPIKE] Sass module @import backwards compatibility May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant