-
Notifications
You must be signed in to change notification settings - Fork 35
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
Implement "insertion point" API for react-shadow
#60
Implement "insertion point" API for react-shadow
#60
Conversation
5f97831
to
4a13fd6
Compare
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.
As we discussed in offline, let's introduce a factory to create root
, i.e.:
const root = createRoot({ sheetInsertionPoint: sheet })
4a13fd6
to
da6811b
Compare
@layershifter Made this update. |
Allows users to control where Griffel styles are inserted into the adoptedStyleSheets array.
This function allows users to createa a root configured with options. Currently the only supported option is "insertionPoint" which allows users to control the order of stylesheets so they can affect specificity.
a3b2519
to
34c313c
Compare
@layershifter I think I've addressed the changes we discussed. Can you remove your hold on the PR so it can be merged? |
@spmonahan I have already approved the PR previous week 🐱 @microsoft/fluentui-react-build can you please check the PR? 🙏 |
34c313c
to
33b5acb
Compare
* main: . applying package updates chore(react-tree-grid): release (microsoft#122) chore(react-tree-grid): follow up on a11y issue for Meet stories (microsoft#125) chore(react-tree-grid): resolve Meet stories a11y issues (microsoft#124) bugfix(react-tree-grid): header TreeGridCell should have role rowheader instead of columnheader (microsoft#123) chore(react-tree-grid): minor adjustments on stories (microsoft#117) Implement "insertion point" API for `react-shadow` (microsoft#60) create houdini-utils package (microsoft#120) feat(nx-plugin): add testEnvironment to library generator and render proper jest config (microsoft#121) chore(react-tree-grid): adds playwright component tests (microsoft#100)
Adds an "insertion point" API similar to Griffel's API.
Here we use a special sentinel
ExtendedCSSStyleSheet
in theadoptedStyleSheets
array and look it up prior to setting the stylesheets.Additionally, a constant for whetheradoptedStyleSheets
is mutable is added so we can conditionally update the array. This improves Safari support. See this PR for more details.Resolves #59