-
Notifications
You must be signed in to change notification settings - Fork 610
docs: add css layer names adr #6030
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
base: main
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces an ADR to define the named CSS layers and their application order within Primer.
- Specifies five core layers (
base
,theme
,icons
,components
,utilities
) and their ordering - Establishes naming conventions (camelCase for layers, PascalCase for component layers) and namespace usage
- Details the impact on Primer libraries and poses an unresolved question about where ordering should be defined
Comments suppressed due to low confidence (1)
contributor-docs/adrs/adr-022-css-layer-names.md:8
- [nitpick] The status table shows 'Approved' with 🚧 and comments out 'Adopted'. Update the table to reflect the current stage or uncomment the Adopted status when appropriate, and use consistent labels to avoid confusion.
| Adopted | <!-- ✅ --> |
- Resets | ||
- Utilities | ||
- Product |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Context section lists 'Resets' and 'Product' as potential layers, but they are not defined in the Decision. Consider removing them or clarifying how they map into existing layers (e.g., base or theme).
- Resets | |
- Utilities | |
- Product | |
- Resets (mapped to the `base` layer in the Decision section) | |
- Utilities | |
- Product (not currently part of the defined layers but may be considered in the future) |
Copilot uses AI. Check for mistakes.
size-limit report 📦
|
View Rendered ADR
Adds an ADR in order to define our CSS Layers and the order that they should be applied in. I wanted to take a stab at defining this for us as we start moving more into CSS Layers world. Defining the layers and their order should help address issues like: https://github.com/github/primer/issues/5181 since we will have a deterministic order in which styles are applied.
This was a quick draft so let me know if you have any questions or feedback! In particular, would love to see any resources you all might have that talk about this in other systems 👀 I linked a couple but I'm sure there are more out there.