x-govuk/govuk-form-builder

Support inverse button style

Closed this issue · 2 comments

See alphagov/govuk-frontend#3556. Not sure what release of govuk-frontend this is scheduled for.

inverse: true?

I made the changes in a straightforward manner but ran into some problems with Dart Sass compiling govuk-frontend:

Captain! We’ve been hit!

RuntimeError: Failed to compile Sass

Current item: /stylesheets/application.scss (:default representation)

  0. DEPRECATION WARNING: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
  1.
  2. Recommendation: math.div(100%, 4) or calc(100% / 4)
  3.
  4. More info and automated migrator: https://sass-lang.com/d/slash-div
  5.
  6.    ╷
  7. 22 │   one-quarter: (100% / 4),
  8.    │                 ^^^^^^^^
  9.    ╵
  ... 115 lines omitted (see crash.log for details)

A detailed crash log has been written to ./crash.log.
Listening for site changes…

There's quite a bit of that going on upstream.

Turns out the above problem was caused by $button-shadow-size, so hardcoding that to the default value of 2px lets us work around it. The custom style can be dropped after the next version of the design system is released.