assertNotBogus method

void assertNotBogus({
  1. String? name,
})

Prints a warning if this is a bogus selector.

This may only be called from within a custom Sass function. This will throw a SassException in Dart Sass 2.0.0.

Implementation

void assertNotBogus({String? name}) {
  if (!isBogus) return;
  warnForDeprecation(
      (name == null ? '' : '\$$name: ') +
          '$this is not valid CSS.\n'
              'This will be an error in Dart Sass 2.0.0.\n'
              '\n'
              'More info: https://sass-lang.com/d/bogus-combinators',
      Deprecation.bogusCombinators);
}