Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Use Sass @use in plop template and README #1793

Merged
merged 6 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plopfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function (plop) {
type: 'append',
path: 'packages/css/src/components/index.scss',
pattern: `/* Append here */`,
template: `@import "./{{kebabCase name}}/{{kebabCase name}}";`,
template: `@use "./{{kebabCase name}}/{{kebabCase name}}" as *;`,
VincentSmedinga marked this conversation as resolved.
Show resolved Hide resolved
},
{
type: 'add',
Expand Down
5 changes: 3 additions & 2 deletions proprietary/tokens/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,17 @@ Note that redefining the value of a token is a much better approach than redecla
## Usage in Sass

The tokens can be imported as Sass variables as well.
As they are already prefixed, the namespace that Sass would assign isn’t necessary.

```sass
@import "@amsterdam/design-system-tokens/dist/index.scss"
@use "@amsterdam/design-system-tokens/dist/index.scss" as *;
```

Import the compact tokens if you need them.
Sass will override spacious values automatically.
alimpens marked this conversation as resolved.
Show resolved Hide resolved

```sass
@import "@amsterdam/design-system-tokens/dist/compact.scss"
@use "@amsterdam/design-system-tokens/dist/compact.scss" as *;
```

## Usage in JavaScript
Expand Down
Loading