Skip to content

Commit 422a7dc

Browse files
authored
better featured posts tablet layout text size (#6693)
1 parent 8fd9ad0 commit 422a7dc

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

packages/web/docs/src/app/blog/components/blog-card.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function BlogCard({ post, className, variant, tag }: BlogCardProps) {
4040
return (
4141
<Anchor
4242
className={cn(
43-
'group/card hive-focus hover:ring-beige-400 block rounded-2xl dark:ring-neutral-600 hover:[&:not(:focus)]:ring dark:hover:[&:not(:focus)]:ring-neutral-600',
43+
'group/card @container/card hive-focus hover:ring-beige-400 block rounded-2xl dark:ring-neutral-600 hover:[&:not(:focus)]:ring dark:hover:[&:not(:focus)]:ring-neutral-600',
4444
className,
4545
)}
4646
href={post.route}
@@ -62,7 +62,12 @@ export function BlogCard({ post, className, variant, tag }: BlogCardProps) {
6262
{date.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' })}
6363
</time>
6464
</header>
65-
<h3 className={cn('lg:min-h-[120px]', variant === 'featured' ? 'text-2xl/8' : 'text-xl/7')}>
65+
<h3
66+
className={cn(
67+
'text-xl/7 lg:min-h-[120px]',
68+
variant === 'featured' && '@[288px]/card:text-2xl/8', // todo: in Tailwind 4 `@[288px]:` is `@2xs:`
69+
)}
70+
>
6671
{title}
6772
</h3>
6873
<footer className="mt-auto flex items-center gap-3">

packages/web/docs/src/app/blog/components/posts-by-tag/featured-posts.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function FeaturedPosts({
2020
return (
2121
<ul
2222
className={cn(
23-
'grid grid-cols-1 gap-4 sm:grid sm:grid-cols-2 sm:gap-6 lg:grid-cols-3',
23+
'mt-6 flex items-stretch gap-4 *:flex-1 max-md:flex-col sm:gap-6 lg:mt-16',
2424
className,
2525
)}
2626
>

packages/web/docs/tailwind.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const config: Config = {
4242
},
4343
},
4444
plugins: [
45+
...baseConfig.plugins,
4546
tailwindcssRadix({ variantPrefix: 'rdx' }),
4647
tailwindcssAnimate,
4748
blockquotesPlugin(),

0 commit comments

Comments
 (0)