@codelaw/rules-scss · codelaw-rules-scss
codelaw's rules for SCSS (Sass's .scss syntax) — one of the first-party rule
packs (SR-RULE-PACKS). The same files ship on
npm as @codelaw/rules-scss and on PyPI as codelaw-rules-scss.
SCSS is a CSS dialect under L3 (amended
2026-10-26): codelaw format and codelaw check read .scss files with their
own grammar, and the css/* rules of @codelaw/rules-css also run on SCSS
where they declare scss — install both packs in an SCSS project. The indented
.sass syntax and Less are out of scope.
# codelaw.toml
extends = ["codelaw:css/recommended", "codelaw:scss/recommended"]
preview = true # every rule is `preview` until a corpus run promotes it
Presets
| preset | rules | ported from |
|---|---|---|
scss/recommended |
7 | correctness: at-rule-no-unknown, duplicate definitions, @extend placeholders, null tests, empty comments, partial names |
scss/strict |
15 | the additions to scss/recommended (it extends it): Dart Sass's module migrations (no @import, no global function names, no slash division), unknown functions, naming patterns and a nesting limit |
scss/markers |
1 | TODO comments with a ticket (and a date when asked); opt in (SR-CONFIG decision 11a) |
scss/no-import is in strict, not recommended: a codebase that still uses @import moves to
@use on its own schedule.
Rules
| rule | fix | flags |
|---|---|---|
scss/at-extend-no-missing-placeholder |
manual | @extend .class instead of a %placeholder |
scss/at-if-no-null |
auto | @if $x != null (fixed to $x) and @if $x == null (fixed to not $x) |
scss/at-mixin-pattern |
manual | mixin names outside the pattern (kebab-case) |
scss/at-rule-no-unknown |
manual | at-rules neither CSS nor Sass defines |
scss/dollar-variable-pattern |
manual | $variable names outside the pattern (kebab-case) |
scss/double-slash-comment-empty |
auto | an empty // comment |
scss/function-no-unknown |
manual | functions that are not CSS, Sass built-ins or the file's own |
scss/load-no-partial-leading-underscore |
auto | @use "_partial" |
scss/max-nesting-depth |
manual | style rules nested deeper than max (3) |
scss/no-duplicate-dollar-variables |
manual | a $variable declared twice in one scope |
scss/no-duplicate-mixins |
manual | a mixin defined twice in one scope |
scss/no-global-function-names |
auto | map-get() and the other built-ins that moved into modules |
scss/no-import |
suggest | @import of a Sass file |
scss/no-slash-division |
suggest | / as division |
scss/percent-placeholder-pattern |
manual | %placeholder names outside the pattern (kebab-case) |
$a+$b is not a rule here: spacing around an operator is layout, and layout is the formatter's (SR-FORMATTER decision 3) — codelaw format spaces it.
Metadata
Release files for codelaw-rules-scss 0.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| codelaw_rules_scss-0.4.2-py3-none-any.whl | Python 3 | none | any | Details for codelaw_rules_scss-0.4.2-py3-none-any.whl |
Release files / codelaw_rules_scss-0.4.2-py3-none-any.whl
| Download URL | codelaw_rules_scss-0.4.2-py3-none-any.whl |
|---|---|
| Size | 30.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
78d5b88127975e17b504b51b232899fc2b894952977ed7fb16f33526e406e844
|
|
BLAKE2b-256 checksum How to use checksums |
6fa97da9ad1ae6ba8e855850fef58d846eedcd7e32a18769d5e2746dd0af38ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logSecurity for codelaw-rules-scss 0.4.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
1 file in this release has been uploaded with provenance metadata.
Attestation for codelaw_rules_scss-0.4.2-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.