mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
♻️ Add shortcut to scss import paths (#7364)
* 🎉 Add config for shortcut imports * ♻️ Change import paths
This commit is contained in:
@@ -234,7 +234,7 @@ Use variables from `frontend/src/app/main/ui/ds/spacing.scss`. These are predefi
|
||||
For fixed dimensions (e.g., modals' widths) defined by design and not layout-driven, use or define variables in `frontend/src/app/main/ui/ds/_sizes.scss`. To use them:
|
||||
|
||||
```scss
|
||||
@use "../_sizes.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
```
|
||||
Note: Since these values haven't been semantically defined yet, we’re temporarily using SASS variables instead of named CSS custom properties.
|
||||
|
||||
@@ -242,7 +242,7 @@ Note: Since these values haven't been semantically defined yet, we’re temporar
|
||||
Use border thickness variables from `frontend/src/app/main/ui/ds/_borders.scss`. To import:
|
||||
|
||||
```scss
|
||||
@use "../_borders.scss" as *;
|
||||
@use "ds/_borders.scss" as *;
|
||||
```
|
||||
|
||||
Avoid using sass variables defined on `frontend/resources/styles/common/refactor/spacing.scss` that are deprecated.
|
||||
@@ -314,7 +314,7 @@ When applying typography in SCSS, use the proper mixin from the Design System.
|
||||
|
||||
✅ **DO: Use the DS mixin**
|
||||
```scss
|
||||
@use "../ds/typography.scss" as t;
|
||||
@use "ds/typography.scss" as t;
|
||||
|
||||
.class {
|
||||
@include t.use-typography("body-small");
|
||||
|
||||
Reference in New Issue
Block a user