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

Move box-sizing to each components css file #2498

Closed
Tracked by #1045
mimarz opened this issue Sep 24, 2024 · 0 comments · Fixed by #2530
Closed
Tracked by #1045

Move box-sizing to each components css file #2498

mimarz opened this issue Sep 24, 2024 · 0 comments · Fixed by #2530
Assignees
Labels
css @digdir/designsystemet-css

Comments

@mimarz
Copy link
Collaborator

mimarz commented Sep 24, 2024

Now box-sizing: border-box is set in .ds-reset.
This has some issues:

  • If class names are hashed in the future (CSS modules) for CSS versioning, the [class^="ds-"] will break
  • If using CSS without React, a consumer can add class="my-button ds-button", making [class^="ds-"] break
  • It is a "transparent" dependency - meaning a developer can not open i.e. button.css and see the complete styling
    Even though this means repeating box-sizing in several files, it is a more robust and explicit solution
@mimarz mimarz converted this from a draft issue Sep 24, 2024
@mimarz mimarz added the css @digdir/designsystemet-css label Sep 24, 2024
@mimarz mimarz moved this from 🔵 Inbox to 📄 Todo in Team Design System Sep 24, 2024
This was referenced Sep 24, 2024
@mimarz mimarz added this to the V1 - Helhetlig komponentbibliotek milestone Sep 24, 2024
@eirikbacker eirikbacker self-assigned this Sep 25, 2024
@eirikbacker eirikbacker moved this from 📄 Todo to 🏗 In progress in Team Design System Sep 25, 2024
@eirikbacker eirikbacker moved this from 🏗 In progress to 📄 Todo in Team Design System Sep 25, 2024
@eirikbacker eirikbacker moved this from 📄 Todo to 🏗 In progress in Team Design System Sep 27, 2024
@eirikbacker eirikbacker moved this from 🏗 In progress to 👀 Ready for review in Team Design System Sep 27, 2024
@github-project-automation github-project-automation bot moved this from 👀 Ready for review to ✅ Done in Team Design System Sep 30, 2024
@mrosvik mrosvik modified the milestones: Helhetlig komponentbibliotek, V1 - Lansering Jan 28, 2025
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

Successfully merging a pull request may close this issue.

3 participants