Metadata-Version: 2.4
Name: rbtr-lang-scss
Version: 2026.9.0.dev3
Summary: rbtr — SCSS/Sass language plugin
Keywords: code-search,code-index,tree-sitter,static-analysis,semantic-search,developer-tools,scss,sass
Author: Alejandro Giacometti
Author-email: Alejandro Giacometti <alejandro.giacometti@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Text Processing :: Indexing
Classifier: Typing :: Typed
Requires-Dist: rbtr==2026.9.0.dev3
Requires-Dist: rbtr-lang-css==2026.9.0.dev3
Requires-Dist: tree-sitter-scss
Requires-Python: >=3.13
Project-URL: Homepage, https://github.com/janrito/rbtr
Project-URL: Repository, https://github.com/janrito/rbtr
Project-URL: Documentation, https://github.com/janrito/rbtr/tree/main/packages/rbtr-lang-scss#readme
Project-URL: Issues, https://github.com/janrito/rbtr/issues
Project-URL: Changelog, https://github.com/janrito/rbtr/releases
Description-Content-Type: text/markdown

# rbtr-lang-scss

SCSS / Sass support for [rbtr]. Optional plugin — install with
`pip install rbtr[scss]`.

[rbtr]: https://github.com/janrito/rbtr/tree/main/packages/rbtr#readme

## What it ingests

SCSS extends CSS with the Sass preprocessor constructs. Definitions map onto
rbtr's capture conventions by shape:

- **Variables** — `$`-prefixed declarations (`$primary: #333;`).
- **Routines** — `@mixin` and `@function` definitions → functions.
- **Rule sets & at-rule blocks** — selectors (incl. `%placeholder`), `@media`,
  `@keyframes` → classes (a named collection of declarations).
- **Directives** — `@charset` → config key.
- **Imports** — `@use` / `@forward` / `@import` → imports (for cross-file
  edges).

## Chunks produced

`name` is the declaration/selector; `scope` is the ancestor rule-set
selectors for a nested rule (CSS-family nesting), else empty.

```scss
$primary: #333;                /* variable "$primary"                   */
@mixin flex($dir) { … }        /* function "flex"                       */
@function rem($px) { … }       /* function "rem"                        */
%card { … }                    /* class "%card"                         */
.btn { … }                     /* class ".btn"                          */
@keyframes slide { … }         /* class "slide"                         */
@use "config";                 /* import, metadata {module: "config"}   */
```

## Embedded / injected chunks

None. SCSS does not embed other languages (it is embedded by the SFC plugins).

## Grammar & dependencies

Uses the `tree-sitter-scss` grammar. Depends on **rbtr-lang-css** — it reuses
that plugin's public `css_nesting_scope` helper for CSS-family rule nesting.
