mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-22 05:15:32 +01:00
switch to fine and coarse media queries
This commit is contained in:
8 files changed
+29
-35
No files matched your search
+6
-7
@@ -4,13 +4,12 @@ import { CaretUpIcon, GearIcon } from "@radix-ui/react-icons";
|
||||
import { api } from "../api/dynamic";
|
||||
import { Logo } from "../icons/Logo";
|
||||
import { LinkI18nWrapper } from "./LinkI18nWrapper";
|
||||
import type { Props as NavbarDesktopProps } from "./NavbarDesktop.astro";
|
||||
import { filtered } from "./NavbarDesktop.astro";
|
||||
import { filtered, type Props as NavbarFineProps } from "./NavbarFine.astro";
|
||||
import NavbarMobileAutoHide from "./NavbarMobileAutoHide.astro";
|
||||
import { Scroller, ScrollerOrientation } from "./Scroller";
|
||||
import { Text } from "./Text";
|
||||
|
||||
export type Props = NavbarDesktopProps & {
|
||||
export type Props = NavbarFineProps & {
|
||||
solid?: boolean;
|
||||
};
|
||||
|
||||
@@ -27,13 +26,13 @@ const strings = await api.strings(locale);
|
||||
}
|
||||
|
||||
#navbar-mobile-spacer {
|
||||
display: none;
|
||||
flex-shrink: 0;
|
||||
display: none;
|
||||
|
||||
height: calc(var(--icon-size) + 2 * var(--padding));
|
||||
|
||||
@media screen and (max-width: 80rem) {
|
||||
display: block;
|
||||
@media (pointer: coarse) {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +58,7 @@ const strings = await api.strings(locale);
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
|
||||
@media screen and (max-width: 80rem) {
|
||||
@media (pointer: coarse) {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
+4
-2
@@ -27,8 +27,10 @@ export const filtered = Object.values(tools).filter(
|
||||
--padding: var(--space-4);
|
||||
--min-content-width: calc(var(--icon-size) + 2 * var(--padding));
|
||||
|
||||
@media screen and (max-width: 80rem) {
|
||||
display: none;
|
||||
display: none;
|
||||
|
||||
@media (pointer: fine) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
width: var(--min-content-width);
|
||||
@@ -10,10 +10,8 @@
|
||||
height: 100%;
|
||||
background-color: black;
|
||||
|
||||
border-radius: var(--space-4);
|
||||
|
||||
@media screen and (max-width: 80rem) {
|
||||
border-radius: 0;
|
||||
@media (pointer: fine) {
|
||||
border-radius: var(--space-4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
display: none;
|
||||
|
||||
@media screen and (max-width: 80rem) {
|
||||
@media (pointer: coarse) {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
@@ -21,16 +21,13 @@ const toolStrings = strings.tools[tool.id as keyof typeof strings.tools];
|
||||
--margin: var(--space-4);
|
||||
|
||||
flex: 1;
|
||||
border-radius: var(--space-4);
|
||||
overflow: hidden;
|
||||
|
||||
margin: var(--margin) var(--margin) 0 0;
|
||||
|
||||
background-size: cover;
|
||||
|
||||
@media screen and (max-width: 80rem) {
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
@media (pointer: fine) {
|
||||
margin: var(--margin) var(--margin) 0 0;
|
||||
border-radius: var(--space-4);
|
||||
}
|
||||
|
||||
.content {
|
||||
|
||||
Reference in new issue
Block a user