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

Add preferred-color-scheme: light support #23

Merged
merged 4 commits into from
Aug 17, 2023

Conversation

NataliaNagaeva
Copy link
Contributor

Added preferred-color-scheme: light support
#7

README.md Outdated
@@ -28,6 +28,15 @@ from media query to special class.
background: black
}
}

@media (prefers-color-scheme: light) {
Copy link
Member

Choose a reason for hiding this comment

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

Let’s keep example simple.

But we can mentioned somewhere that we support both light and dark schemes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, it looks redundant. I think the phrase plugin to make switcher to force dark or light theme by copying styles from media query to special class has already described that.

Removed the example for the light scheme.

@@ -17,6 +18,12 @@ test('replaces selectors', () => {
html,
:root,
a { }
}
@media (prefers-color-scheme:light) {
Copy link
Member

Choose a reason for hiding this comment

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

Can you add the light tests to a separated test (maybe one extra test for both cases together)?

Our tests already too long, it will simplify tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Separated tests for the light scheme to individual tests and added one extra test for both schemes.

@ai
Copy link
Member

ai commented Aug 15, 2023

A few small fixes for docs and tests, and we are ready to merge. The plugin changes looks good. I already mark task on Cult of Martians as solved by you.

Do you have a twitter account to mentioned you?

@NataliaNagaeva
Copy link
Contributor Author

mentione

Yes, I have. I use it for reading only but you can certainly mention me if you want :) @astashkinana

@ai ai merged commit 71927bc into postcss:main Aug 17, 2023
2 checks passed
@ai
Copy link
Member

ai commented Aug 17, 2023

Thanks. This feature was released at 1.0.

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.

None yet

2 participants