Skip to content

Commit 7190630

Browse files
committed
minor adjustment of heading sizes
1 parent 8e04e71 commit 7190630

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

.changeset/small-fishes-accept.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@obosbbl/grunnmuren-tailwind': patch
3+
---
4+
5+
minor adjustment of heading sizes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import type { Meta } from '@storybook/react';
2+
3+
const meta: Meta = {
4+
title: 'Typography',
5+
};
6+
7+
export default meta;
8+
9+
export const Icons = () => {
10+
return (
11+
<div className="flex flex-col gap-4">
12+
<h1 className="h1">This is a H1 heading</h1>
13+
<h2 className="h2">This is a H2 heading</h2>
14+
<h3 className="h3">This is a H3 heading</h3>
15+
<h4 className="h4">This is a H4 heading</h4>
16+
</div>
17+
);
18+
};

packages/tailwind/tailwind-base.cjs

+5-4
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,11 @@ module.exports = (options = {}) => {
8585
}),
8686

8787
plugin(function ({ addBase, addComponents }) {
88-
const h1 = '@apply font-bold text-3xl md:text-5xl';
89-
const h2 = '@apply font-bold text-2xl md:text-4xl';
90-
const h3 = '@apply font-bold text-xl md:text-2xl';
91-
const h4 = '@apply font-bold text-lg md:text-xl';
88+
// This is tailwind syntax for setting both the font-size and the line-height
89+
const h1 = '@apply font-bold text-[28px]/[38px] md:text-[40px]/[56px]';
90+
const h2 = '@apply font-bold text-[24px]/[30px] md:text-[32px]/[42px]';
91+
const h3 = '@apply font-bold text-[20px]/[30px] md:text-[24px]/[34px]';
92+
const h4 = '@apply font-bold text-[18px]/[24px] md:text-[20px]/[28px]';
9293

9394
if (options.legacyV1Compatibility) {
9495
addBase({

0 commit comments

Comments
 (0)