An open source design system that's fully customizable and agent ready
TypeScript
fix(docsite): Blog section styling updates (#3336)
Kenton Quatman572e71baae88
diff --git a/apps/docsite/public/blog/authors/astryx-team.png b/apps/docsite/public/blog/authors/astryx-team.pngindex ccd13f9b8e..cb397406c1 100644Binary files a/apps/docsite/public/blog/authors/astryx-team.png and b/apps/docsite/public/blog/authors/astryx-team.png differdiff --git a/apps/docsite/src/app/(site)/_landing/BlogShowcase.tsx b/apps/docsite/src/app/(site)/_landing/BlogShowcase.tsxnew file mode 100644index 0000000000..0585e94b5d--- /dev/null+++ b/apps/docsite/src/app/(site)/_landing/BlogShowcase.tsx@@ -0,0 +1,131 @@+// Copyright (c) Meta Platforms, Inc. and affiliates.++/**+ * @file BlogShowcase.tsx+ *+ * Home-page "Blog" section. Auto-surfaces the most recent posts from the+ * build-time blog registry (already sorted latest-first). The layout adapts to+ * how many posts are published so the section always looks intentional:+ *+ * - Exactly 2 posts → a balanced 50/50 grid of two equal feature cards.+ * - 3+ posts → a featured split: the latest post is a large feature card on the+ * left and the next two posts render as smaller cards stacked on the right.+ *+ * Cards are the shared `BlogCard` (also used on the blog index) with the excerpt+ * hidden to keep this marketing section tighter. The left/large card uses+ * BlogCard's `feature` variant; the right/stacked cards use the default variant.+ *+ * @input blogPosts (from the generated registry)+ * @output A marketing section linking to the latest blog posts+ * @position Rendered inside the home page showcase overlay (app/(site)/page.tsx)+ */++'use client';++import type {ReactNode} from 'react';+import * as stylex from '@stylexjs/stylex';+import {ArrowRight} from 'lucide-react';+import {Heading} from '@astryxdesign/core/Text';+import {Icon} from '@astryxdesign/core/Icon';+import {VStack, HStack} from '@astryxdesign/core/Layout';+import {Grid, GridSpan} from '@astryxdesign/core/Grid';+import {Button} from '@astryxdesign/core/Button';+import {spacingVars} from '@astryxdesign/core/theme/tokens.stylex';+import {blogPosts} from '../../../generated/blogRegistry';+import {BlogCard} from '../../../components/blog/BlogCard';++// The featured-split layout (3+ posts) renders 1 feature (left) + 2 compact+// (right), filled by the 3 most recent posts (blogPosts is emitted latest-first+// by the generator).+const SLOT_COUNT = 3;++const styles = stylex.create({+ section: {+ width: '100%',+ maxWidth: 1200,+ },+ header: {+ width: '100%',+ flexWrap: 'wrap',+ justifyContent: 'space-between',+ alignItems: 'baseline',+ rowGap: spacingVars['--spacing-2'],+ },+ featureCell: {+ gridColumn: {+ default: '1 / -1',+ '@media (min-width: 900px)': 'span 2',+ },+ },+ rightCell: {+ gridColumn: {+ default: '1 / -1',+ '@media (min-width: 900px)': 'span 1',+ },+ },+});++// Section shell shared by both layouts:+// with the layout-specific grid passed in as children.+function BlogSection({children}: {children: ReactNode}) {+ return (+ <VStack as="section" align="center" gap={8} width="100%">+ <VStack gap={8} xstyle={styles.section}>+ <HStack xstyle={styles.header}>+ <Heading level={2} type="display-2" color="primary">+ Stay in the know+ </Heading>+ <Button+ variant="ghost"+ label="View all posts"+ href="/blog"+ endContent={<Icon icon={ArrowRight} size="sm" />}+ />+ </HStack>+ {children}+ </VStack>+ </VStack>+ );+}++export function BlogShowcase() {+ // Exactly two posts → balanced 50/50 grid of two equal feature cards. This+ // reads as intentional, whereas the featured split would leave a lonely blank+ // placeholder in the right column.+ if (blogPosts.length === 2) {+ const [first, second] = blogPosts;+ return (+ <BlogSection>+ <Grid+ columns={{minWidth: 480, repeat: 'fit'}}+ gap={8}+ width="100%"+ align="start">+ <BlogCard post={first} feature />+ <BlogCard post={second} feature />+ </Grid>+ </BlogSection>+ );+ }++ // Three+ posts → featured split. Slot 0 → feature (left); slots 1–2 → compact+ // (right), filled by the 3 most recent posts.+ const [featurePost, ...compactPosts] = blogPosts.slice(0, SLOT_COUNT);++ return (+ <BlogSection>+ <Grid columns={3} gap={8} width="100%" align="start">+ <GridSpan xstyle={styles.featureCell}>+ <BlogCard post={featurePost} feature />+ </GridSpan>+ <GridSpan xstyle={styles.rightCell}>+ <VStack gap={6}>+ {compactPosts.map(post => (+ <BlogCard key={post.slug} post={post} />+ ))}+ </VStack>+ </GridSpan>+ </Grid>+ </BlogSection>+ );+}diff --git a/apps/docsite/src/app/(site)/_landing/StoriesShowcase.tsx b/apps/docsite/src/app/(site)/_landing/StoriesShowcase.tsxdeleted file mode 100644index 35766d442d..0000000000--- a/apps/docsite/src/app/(site)/_landing/StoriesShowcase.tsx+++ /dev/null@@ -1,346 +0,0 @@-// Copyright (c) Meta Platforms, Inc. and affiliates.--/**- * @file StoriesShowcase.tsx- *- * Home-page "Blog" section. Auto-surfaces the most recent posts from the- * build-time blog registry (already sorted latest-first). The layout adapts to- * how many posts are published so the section always looks intentional:- *- * - Exactly 2 posts → a balanced 50/50 grid of two equal feature cards.- * - 1 post (launch state) or 3+ posts → a featured split: the latest post is a- * large feature card on the left (type tag above the title) and the next two- * posts render as smaller cards stacked on the right. With a single post the- * trailing right-column slots render as blank placeholders so the split stays- * balanced while the blog is still small.- *- * In the featured split both columns are tuned to roughly equal height: the grid- * stretches the right column to the feature's height and distributes its two- * cards to fill it, and the column ratio is picked so the feature is the taller- * side.- *- * @input blogPosts (from the generated registry)- * @output A marketing section linking to the latest blog posts- * @position Rendered inside the home page showcase overlay (app/(site)/page.tsx)- */--'use client';--import type {ReactNode} from 'react';-import * as stylex from '@stylexjs/stylex';-import {Heading, Text} from '@astryxdesign/core/Text';-import {VStack, HStack} from '@astryxdesign/core/Layout';-import {Link} from '@astryxdesign/core/Link';-import {Divider} from '@astryxdesign/core/Divider';-import {AspectRatio} from '@astryxdesign/core/AspectRatio';-import {spacingVars} from '@astryxdesign/core/theme/tokens.stylex';-import {blogPosts} from '../../../generated/blogRegistry';-import {POST_TYPE_LABELS} from '../../../lib/blog/schema';-import type {BlogPost} from '../../../lib/blog/schema';-import {formatDate} from '../../../components/blog/AuthorByline';--// The featured-split layout (1 post or 3+ posts) always renders this many-// slots: 1 feature (left) + 2 compact (right). The most recent posts (blogPosts-// is emitted latest-first by the generator) fill the leading slots; any-// remaining slots render as blank placeholders.-const SLOT_COUNT = 3;--const styles = stylex.create({- // Cap at the shared 1200px marketing measure so this section lines up- // vertically with Features / About / Discover inside the showcase overlay.- section: {- width: '100%',- maxWidth: 1200,- },- // Section header: title on the left, "View all" link on the right. Wraps and- // recenters on narrow screens so the link never collides with the title.- header: {- width: '100%',- flexWrap: 'wrap',- justifyContent: 'space-between',- alignItems: 'baseline',- rowGap: spacingVars['--spacing-2'],- },- // Featured split: a wide feature column on the left + a narrower stack of two- // compact cards on the right. The 2.4 : 1 ratio is tuned so the feature and- // the two stacked compact cards land at roughly the same height naturally.- // alignItems:start keeps each column at its content height (no stretching).- // Collapses to a single column below 1024px.- splitGrid: {- width: '100%',- display: 'grid',- gap: spacingVars['--spacing-8'],- gridTemplateColumns: {- default: '1fr',- '@media (min-width: 1024px)': '2.4fr 1fr',- },- alignItems: 'start',- },- // Balanced two-up grid used when exactly two posts are published: two equal- // feature cards side by side (50/50). Collapses to a single column below- // 1024px, matching the featured split's breakpoint.- pairGrid: {- width: '100%',- display: 'grid',- gap: spacingVars['--spacing-8'],- gridTemplateColumns: {- default: '1fr',- '@media (min-width: 1024px)': '1fr 1fr',- },- alignItems: 'start',- },- // Right column holds the two compact cards stacked vertically at their natural- // height with a fixed gap between them (set on the VStack in markup).- rightColumn: {- width: '100%',- },- // Shared card link reset.- card: {- display: 'block',- width: '100%',- height: '100%',- color: 'inherit',- textDecoration: {- default: 'none',- ':hover': 'none',- },- },- // Cover image / placeholder. Rounded, theme-driven neutral placeholder when a- // post has no custom cover image.- cover: {- borderRadius: 'var(--radius-container)',- backgroundColor: 'var(--color-background-muted)',- border: '1px solid var(--color-border)',- overflow: 'hidden',- },- coverImg: {- width: '100%',- height: '100%',- objectFit: 'cover',- display: 'block',- },- // Clamp titles so cards keep an even baseline.- title: {- display: '-webkit-box',- WebkitLineClamp: 3,- WebkitBoxOrient: 'vertical',- overflow: 'hidden',- },- titleCompact: {- display: '-webkit-box',- WebkitLineClamp: 2,- WebkitBoxOrient: 'vertical',- overflow: 'hidden',- },- // Uppercase type eyebrow shown above the feature title (e.g. "UPDATE").- typeLabel: {- textTransform: 'uppercase',- letterSpacing: '0.04em',- },- // Short vertical divider between date and reading time in the meta row.- metaDivider: {- height: '0.75em',- },- // Blank placeholder bars (stand-in title/meta) so an empty slot keeps the- // same footprint as a real card while the blog grows.- blankBar: {- height: 14,- borderRadius: 'var(--radius-small)',- backgroundColor: 'var(--color-background-muted)',- },- blankBarEyebrow: {- width: '25%',- height: 10,- },- blankBarTitle: {- width: '70%',- },- blankBarMeta: {- width: '40%',- height: 10,- },-});--// Subtext shared by every card: publish date · reading time.-function MetaRow({post}: {post: BlogPost}) {- return (- <HStack gap={2} align="center">- <Text type="supporting" color="secondary">- {formatDate(post.date)}- </Text>- {post.readingTimeMinutes ? (- <>- <Divider orientation="vertical" xstyle={styles.metaDivider} />- <Text type="supporting" color="secondary">- {post.readingTimeMinutes} min read- </Text>- </>- ) : null}- </HStack>- );-}--function Cover({post, ratio}: {post: BlogPost; ratio: number}) {- return (- <AspectRatio ratio={ratio} xstyle={styles.cover}>- {post.coverImage ? (- <img- src={post.coverImage}- alt={post.coverAlt ?? ''}- {...stylex.props(styles.coverImg)}- />- ) : (- <div aria-hidden="true" />- )}- </AspectRatio>- );-}--// Large left-hand feature card for the latest post: type tag above the title,-// then a date · reading-time subtext.-function FeatureCard({post}: {post: BlogPost}) {- return (- <Link- href={`/blog/${post.slug}`}- label={post.title}- color="inherit"- display="block"- xstyle={styles.card}>- <VStack gap={4}>- <Cover post={post} ratio={16 / 9} />- <VStack gap={2}>- <VStack gap={1}>- <Text- type="supporting"- color="secondary"- weight="medium"- xstyle={styles.typeLabel}>- {POST_TYPE_LABELS[post.type]}- </Text>- <Heading level={2} color="primary" xstyle={styles.title}>- {post.title}- </Heading>- </VStack>- <MetaRow post={post} />- </VStack>- </VStack>- </Link>- );-}--// Smaller stacked card for the right column: type tag above the title, then a-// date · reading-time subtext (mirrors the feature card so the two compact cards-// stand taller and fill the column height alongside the feature).-function CompactCard({post}: {post: BlogPost}) {- return (- <Link- href={`/blog/${post.slug}`}- label={post.title}- color="inherit"- display="block"- xstyle={styles.card}>- <VStack gap={3}>- <Cover post={post} ratio={16 / 9} />- <VStack gap={2}>- <VStack gap={1}>- <Text- type="supporting"- color="secondary"- weight="medium"- xstyle={styles.typeLabel}>- {POST_TYPE_LABELS[post.type]}- </Text>- <Heading level={4} color="primary" xstyle={styles.titleCompact}>- {post.title}- </Heading>- </VStack>- <MetaRow post={post} />- </VStack>- </VStack>- </Link>- );-}--// Empty slot rendered when there aren't enough posts to fill the grid yet.-// Decorative only — kept out of the accessibility tree and non-interactive.-function BlankCard({feature = false}: {feature?: boolean}) {- return (- <VStack gap={feature ? 4 : 3} aria-hidden="true">- <AspectRatio ratio={16 / 9} xstyle={styles.cover}>- <div />- </AspectRatio>- <VStack gap={2}>- <div {...stylex.props(styles.blankBar, styles.blankBarEyebrow)} />- <div {...stylex.props(styles.blankBar, styles.blankBarTitle)} />- <div {...stylex.props(styles.blankBar, styles.blankBarMeta)} />- </VStack>- </VStack>- );-}--// Section shell shared by both layouts: the "Blog" heading + "View all" link,-// with the layout-specific grid passed in as children.-function StoriesSection({children}: {children: ReactNode}) {- return (- <VStack as="section" align="center" gap={8} width="100%">- <VStack gap={8} xstyle={styles.section}>- <HStack xstyle={styles.header}>- <Heading level={2} type="display-2" color="primary">- Blog- </Heading>- <Link type="body" color="primary" href="/blog" hasUnderline={false}>- View all →- </Link>- </HStack>- {children}- </VStack>- </VStack>- );-}--export function StoriesShowcase() {- // Exactly two posts → balanced 50/50 grid of two equal feature cards. This- // reads as intentional, whereas the featured split would leave a lonely blank- // placeholder in the right column.- if (blogPosts.length === 2) {- const [first, second] = blogPosts;- return (- <StoriesSection>- <div {...stylex.props(styles.pairGrid)}>- <FeatureCard post={first} />- <FeatureCard post={second} />- </div>- </StoriesSection>- );- }-- // One post (launch state) or three+ posts → featured split. Slot 0 → feature- // (left); slots 1–2 → compact (right). Missing posts render as blank- // placeholders so the split stays balanced while the blog is still small.- const latest = blogPosts.slice(0, SLOT_COUNT);- const [featurePost, ...compactPosts] = Array.from(- {length: SLOT_COUNT},- (_, i) => latest[i] ?? null,- );-- return (- <StoriesSection>- <div {...stylex.props(styles.splitGrid)}>- {featurePost ? (- <FeatureCard post={featurePost} />- ) : (- <BlankCard feature />- )}- <VStack gap={6} xstyle={styles.rightColumn}>- {compactPosts.map((post, i) =>- post ? (- <CompactCard key={post.slug} post={post} />- ) : (- <BlankCard key={`blank-${i}`} />- ),- )}- </VStack>- </div>- </StoriesSection>- );-}diff --git a/apps/docsite/src/app/(site)/page.tsx b/apps/docsite/src/app/(site)/page.tsxindex 413a779adb..764130a3a2 100644--- a/apps/docsite/src/app/(site)/page.tsx+++ b/apps/docsite/src/app/(site)/page.tsx@@ -25,7 +25,7 @@ import {} from './_landing/hero/HeroThemeReel';import {FeaturesShowcase} from './_landing/FeaturesShowcase';import {AboutShowcase} from './_landing/AboutShowcase';-import {StoriesShowcase} from './_landing/StoriesShowcase';+import {BlogShowcase} from './_landing/BlogShowcase';import {DiscoverShowcase} from './_landing/DiscoverShowcase';const HERO_BAND_HEIGHT = 760;@@ -342,7 +342,7 @@ export default function HomePage() {<VStack ref={showcaseRef} xstyle={styles.showcaseOverlay}><FeaturesShowcase /><AboutShowcase />- <StoriesShowcase />+ <BlogShowcase /><DiscoverShowcase /></VStack></div>diff --git a/apps/docsite/src/components/SiteFooter.tsx b/apps/docsite/src/components/SiteFooter.tsxindex f6f5d41357..7b2df86d83 100644--- a/apps/docsite/src/components/SiteFooter.tsx+++ b/apps/docsite/src/components/SiteFooter.tsx@@ -157,11 +157,9 @@ export function SiteFooter() {const copyright = `\u00A9${year} Meta Platforms, Inc.`;const astryxLogo = (- <AstryxLogo- role="img"- aria-label="Astryx"- {...stylex.props(styles.astryxLogo)}- />+ <Link href="/" label="Astryx">+ <AstryxLogo aria-hidden="true" {...stylex.props(styles.astryxLogo)} />+ </Link>);const metaOpenSourceLink = (diff --git a/apps/docsite/src/components/blog/AuthorByline.tsx b/apps/docsite/src/components/blog/AuthorByline.tsxindex f9184138bd..56c7e9cb2b 100644--- a/apps/docsite/src/components/blog/AuthorByline.tsx+++ b/apps/docsite/src/components/blog/AuthorByline.tsx@@ -8,6 +8,7 @@import * as stylex from '@stylexjs/stylex';import {Avatar} from '@astryxdesign/core/Avatar';+import {AvatarGroup} from '@astryxdesign/core/AvatarGroup';import {Text} from '@astryxdesign/core/Text';import {HStack} from '@astryxdesign/core/Layout';import {Divider} from '@astryxdesign/core/Divider';@@ -21,7 +22,7 @@ export function formatDate(iso: string): string {}return d.toLocaleDateString('en-US', {year: 'numeric',- month: 'long',+ month: 'short',day: 'numeric',timeZone: 'UTC',});@@ -52,49 +53,46 @@ export function AuthorByline({}: AuthorBylineProps) {const resolved = authors.map(resolveAuthor);const avatarSize = variant === 'full' ? 'small' : 'tiny';+ const textType = variant === 'full' ? 'body' : 'supporting';const names = resolved.map(a => a.name).join(', ');return (- <HStack gap={2} align="center" className={className}>+ <HStack+ gap={variant === 'full' ? 4 : 2}+ align="center"+ className={className}>{resolved.length > 0 ? (<>- <HStack gap={0} align="center">+ <AvatarGroup size={avatarSize}>{resolved.map(author => (- <Avatar- key={author.key}- src={author.avatar}- name={author.name}- size={avatarSize}- />+ <Avatar key={author.key} src={author.avatar} name={author.name} />))}- </HStack>- <Text type="supporting" color="secondary">+ </AvatarGroup>+ <Text type={textType} color="secondary">{names}</Text><Divider orientation="vertical" xstyle={styles.divider} /></>) : null}- <HStack gap={2} align="center">- <Text type="supporting" color="secondary">- {formatDate(date)}- </Text>- {variant === 'full' && updatedAt ? (- <>- <Divider orientation="vertical" xstyle={styles.divider} />- <Text type="supporting" color="secondary">- Updated {formatDate(updatedAt)}- </Text>- </>- ) : null}- {readingTimeMinutes ? (- <>- <Divider orientation="vertical" xstyle={styles.divider} />- <Text type="supporting" color="secondary">- {readingTimeMinutes} min read- </Text>- </>- ) : null}- </HStack>+ <Text type={textType} color="secondary">+ {formatDate(date)}+ </Text>+ {variant === 'full' && updatedAt ? (+ <>+ <Divider orientation="vertical" xstyle={styles.divider} />+ <Text type={textType} color="secondary">+ Updated {formatDate(updatedAt)}+ </Text>+ </>+ ) : null}+ {readingTimeMinutes ? (+ <>+ <Divider orientation="vertical" xstyle={styles.divider} />+ <Text type={textType} color="secondary">+ {readingTimeMinutes} min read+ </Text>+ </>+ ) : null}</HStack>);}diff --git a/apps/docsite/src/components/blog/BlogArticle.tsx b/apps/docsite/src/components/blog/BlogArticle.tsxindex 1d53105174..1898f0013c 100644--- a/apps/docsite/src/components/blog/BlogArticle.tsx+++ b/apps/docsite/src/components/blog/BlogArticle.tsx@@ -26,23 +26,21 @@ import {layout} from '../../layout.stylex';const styles = stylex.create({section: {marginInline: 'auto',- // Match the docs article body treatment (16px / 1.75) from DocPageLayout.+ // Match the docs article body treatment (17px / 1.6470588235) from DocPageLayout.// The post body renders via Markdown, whose root reads these tokens;// re-assigning them here scopes the larger/airier body to the blog// article only. The title (display-1) and subtitle/description (large)// use different tokens, so they're unaffected.- [typeScaleVars['--text-body-size']]: '1rem', // 16px- [typeScaleVars['--text-body-leading']]: '1.75', // 28px line box+ [typeScaleVars['--text-body-size']]: '1.0625rem', // 17px+ [typeScaleVars['--text-body-leading']]: '1.6470588235', // 28px+ [typeScaleVars['--text-large-size']]: '1.25rem', // 20px+ [typeScaleVars['--text-large-leading']]: '2rem', // 40px},cover: {borderRadius: 'var(--radius-container)',backgroundColor: 'var(--color-background-muted)',border: '1px solid var(--color-border)',},- coverPlaceholder: {- width: '100%',- aspectRatio: '16 / 9',- },coverImg: {width: '100%',height: '100%',@@ -96,12 +94,7 @@ export function BlogArticle({post}: BlogArticleProps) {{...stylex.props(styles.coverImg)}/></AspectRatio>- ) : (- <div- {...stylex.props(styles.cover, styles.coverPlaceholder)}- aria-hidden="true"- />- )}+ ) : null}<Markdown headingLevelStart={2} contentWidth="100%">{post.body}diff --git a/apps/docsite/src/components/blog/BlogCard.tsx b/apps/docsite/src/components/blog/BlogCard.tsxindex 29201f01b5..ca5efd0b1b 100644--- a/apps/docsite/src/components/blog/BlogCard.tsx+++ b/apps/docsite/src/components/blog/BlogCard.tsx@@ -2,18 +2,16 @@/*** @file BlogCard.tsx- * Blog index card: cover, title, excerpt, byline, and a type + tags chip row.+ * Blog index card: cover, title, excerpt, and byline.* The `feature` variant (latest post) renders larger.*/import * as stylex from '@stylexjs/stylex';import {Text, Heading} from '@astryxdesign/core/Text';-import {VStack, HStack} from '@astryxdesign/core/Layout';-import {Badge} from '@astryxdesign/core/Badge';+import {VStack} from '@astryxdesign/core/Layout';import {Link} from '@astryxdesign/core/Link';import {AspectRatio} from '@astryxdesign/core/AspectRatio';import type {BlogPost} from '../../lib/blog/schema';-import {POST_TYPE_LABELS} from '../../lib/blog/schema';import {AuthorByline} from './AuthorByline';import css from './BlogCard.module.css';@@ -50,9 +48,6 @@ const styles = stylex.create({WebkitBoxOrient: 'vertical',overflow: 'hidden',},- postTags: {- flexWrap: 'wrap',- },});export interface BlogCardProps {@@ -85,7 +80,8 @@ export function BlogCard({post, feature = false}: BlogCardProps) {<VStack gap={1}><Heading level={feature ? 1 : 3}>{post.title}</Heading><Text- type="body"+ type={feature ? 'large' : 'body'}+ weight="normal"color="secondary"xstyle={styles.excerpt}className={css.description}>@@ -99,12 +95,6 @@ export function BlogCard({post, feature = false}: BlogCardProps) {variant="compact"className={css.byline}/>- <HStack gap={1} xstyle={styles.postTags}>- <Badge label={POST_TYPE_LABELS[post.type]} variant="cyan" />- {post.tags.map(tag => (- <Badge key={tag} label={tag} variant="neutral" />- ))}- </HStack></VStack></VStack></Link>diff --git a/apps/docsite/src/components/docs/DocPageLayout.tsx b/apps/docsite/src/components/docs/DocPageLayout.tsxindex b538fd35b8..755bc47916 100644--- a/apps/docsite/src/components/docs/DocPageLayout.tsx+++ b/apps/docsite/src/components/docs/DocPageLayout.tsx@@ -42,9 +42,9 @@ const styles = stylex.create({// Leading follows the type scale's convention (unitless ratio = a// 4px-grid-snapped line box ÷ font size, per expandTypeScale's// computeLeading). The grid-snapped value closest to the requested ~1.7- // at 16px is 28px ÷ 16px = 1.75.- [typeScaleVars['--text-body-size']]: '1rem', // 16px- [typeScaleVars['--text-body-leading']]: '1.75', // 28px line box+ // at 17px is 28px ÷ 17px = 1.6470588235.+ [typeScaleVars['--text-body-size']]: '1.0625rem', // 17px+ [typeScaleVars['--text-body-leading']]: '1.6470588235', // 28px line box},// Article that shares the row with a sticky outline aside. Mirrors the// larger/airier article body typography from sectionCentered so pages with@@ -53,8 +53,8 @@ const styles = stylex.create({marginInline: 0,flexShrink: 1,minWidth: 0,- [typeScaleVars['--text-body-size']]: '1rem', // 16px- [typeScaleVars['--text-body-leading']]: '1.75', // 28px line box+ [typeScaleVars['--text-body-size']]: '1.0625rem', // 17px+ [typeScaleVars['--text-body-leading']]: '1.6470588235', // 28px line box},row: {display: 'flex',@@ -187,18 +187,16 @@ export function DocPageLayout({}const rowProps = stylex.props(styles.row);+ const rowStyle: React.CSSProperties & Record<'--docs-anchor-offset', string> =+ {+ ...rowProps.style,+ // Consumed by anchored section headings (AnchorHeading and Markdown+ // headings) to clear the sticky mobile selector when scrolled to.+ '--docs-anchor-offset': `${selectorHeight}px`,+ };return (- <div- className={rowProps.className}- style={- {- ...rowProps.style,- // Consumed by anchored section headings (AnchorHeading and Markdown- // headings) to clear the sticky mobile selector when scrolled to.- '--docs-anchor-offset': `${selectorHeight}px`,- } as React.CSSProperties- }>+ <div className={rowProps.className} style={rowStyle}>{article}{showAside ? (<aside {...stylex.props(styles.aside)}>