hinode
hinode copied to clipboard
[BUG] Fix use of declarations after nested rules (deprecated in Sass 1.77.7)
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
- Install Dart Sass 1.77.7 or later
- Set
transpiler = "dartsass"in[main.build]ofparams.toml - 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.
A new setting has been added to suppress the deprecation warnings. Add the following configuration to params.toml:
[main.build]
transpiler = "dartsass"
silenceDeprecations = true