Read more

What Sass means by "@function rules may not contain style rules."

Arne Hartherz
October 31, 2022Software engineer at makandra GmbH

When writing a Sass function, you may run into an error message that may be confusing:

@function rules may not contain style rules.
Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

What Sass is trying to tell you is that a line in your Sass function is computing a result that is neither assigned to a variable nor returned.

Keep in mind that all functions in Sass return something, Sass does not mutate objects.

Posted by Arne Hartherz to makandra dev (2022-10-31 16:10)