-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #394 from danskernesdigitalebibliotek/release/2023…
…-51-0 Release/2023-51-0
- Loading branch information
Showing
159 changed files
with
2,890 additions
and
1,953 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,6 @@ storybook-static | |
# Dev Tools | ||
.vscode | ||
.history | ||
|
||
#zipped files generated when using dapple. | ||
dist.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Icon Usage Guidelines | ||
|
||
This folder contains SVG icons that are used in the design system. When using | ||
icons from this folder, please follow the guidelines below: | ||
|
||
- Icons located in public/ folder is the current source of truth. All icons | ||
will be placed in this folder. Ensure that icons placed gere are using the | ||
`class` attribute, and not `className` for SVG element. | ||
|
||
- For icons used in React components that require class modifications or | ||
similar, first create the icon in public/icons, and then manually copy the SVG | ||
from the `public/icons` folder and make any necessary changes, i.e replacing | ||
the `class` with `className` or other modifications. | ||
|
||
Currently, there is no automated solution for this process that ensures | ||
consistency for this. This may be changed in the future. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# SCSS strategy | ||
|
||
In December 2023, we have aimed to streamline the way we write SCSS. | ||
Some of these rules have not been applied on previous code, but moving forward, | ||
this is what we aim to do. | ||
|
||
## BEM naming convention | ||
|
||
### Examples of do's and dont's | ||
|
||
Assuming we have a Counter block: | ||
|
||
- Styling must be placed in a correspondingly named file `counter.scss` | ||
- `.counter__title` ✅ | ||
- `&__title` ❌ (`&__` should be avoided, to avoid massive indention.) | ||
- `.counter-title` ❌ (Must start with `.FILE-NAME__`) | ||
- `.counter__title__text` ❌ (Only one level) | ||
|
||
#### Variants and modifiers | ||
|
||
Sometimes you'll want to add variants to CSS-only classes. This can be done | ||
using **modifier classes** - e.g. `.counter--large`, `.counter__title--large`. | ||
**These classes must not be set alone.** E.g. `.counter__title--large` must not | ||
exist on an element without also having `.counter__title`. | ||
|
||
## Mixins, placeholder and variables | ||
|
||
Shared tooling is saved in [src/styles/scss/tools](../src/styles/scss/tools), | ||
NOT in individual stories. | ||
|
||
### Typography | ||
|
||
Typography is defined in | ||
[src/styles/scss/tools/variables.typography.scss](../src/styles/scss/tools/variables.typography.scss). | ||
These variables, all starting with `$typo__`, can be used, using a mixin, | ||
`@include typography($typo__h2);` in stories. | ||
Generally speaking, font styling should be avoided directly in stories, rather | ||
adding new variants in the `variables.typography.scss` file. | ||
This way, we can better keep track of what is available, and avoid duplicate | ||
styling in the future. | ||
|
||
## Legacy classes | ||
|
||
In the future, we want to apply these rules to old code too. Until then, | ||
the old classes are supported using the files | ||
in [src/styles/scss/legacy](../src/styles/scss/legacy). | ||
|
||
These classes should **not be used in new components** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Icon Usage Guidelines | ||
|
||
For information on how to use icons for this project, see [icon-guidelines.md](../../docs/Icon-guidelines.md). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.