css
css copied to clipboard
Primitives variables missing in bundled css
Describe the bug
I'm using the built primer css file on my static site following the documentation. and i'm upgrading to the latest 21 version (currently 21.3.3). I found many primitives css variables is missing since this version (21.3.2 or 21.3.3). Should i import the primitives variables by my self? If so, which css file should i add to my html header? The documentation seems not up-to-date.
To Reproduce
add <link href="https://unpkg.com/@primer/css@^21.0.1/dist/primer.css" rel="stylesheet" /> to static site html
Expected behavior
primitives variables loaded.
Additional context
it seems it works after i add https://unpkg.com/@primer/css@^21.0.1/dist/primitives.css to html.
related to https://github.com/cscs181/QQ-GitHub-Bot/pull/83
Hi!
Tagging @langermank and @lukasoppermann on this, they have more context.
I had to explicitly set the data-color-mode and data-light/dark-theme in a parent element (<main data-color-mode="light" data-light-theme="light">)
This has been like this in the primer/primitives css for quite a while already.
I am wondering if this changed for primer/css consumers because of the change in the theme files like here: https://github.com/primer/css/pull/2634/files#diff-09f47f7344ab01d99503302193dff74105e131684928fbfb55c02aaac33f0799 ?
@jonrohan can you advise if this may be the cause for the change?
In my case, I have already provided the data-color-mode and theme info in the html tag attribute. You can see the static html file here.
I didn't make any changes to this and it is not working since the primer css new version (21.3.2 or 21.3.3) released.
I'm also observing that I need to load https://cdn.jsdelivr.net/npm/@primer/[email protected]/dist/primitives.min.css in addition to https://cdn.jsdelivr.net/npm/@primer/[email protected]/dist/primer.min.css while attempting to update the microsoft/STL Status Chart. (Color variables were also renamed.)
primer/css 21.3.2 specifically contained the breaking change.
CC: @langermank @jonrohan
This should be fixed with v21.3.5