diff --git a/apps/website/e2e/font-metrics.spec.ts b/apps/website/e2e/font-metrics.spec.ts new file mode 100644 index 00000000000..c2b08b05b95 --- /dev/null +++ b/apps/website/e2e/font-metrics.spec.ts @@ -0,0 +1,109 @@ +import { expect } from '@playwright/test' + +import { test } from './fixtures/blockExternalMedia' + +// Rows that put an icon, a count or a control beside an uppercase word centre +// the boxes, not the ink. So a face whose caps sit high inside their line box +// misaligns every one of those rows at once, and no component can fix it. The +// faces are measured from their own @font-face rules rather than from the page, +// because `font-display: optional` leaves the weights this page never renders +// unusable for measurement. +const SIZE = 1000 + +test('every PP Formula face centres its caps inside the line box', async ({ + page +}) => { + await page.goto('/') + await expect(page.locator('html')).not.toHaveClass( + /(?:^|\s)ppformula-metric-fallback(?:\s|$)/ + ) + + const faces = await page.evaluate(async (size) => { + const rulesOf = (sheet: CSSStyleSheet) => { + try { + return [...sheet.cssRules] + } catch { + return [] + } + } + + const declarations = [...document.styleSheets] + .flatMap(rulesOf) + .filter( + (rule): rule is CSSFontFaceRule => rule instanceof CSSFontFaceRule + ) + .map((rule) => ({ + family: rule.style + .getPropertyValue('font-family') + .replaceAll(/['"]/g, ''), + weight: rule.style.getPropertyValue('font-weight'), + source: rule.style.getPropertyValue('src'), + ascentOverride: rule.style.getPropertyValue('ascent-override'), + descentOverride: rule.style.getPropertyValue('descent-override') + })) + .filter((declaration) => declaration.family.startsWith('PP Formula')) + + return Promise.all( + declarations.map(async (declaration, index) => { + const url = /url\(["']?([^"')]+)/.exec(declaration.source)?.[1] + if (!url) { + throw new Error(`no source for ${declaration.family}`) + } + + const probe = `probe-${index}` + document.fonts.add( + await new FontFace(probe, `url("${url}")`, { + ascentOverride: declaration.ascentOverride, + descentOverride: declaration.descentOverride + }).load() + ) + + const context = document.createElement('canvas').getContext('2d') + if (!context) throw new Error('no canvas context') + context.font = `${size}px "${probe}"` + const caps = context.measureText('H') + return { + family: declaration.family, + name: `${declaration.family} ${declaration.weight}`, + ascent: caps.fontBoundingBoxAscent, + descent: caps.fontBoundingBoxDescent, + capHeight: caps.actualBoundingBoxAscent + } + }) + ) + }, SIZE) + + expect([...new Set(faces.map((face) => face.family))].sort()).toEqual([ + 'PP Formula', + 'PP Formula Narrow' + ]) + + for (const face of faces) { + const aboveTheCaps = face.ascent - face.capHeight + expect( + Math.abs(aboveTheCaps - face.descent), + face.name + ).toBeLessThanOrEqual(SIZE / 100) + } +}) + +test('keeps the component fallback when metric overrides are unsupported', async ({ + page +}) => { + await page.addInitScript(() => { + Object.defineProperty(FontFace.prototype, 'ascentOverride', { + configurable: true, + get: () => '' + }) + }) + await page.goto('/') + + await expect(page.locator('html')).toHaveClass( + /(?:^|\s)ppformula-metric-fallback(?:\s|$)/ + ) + const marker = page.locator('.ppformula-text-center').first() + await expect(marker).toBeVisible() + expect( + await marker.evaluate((element) => getComputedStyle(element).top) + ).not.toBe('auto') +}) diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/about-hero-1-sm-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/about-hero-1-sm-visual-linux.png index 25d1fda66b4..63be3418543 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/about-hero-1-sm-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/about-hero-1-sm-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/about-hero-2-md-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/about-hero-2-md-visual-linux.png index 29da52b6b9b..6957f483955 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/about-hero-2-md-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/about-hero-2-md-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/contact-form-1-sm-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/contact-form-1-sm-visual-linux.png index 8d7b9645e70..5a1c58fbd86 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/contact-form-1-sm-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/contact-form-1-sm-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/contact-form-2-md-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/contact-form-2-md-visual-linux.png index 5ad07f04eaa..c9ddba75da6 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/contact-form-2-md-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/contact-form-2-md-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/enterprise-faq-1-sm-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/enterprise-faq-1-sm-visual-linux.png index ca89f831394..ebc663ece77 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/enterprise-faq-1-sm-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/enterprise-faq-1-sm-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/enterprise-faq-2-md-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/enterprise-faq-2-md-visual-linux.png index fa3c625eebe..a65183c1cc4 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/enterprise-faq-2-md-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/enterprise-faq-2-md-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/enterprise-faq-3-lg-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/enterprise-faq-3-lg-visual-linux.png index ab1a99cb0b0..7b3b68f63d1 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/enterprise-faq-3-lg-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/enterprise-faq-3-lg-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/enterprise-faq-4-xl-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/enterprise-faq-4-xl-visual-linux.png index 5d9eda53f84..f4af27b83ac 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/enterprise-faq-4-xl-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/enterprise-faq-4-xl-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/gallery-grid-1-sm-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/gallery-grid-1-sm-visual-linux.png index bbb63091172..c7dd798b2c1 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/gallery-grid-1-sm-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/gallery-grid-1-sm-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/gallery-grid-2-md-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/gallery-grid-2-md-visual-linux.png index 46f34e81e45..a09648d2b5a 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/gallery-grid-2-md-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/gallery-grid-2-md-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-get-started-1-sm-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-get-started-1-sm-visual-linux.png index 08973313b5f..07e2c5189b8 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-get-started-1-sm-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-get-started-1-sm-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-get-started-2-md-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-get-started-2-md-visual-linux.png index 7fc6c2c8842..b754d566717 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-get-started-2-md-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-get-started-2-md-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-get-started-3-lg-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-get-started-3-lg-visual-linux.png index 397d9ed5b30..da2a6ed6244 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-get-started-3-lg-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-get-started-3-lg-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-get-started-4-xl-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-get-started-4-xl-visual-linux.png index a9b9a9724b1..f4d898d01e4 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-get-started-4-xl-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-get-started-4-xl-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-product-cards-1-sm-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-product-cards-1-sm-visual-linux.png index 5e38023903b..f441b377939 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-product-cards-1-sm-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-product-cards-1-sm-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-product-cards-2-md-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-product-cards-2-md-visual-linux.png index 5674ea39cfa..3b6c648f646 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-product-cards-2-md-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-product-cards-2-md-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-product-cards-3-lg-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-product-cards-3-lg-visual-linux.png index 6dccdfc357f..ec595bb8388 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-product-cards-3-lg-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-product-cards-3-lg-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-product-cards-4-xl-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-product-cards-4-xl-visual-linux.png index 49a5044f85b..aa180606291 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-product-cards-4-xl-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/home-product-cards-4-xl-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-faq-1-sm-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-faq-1-sm-visual-linux.png index c6ab076260f..712dff7ebe2 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-faq-1-sm-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-faq-1-sm-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-faq-2-md-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-faq-2-md-visual-linux.png index 3454d8def4e..1190842f0ab 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-faq-2-md-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-faq-2-md-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-faq-3-lg-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-faq-3-lg-visual-linux.png index 3659798a20a..2f094688090 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-faq-3-lg-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-faq-3-lg-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-faq-4-xl-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-faq-4-xl-visual-linux.png index f9ce4892d8c..3d736ccc885 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-faq-4-xl-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-faq-4-xl-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-tiers-1-sm-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-tiers-1-sm-visual-linux.png index f8745809afe..50638e00da7 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-tiers-1-sm-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-tiers-1-sm-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-tiers-2-md-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-tiers-2-md-visual-linux.png index d32641f4757..39e31455780 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-tiers-2-md-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-tiers-2-md-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-tiers-3-lg-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-tiers-3-lg-visual-linux.png index 49ec0124005..7569a69c945 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-tiers-3-lg-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-tiers-3-lg-visual-linux.png differ diff --git a/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-tiers-4-xl-visual-linux.png b/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-tiers-4-xl-visual-linux.png index e16ce2ca42e..94c36e89c9b 100644 Binary files a/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-tiers-4-xl-visual-linux.png and b/apps/website/e2e/visual-responsive.spec.ts-snapshots/pricing-tiers-4-xl-visual-linux.png differ diff --git a/apps/website/src/components/common/BrandButton.vue b/apps/website/src/components/common/BrandButton.vue index 0f13e7649f5..b89c0b41fb1 100644 --- a/apps/website/src/components/common/BrandButton.vue +++ b/apps/website/src/components/common/BrandButton.vue @@ -37,7 +37,7 @@ const resolvedRel = computed(() => ) " > - + diff --git a/apps/website/src/components/common/HeaderMain/HeaderMainDesktop.vue b/apps/website/src/components/common/HeaderMain/HeaderMainDesktop.vue index 437ed4695b5..1eb76388efe 100644 --- a/apps/website/src/components/common/HeaderMain/HeaderMainDesktop.vue +++ b/apps/website/src/components/common/HeaderMain/HeaderMainDesktop.vue @@ -88,7 +88,9 @@ function isNavItemActive(navItem: NavItem, path: string): boolean { " > - {{ navItem.label }} + {{ + navItem.label + }} {{ ctaLabel ?? diff --git a/apps/website/src/components/demos/DemoNavSection.vue b/apps/website/src/components/demos/DemoNavSection.vue index ac46132f59f..6adf63fd942 100644 --- a/apps/website/src/components/demos/DemoNavSection.vue +++ b/apps/website/src/components/demos/DemoNavSection.vue @@ -50,7 +50,7 @@ const nextHref = localizeHref(`/demos/${nextSlug}`, locale) › {{ t('demos.nav.viewDemo' as TranslationKey, locale) }} diff --git a/apps/website/src/components/hero/AngleNode.vue b/apps/website/src/components/hero/AngleNode.vue index 06fbb997ebc..718ec7fb5c8 100644 --- a/apps/website/src/components/hero/AngleNode.vue +++ b/apps/website/src/components/hero/AngleNode.vue @@ -117,7 +117,7 @@ onUnmounted(() => { 3D ANGLE diff --git a/apps/website/src/components/hero/ColorNode.vue b/apps/website/src/components/hero/ColorNode.vue index e8860646d7b..fc0db57b5c3 100644 --- a/apps/website/src/components/hero/ColorNode.vue +++ b/apps/website/src/components/hero/ColorNode.vue @@ -38,7 +38,7 @@ const saturationTrack = computed( /> COLOR diff --git a/apps/website/src/components/hero/HeroHeadline.vue b/apps/website/src/components/hero/HeroHeadline.vue index 5276dd39bb8..ac2eb6a0b16 100644 --- a/apps/website/src/components/hero/HeroHeadline.vue +++ b/apps/website/src/components/hero/HeroHeadline.vue @@ -10,9 +10,7 @@ const lines = t('hero.title', locale).split('\n') // whatever context renders it (canvas overlay or mobile flow). const cap = '-mx-px h-full w-auto self-stretch' -// PP Formula Narrow sits high in its em box; nudge the glyphs down so they -// read optically centred between the caps. -const inner = 'inline-block translate-y-[0.11em] whitespace-nowrap' +const inner = 'ppformula-narrow-text-center inline-block whitespace-nowrap' diff --git a/apps/website/src/components/ui/badge/Badge.vue b/apps/website/src/components/ui/badge/Badge.vue index e125dda70c0..db0cffa77e9 100644 --- a/apps/website/src/components/ui/badge/Badge.vue +++ b/apps/website/src/components/ui/badge/Badge.vue @@ -30,7 +30,7 @@ const { - + diff --git a/apps/website/src/components/ui/button-pill/ButtonPill.vue b/apps/website/src/components/ui/button-pill/ButtonPill.vue index 88cc5212aa9..707ddc01317 100644 --- a/apps/website/src/components/ui/button-pill/ButtonPill.vue +++ b/apps/website/src/components/ui/button-pill/ButtonPill.vue @@ -41,7 +41,7 @@ const { diff --git a/apps/website/src/components/ui/button/Button.vue b/apps/website/src/components/ui/button/Button.vue index f2bcfa54efd..f6575310018 100644 --- a/apps/website/src/components/ui/button/Button.vue +++ b/apps/website/src/components/ui/button/Button.vue @@ -43,7 +43,7 @@ const { - + diff --git a/apps/website/src/components/ui/navigation-menu/NavigationMenuTrigger.vue b/apps/website/src/components/ui/navigation-menu/NavigationMenuTrigger.vue index 3791de08af9..51d1878324e 100644 --- a/apps/website/src/components/ui/navigation-menu/NavigationMenuTrigger.vue +++ b/apps/website/src/components/ui/navigation-menu/NavigationMenuTrigger.vue @@ -30,7 +30,7 @@ const forwardedProps = useForwardProps(computed(() => ({ ...restProps }))) :data-active="active ? '' : undefined" :class="cn(navigationMenuTriggerStyle(), 'group', className)" > - + must stay overflow: visible — body's overflow (incl. reka-ui's dialog scroll lock) only propagates to the viewport when the root is visible. The horizontal clip lives on . */} - + @@ -115,6 +115,19 @@ const structuredData = shouldNoindex {shouldNoindex && } {title} + + diff --git a/apps/website/src/pages/pixal3d-trellis2.astro b/apps/website/src/pages/pixal3d-trellis2.astro index 2ca49482105..fb6e3139afc 100644 --- a/apps/website/src/pages/pixal3d-trellis2.astro +++ b/apps/website/src/pages/pixal3d-trellis2.astro @@ -289,7 +289,7 @@ const faqJsonLd = { aria-selected="true" class={tab} > - Examples + Examples diff --git a/apps/website/src/styles/global.css b/apps/website/src/styles/global.css index 098baa80ae2..44dfad08c57 100644 --- a/apps/website/src/styles/global.css +++ b/apps/website/src/styles/global.css @@ -2,15 +2,18 @@ @import '@comfyorg/design-system/css/base.css'; @import 'tw-animate-css'; -/* PP Formula's native vertical metrics place the baseline too high, so caps - sit in the upper half of the line box. Overriding ascent/descent re-anchors - the baseline so caps render optically centered when line-height is tight. - BUT, IT IS NOT WELL SUPPORTED: - ascent-override: 92%; - descent-override: 8%; - line-gap-override: 0%; */ +/* PP Formula ships an ascent of 90.6% and a descent of 30.6% against a cap + height of 82.9%, which leaves its caps sitting 5.9% of the em above the + middle of the line box. Every row that centres an icon beside a word + inherits that, so the fix belongs to the face rather than to each of them: + each override pair splits the face's own content box either side of its cap + box, so the caps land in the middle of it at any line-height and + `line-height: normal` stays where it was. The narrow cut is drawn to its own + metrics and so takes its own pair. */ @font-face { font-family: 'PP Formula'; + ascent-override: 102.05%; + descent-override: 19.15%; src: url('/fonts/PPFormula-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; @@ -19,6 +22,8 @@ @font-face { font-family: 'PP Formula'; + ascent-override: 102.05%; + descent-override: 19.15%; src: url('/fonts/PPFormula-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; @@ -27,6 +32,8 @@ @font-face { font-family: 'PP Formula'; + ascent-override: 102.05%; + descent-override: 19.15%; src: url('/fonts/PPFormula-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; @@ -35,6 +42,8 @@ @font-face { font-family: 'PP Formula'; + ascent-override: 102.05%; + descent-override: 19.15%; src: url('/fonts/PPFormula-Semibold.woff2') format('woff2'); font-weight: 600; font-style: normal; @@ -43,6 +52,8 @@ @font-face { font-family: 'PP Formula'; + ascent-override: 102.05%; + descent-override: 19.15%; src: url('/fonts/PPFormula-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; @@ -51,6 +62,8 @@ @font-face { font-family: 'PP Formula'; + ascent-override: 102.05%; + descent-override: 19.15%; src: url('/fonts/PPFormula-Bold.woff2') format('woff2'); font-weight: 800; font-style: normal; @@ -59,6 +72,8 @@ @font-face { font-family: 'PP Formula Narrow'; + ascent-override: 99.45%; + descent-override: 18.15%; src: url('/fonts/PPFormula-NarrowSemibold.woff2') format('woff2'); font-weight: 600; font-style: normal; @@ -121,11 +136,6 @@ --color-workspace-mark: var(--color-transparency-white-t20); } -@utility ppformula-text-center-sm { - position: relative; - top: 0.12em; -} - @utility content-auto { content-visibility: auto; contain-intrinsic-size: auto 340px; @@ -523,15 +533,18 @@ mask-position: center; } -/* PP Formula has asymmetric vertical metrics - Shifting visually with `top` corrects the appearance without changing the - inline-block's bounding box, so button/badge sizes are unaffected. */ -@utility ppformula-text-center { - display: inline-block; +/* Released Safari versions before 27 ignore the metric overrides above. These + marker classes keep the same optical centring there without changing layout + or overriding display utilities such as `hidden`. */ +html.ppformula-metric-fallback + :where(.ppformula-text-center, .ppformula-text-center-sm) { position: relative; - top: 0.1em; + top: 0.1145em; } +html.ppformula-metric-fallback .ppformula-narrow-text-center { + transform: translateY(0.1065em); +} /* Hide native play-button overlay iOS Safari shows when autoplay is blocked (e.g. Low Power Mode). These are decorative background videos. */ video::-webkit-media-controls-start-playback-button, diff --git a/apps/website/src/templates/drops/AnnouncementBanner.vue b/apps/website/src/templates/drops/AnnouncementBanner.vue index a9176827e1a..1dbeb51825f 100644 --- a/apps/website/src/templates/drops/AnnouncementBanner.vue +++ b/apps/website/src/templates/drops/AnnouncementBanner.vue @@ -59,7 +59,7 @@ const { isVisible, close, persistHidden } = useBannerDismissal(version) " >

