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

Create a Baseline CSS file #2454

Closed
Tracked by #1045
mimarz opened this issue Sep 19, 2024 · 4 comments
Closed
Tracked by #1045

Create a Baseline CSS file #2454

mimarz opened this issue Sep 19, 2024 · 4 comments
Labels
css @digdir/designsystemet-css

Comments

@mimarz
Copy link
Collaborator

mimarz commented Sep 19, 2024

Create a baseline.css that defines the default global values for Designsystemet in CSS.

  • Move default color to global, instead of individual typgography elements (which was a side-effect of old css-modules)
  • Suggest moving the content of ds-rest.css or rename it to just reset.css and import it.
  • We have a "bring our own font" approach, do we still want to define a default font-family and expect people that want to overwrite or not?
    • One problem I see is our need for font-feature-settings: 'cv05' 1; setting that could interfere with other fonts.

Global color should be defined as:

[data-color="light"], :root { color: ... }
[data-color="dark"] { color: ... }

Notes:

@mimarz mimarz converted this from a draft issue Sep 19, 2024
@mimarz mimarz added the css @digdir/designsystemet-css label Sep 19, 2024
@eirikbacker
Copy link
Contributor

Great! Support the initiative!
Suggestion: remove ds-reset.css entirely.
I know we have box-sizing: border-box set up for all components here, but I suggest we rather move box-sizing: border-box into the individual component files, as this today is a "transparent" dependency which both makes it less explicitly defined when reading each components CSS file, and it depends on all classnames starting with ds- which might not be the case if moving to CSS modules or other form of versioning the CSS

@mimarz
Copy link
Collaborator Author

mimarz commented Sep 19, 2024

Great! Support the initiative! Suggestion: remove ds-reset.css entirely. I know we have box-sizing: border-box set up for all components here, but I suggest we rather move box-sizing: border-box into the individual component files, as this today is a "transparent" dependency which both makes it less explicitly defined when reading each components CSS file, and it depends on all classnames starting with ds- which might not be the case if moving to CSS modules or other form of versioning the CSS

Ah yes! Good point on the box-sizing, I knew I forgot someting. I always like to refer to https://wiki.csswg.org/ideas/mistakes for when making new baselines/resets.

@mimarz
Copy link
Collaborator Author

mimarz commented Sep 24, 2024

relevant issue #2498

Barsnes added a commit that referenced this issue Oct 1, 2024
I created a new baseline file, as it seems like our `ds-reset` file will
be removed soon.
I am importing the new file under the layer `ds.baseline`, but this
could also be imported in `ds.reset`

part of #2454
@Barsnes
Copy link
Member

Barsnes commented Oct 9, 2024

closing this as completed in #2588

@Barsnes Barsnes closed this as completed Oct 9, 2024
@github-project-automation github-project-automation bot moved this from 📄 Todo to ✅ Done in Team Design System Oct 9, 2024
unekinn pushed a commit that referenced this issue Oct 11, 2024
I created a new baseline file, as it seems like our `ds-reset` file will
be removed soon.
I am importing the new file under the layer `ds.baseline`, but this
could also be imported in `ds.reset`

part of #2454
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css @digdir/designsystemet-css
Projects
Status: ✅ Done
Development

No branches or pull requests

4 participants