chore: remove prefers-color-scheme: no-preference (#5990)

The 'no-preference' value has been removed from the spec per resolution in [1]. The appropriate web-platform-tests [2] have already been updated.

[1] https://github.com/w3c/csswg-drafts/issues/3857#issuecomment-634779976
[2] https://github.com/web-platform-tests/wpt/pull/24024
This commit is contained in:
Henrik Skupin 2020-06-09 23:17:07 +02:00 committed by GitHub
parent 83c29d942b
commit 9c656d417e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 19 deletions

View File

@ -1342,8 +1342,6 @@ await page.evaluate(() => matchMedia('(prefers-color-scheme: dark)').matches);
// → true
await page.evaluate(() => matchMedia('(prefers-color-scheme: light)').matches);
// → false
await page.evaluate(() => matchMedia('(prefers-color-scheme: no-preference)').matches);
// → false
await page.emulateMediaFeatures([{ name: 'prefers-reduced-motion', value: 'reduce' }]);
await page.evaluate(() => matchMedia('(prefers-reduced-motion: reduce)').matches);
@ -1359,8 +1357,6 @@ await page.evaluate(() => matchMedia('(prefers-color-scheme: dark)').matches);
// → true
await page.evaluate(() => matchMedia('(prefers-color-scheme: light)').matches);
// → false
await page.evaluate(() => matchMedia('(prefers-color-scheme: no-preference)').matches);
// → false
await page.evaluate(() => matchMedia('(prefers-reduced-motion: reduce)').matches);
// → true
await page.evaluate(() => matchMedia('(prefers-reduced-motion: no-preference)').matches);

View File

@ -249,11 +249,6 @@ describe('Emulation', () => {
() => matchMedia('(prefers-color-scheme: dark)').matches
)
).toBe(false);
expect(
await page.evaluate(
() => matchMedia('(prefers-color-scheme: no-preference)').matches
)
).toBe(false);
await page.emulateMediaFeatures([
{ name: 'prefers-color-scheme', value: 'dark' },
]);
@ -267,11 +262,6 @@ describe('Emulation', () => {
() => matchMedia('(prefers-color-scheme: light)').matches
)
).toBe(false);
expect(
await page.evaluate(
() => matchMedia('(prefers-color-scheme: no-preference)').matches
)
).toBe(false);
await page.emulateMediaFeatures([
{ name: 'prefers-reduced-motion', value: 'reduce' },
{ name: 'prefers-color-scheme', value: 'light' },
@ -296,11 +286,6 @@ describe('Emulation', () => {
() => matchMedia('(prefers-color-scheme: dark)').matches
)
).toBe(false);
expect(
await page.evaluate(
() => matchMedia('(prefers-color-scheme: no-preference)').matches
)
).toBe(false);
});
it('should throw in case of bad argument', async () => {
const { page } = getTestState();