Skip to content

Auto set color-scheme on root element should be configurable #163

@eslym

Description

@eslym

Describe the feature in detail (code, mocks, or screenshots encouraged)

I have my own css for the dark variant where

@custom-variant dark {
	@media not print {
		:is(.dark *) {
			@slot;
		}
	}
}
@layer base {
	:root {
		color-scheme: light;
	}
	@media not print {
		.dark {
			color-scheme: dark;
		}
	}
}

auto set color-scheme on the html element creates huge issue for me

Related files:

rootEl.style.colorScheme = light ? "light" : "dark";

htmlEl.style.colorScheme = "light";

htmlEl.style.colorScheme = "dark";

What type of pull request would this be?

Enhancement

Provide relevant links or additional information.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions