Open tkent-google opened 5 years ago
Options:
:root { --std-control-theme: match-platform; }
appearance
CSS property; e.g. std-switch { appearance: auto; }
foo.controlTheme = 'match-platform';
foo.platformMatchedTheme = true;
Feature-Policy: platform-neutral-theme none
Feature-Policy: platform-matched-theme *
<link rel="stylesheet" href="https://googlecdn.com/current-platform.css">
<link rel="stylesheet" href="std:form-controls/platform-styles">
<body theme="match-platform"><std-switch>
<div platformmatchedtheme><std-switch>
themeChangedCallback
?We implemented the first option in the prototype. Because of the first problem, elements don't change their appearance even if --std-control-theme
property is changed. We need to disconnect and connect elements from the document tree to apply new theme.
(Edited to drop specific theme names)
<std-switch>
will have a platform-independent appearance by default. We should provide an easy way to enable platform-dependent appearance.