{{ data.title }} diff --git a/apps/website/src/templates/mcp/ComfyMcpDemo.vue b/apps/website/src/templates/mcp/ComfyMcpDemo.vue index 528c9bde4c9..097200cdfc3 100644 --- a/apps/website/src/templates/mcp/ComfyMcpDemo.vue +++ b/apps/website/src/templates/mcp/ComfyMcpDemo.vue @@ -254,7 +254,7 @@ onUnmounted(() => clearTimeout(timer)) v-if="card.via" class="relative isolate hidden h-8 shrink-0 items-center justify-center overflow-visible bg-transparent px-3 font-formula text-xs font-extrabold tracking-[0.7px] text-white/60 uppercase before:absolute before:inset-0 before:-z-10 before:-skew-x-12 before:rounded-sm before:bg-white/20 lg:inline-flex lg:px-5 lg:text-sm" > - + {{ card.via }} diff --git a/apps/website/src/templates/platform/CodeTabs.vue b/apps/website/src/templates/platform/CodeTabs.vue index 0e83043f0ef..06f73238203 100644 --- a/apps/website/src/templates/platform/CodeTabs.vue +++ b/apps/website/src/templates/platform/CodeTabs.vue @@ -121,7 +121,7 @@ function cycleValue(values: string[]): string { ) " > - {{ tab.name }} + {{ tab.name }} diff --git a/apps/website/src/templates/platform/ProductsSection.vue b/apps/website/src/templates/platform/ProductsSection.vue index be7bedce235..b1326eca81d 100644 --- a/apps/website/src/templates/platform/ProductsSection.vue +++ b/apps/website/src/templates/platform/ProductsSection.vue @@ -51,7 +51,7 @@ const modelsTabs = modelsApiCodeTabs

- + {{ t('platform.hero.getStarted', locale) }} @@ -100,7 +100,7 @@ const modelsTabs = modelsApiCodeTabs
- + {{ t('platform.products.models.learnMore', locale) }} @@ -133,7 +133,7 @@ const modelsTabs = modelsApiCodeTabs
- + {{ t('platform.hero.getStarted', locale) }}