From 62da72ad39b925d3700758313cb9c3d9dea60404 Mon Sep 17 00:00:00 2001 From: isaac Date: Sat, 24 Oct 2026 16:57:44 +0900 Subject: [PATCH] fix: tighten prose spacing and meet text and tap sizes on phones --- site/.vitepress/theme/HeroInstall.vue | 7 +++ site/.vitepress/theme/HomeWorkflows.vue | 5 +++ site/.vitepress/theme/style.css | 60 +++++++++++++++++++++++++ 3 files changed, 72 insertions(+) diff --git a/site/.vitepress/theme/HeroInstall.vue b/site/.vitepress/theme/HeroInstall.vue index 9711964..df01387 100644 --- a/site/.vitepress/theme/HeroInstall.vue +++ b/site/.vitepress/theme/HeroInstall.vue @@ -90,4 +90,11 @@ async function copy() { .installer-copy:hover { color: var(--vp-c-brand-1); border-color: var(--vp-c-brand-1); } .installer-more { display: inline-block; margin-top: 9px; font-size: 12px; color: var(--vp-c-brand-1); } @media (max-width: 959px) { .installer { margin-left: auto; margin-right: auto; } } +@media (max-width: 640px) { + .installer-heading, .installer-more { font-size: 14px; } + .installer-tab { padding-block: 8px; font-size: 14px; } + .installer-command code { font-size: 14px; } + .installer-copy { min-height: 40px; font-size: 14px; } + .installer-more { padding-block: 8px; } +} diff --git a/site/.vitepress/theme/HomeWorkflows.vue b/site/.vitepress/theme/HomeWorkflows.vue index 2b5a189..b6259ad 100644 --- a/site/.vitepress/theme/HomeWorkflows.vue +++ b/site/.vitepress/theme/HomeWorkflows.vue @@ -76,4 +76,9 @@ const workflows = computed(() => frontmatter.value.workflows ?? []) font-weight: 500; text-decoration: none; } +@media (max-width: 640px) { + .workflow { padding: 16px; } + .vp-doc .workflow pre code { font-size: 14px; } + .vp-doc .workflow a { display: inline-block; padding-block: 8px; } +} diff --git a/site/.vitepress/theme/style.css b/site/.vitepress/theme/style.css index e493dac..5bdf461 100644 --- a/site/.vitepress/theme/style.css +++ b/site/.vitepress/theme/style.css @@ -167,3 +167,63 @@ margin: 32px 0 0; } } + +/* Phones: code and menu text at 14px, 40px touch rows, and long inline code that wraps inside table cells */ +@media (max-width: 640px) { + .vp-doc [class*='language-'] code, + .vp-doc :not(pre) > code { + font-size: 14px; + } + + .vp-doc [class*='language-'] > span.lang, + .VPLocalNav .menu-text, + .VPLocalNavOutlineDropdown button { + font-size: 14px; + } + + .vp-doc td code, + .vp-doc th code { + overflow-wrap: anywhere; + } + + .vp-doc p, + .vp-doc li { + line-height: 26px; + } + + .vp-doc p { + margin: 12px 0; + } + + .vp-doc li + li { + margin-top: 4px; + } + + .vp-doc h2 { + margin: 32px 0 12px; + padding-top: 16px; + } + + .vp-doc h3 { + margin: 24px 0 8px; + } + + .VPHomeHero { + padding-bottom: 32px; + } + + .VPHero .image { + margin-top: 20px; + } + + .VPLocalNav .menu, + .VPLocalNavOutlineDropdown button { + min-height: 40px; + } + + .VPSidebarItem .link, + .VPNavScreenMenuLink, + .VPNavScreenMenuGroupLink { + padding-block: 8px; + } +}