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

Styling update #404

Merged
merged 10 commits into from
Feb 18, 2022
Merged

Styling update #404

merged 10 commits into from
Feb 18, 2022

Conversation

tomi-msft
Copy link
Contributor

This PR adds react as a peer dependency and adds default styling to set forced-color-adjust: auto

@@ -40,7 +40,8 @@
"yargs": "^14.0.0"
},
"peerDependencies": {
"@griffel/react": "^1.0.0"
"@griffel/react": "^1.0.0",
"react": "^17.0.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should match Fluent's range:

Suggested change
"react": "^17.0.1"
"react": ">=16.8.0 <18.0.0",

https://github.com/microsoft/fluentui/blob/a99218c3e02097545901e6a56cd6fe8aaae83661/packages/react-avatar/package.json#L56

@@ -6,7 +6,9 @@ const useRootStyles = makeStyles({
display: 'inline',
lineHeight: 0,

"@media screen and (-ms-high-contrast: black-on-white)": {fill: 'windowtext'}
"@media (forced-colors: active)": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could be more specific and only target the svg element here. It's the actual element that has the color inherit issue

w3c/csswg-drafts#6310
https://bugs.chromium.org/p/chromium/issues/detail?id=1242706

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should target the svg itself, there is no wrapper around it

layershifter
layershifter previously approved these changes Feb 11, 2022
@tomi-msft tomi-msft merged commit 18b01c3 into microsoft:master Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants