hinode icon indicating copy to clipboard operation
hinode copied to clipboard

[BUG] Fix use of declarations after nested rules (deprecated in Sass 1.77.7)

Open markdumay opened this issue 1 year ago • 1 comments

Describe the bug

When using Dart Sass 1.77.7 or later, Hugo displays several deprecation warnings about the use of declarations after nested rules.

To reproduce

  1. Install Dart Sass 1.77.7 or later
  2. Set transpiler = "dartsass" in [main.build] of params.toml
  3. Run hugo

Log file

WARN  Dart Sass: file:///[...]/gethinode/hinode/_vendor/github.com/twbs/bootstrap/scss/_reboot.scss:502:2: Sass's behavior for declarations that appear after nested rules will be changing to match the behavior specified by CSS in an upcoming version. To keep the existing behavior, move the declaration above the nested rule. To opt into the new behavior, wrap the declaration in `& {}`.

Host environment

  • Hinode version: [v0.24.23]

Hugo environment

hugo v0.129.0+extended darwin/arm64 BuildDate=2024-07-17T13:29:16Z VendorInfo=brew
GOOS="darwin"
GOARCH="arm64"
GOVERSION="go1.22.5"
github.com/sass/libsass="3.6.5"
github.com/webmproject/libwebp="v1.3.2"
github.com/sass/dart-sass/protocol="2.7.1"
github.com/sass/dart-sass/compiler="1.77.8"
github.com/sass/dart-sass/implementation="1.77.8"

Additional context

The issue has been fixed in https://github.com/twbs/bootstrap/pull/40623 all will be released in Bootstrap v5.3.4.

markdumay avatar Jul 31 '24 05:07 markdumay

A new setting has been added to suppress the deprecation warnings. Add the following configuration to params.toml:

[main.build]
    transpiler = "dartsass"
    silenceDeprecations = true

markdumay avatar Dec 17 '24 05:12 markdumay