mirror of https://github.com/VERT-sh/VERT.git
feat: dynadark tailwind plugin for dark detection
This commit is contained in:
parent
0888cc1cbf
commit
5e47cdbcf7
|
@ -55,7 +55,7 @@
|
||||||
<div class="grid grid-cols-1 grid-rows-1">
|
<div class="grid grid-cols-1 grid-rows-1">
|
||||||
{#key name}
|
{#key name}
|
||||||
<span
|
<span
|
||||||
class="mix-blend-difference light:invert dark:invert-0 col-start-1 row-start-1 text-center"
|
class="mix-blend-difference invert dynadark:invert-0 col-start-1 row-start-1 text-center"
|
||||||
in:fly={{
|
in:fly={{
|
||||||
duration,
|
duration,
|
||||||
easing: quintOut,
|
easing: quintOut,
|
||||||
|
|
|
@ -83,10 +83,12 @@
|
||||||
|
|
||||||
<div class="[@media(max-height:768px)]:block mt-10 picker-fly">
|
<div class="[@media(max-height:768px)]:block mt-10 picker-fly">
|
||||||
<Uploader
|
<Uploader
|
||||||
isMobile={data.isMobile}
|
isMobile={data.isMobile || false}
|
||||||
bind:files={ourFiles}
|
bind:files={ourFiles}
|
||||||
onupload={runUpload}
|
onupload={runUpload}
|
||||||
acceptedFormats={[...new Set(converters.flatMap((c) => c.supportedFormats))]}
|
acceptedFormats={[
|
||||||
|
...new Set(converters.flatMap((c) => c.supportedFormats)),
|
||||||
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -27,13 +27,9 @@ export default {
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
plugin(function ({ addVariant }) {
|
plugin(function ({ addVariant }) {
|
||||||
addVariant("dark", [
|
addVariant("dynadark", [
|
||||||
"body.dark &",
|
"body:not(.light).dark &",
|
||||||
"@media (prefers-color-scheme: dark)",
|
"@media (prefers-color-scheme: dark) { body:not(.light) &",
|
||||||
]);
|
|
||||||
addVariant("light", [
|
|
||||||
"body.light &",
|
|
||||||
"@media (prefers-color-scheme: light)",
|
|
||||||
]);
|
]);
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue