mirror of
https://github.com/zhigang1992/nativewind.git
synced 2026-06-11 08:03:37 +08:00
fix: add extra media query parsing
This commit is contained in:
@@ -27,22 +27,21 @@ export function parseMediaQuery(
|
||||
} else if (child.type === "MediaFeature") {
|
||||
topicsAndAtRules.atRules ??= [];
|
||||
|
||||
switch (child.name) {
|
||||
case "min-width":
|
||||
topicsAndAtRules.topics.push("device-width");
|
||||
break;
|
||||
if (child.name.includes("width")) {
|
||||
topicsAndAtRules.topics.push("device-width");
|
||||
}
|
||||
|
||||
if (child.name.includes("height")) {
|
||||
topicsAndAtRules.topics.push("device-width");
|
||||
}
|
||||
|
||||
if (child.name.includes("prefers-color-scheme")) {
|
||||
topicsAndAtRules.topics.push("--color-scheme");
|
||||
}
|
||||
|
||||
switch (child.value?.type) {
|
||||
case "Identifier":
|
||||
topicsAndAtRules.atRules.push([child.name, child.value.name]);
|
||||
|
||||
switch (child.name) {
|
||||
case "prefers-color-scheme":
|
||||
topicsAndAtRules.topics.push("--color-scheme");
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
case "Dimension":
|
||||
switch (child.value.unit) {
|
||||
|
||||
Reference in New Issue
Block a user