Skip to content

Commit

Permalink
chore(shiraha-ve): 💡 update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed Oct 26, 2023
1 parent fdebe0d commit c262753
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/shiraha-ve/src/typography/heading/global.css.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
/**
* Adaptive Type Scale
* 1.2x ~ 1.25x
* 20rem (320px) ~ 52.5rem (840px)
* {@link https://typescale.com}
* {@link https://royalfig.github.io/fluid-typography-calculator/}
*/

import { globalStyle } from '@vanilla-extract/css'

import * as styles from './styles'
Expand Down
17 changes: 17 additions & 0 deletions packages/shiraha-ve/src/typography/heading/styles.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
/**
* Adaptive Type Scale
* 1.2x ~ 1.25x
* 20rem (320px) ~ 52.5rem (840px)
* {@link https://typescale.com}
* {@link https://royalfig.github.io/fluid-typography-calculator/}
*/

import type { ComplexStyleRule } from '@vanilla-extract/css'

import OP from 'open-props'

/** `:where(h1, h2, h3, h4, h5, h6)` */
export const h = {
fontWeight: OP.fontWeight6,
letterSpacing: '-0.025em',
Expand All @@ -10,35 +19,43 @@ export const h = {
textWrap: 'balance',
} as const satisfies ComplexStyleRule

/** `:where(h1, h2, h3):not(:first-child)` */
export const h123NotFirstChild = {
marginTop: 48,
} as const satisfies ComplexStyleRule

/** `:where(h4, h5, h6):not(:first-child)` */
export const h456NotFirstChild = {
marginTop: 24,
} as const satisfies ComplexStyleRule

/** `:where(h1)` */
export const h1 = {
fontSize: 'clamp(2.49rem, 2.14rem + 1.73vw, 3.05rem)',
marginTop: 0,
} as const satisfies ComplexStyleRule

/** `:where(h2)` */
export const h2 = {
fontSize: 'clamp(2.07rem, 1.85rem + 1.13vw, 2.44rem)',
} as const satisfies ComplexStyleRule

/** `:where(h3)` */
export const h3 = {
fontSize: 'clamp(1.73rem, 1.59rem + 0.69vw, 1.95rem)',
} as const satisfies ComplexStyleRule

/** `:where(h4)` */
export const h4 = {
fontSize: 'clamp(1.44rem, 1.36rem + 0.38vw, 1.56rem)',
} as const satisfies ComplexStyleRule

/** `:where(h5)` */
export const h5 = {
fontSize: 'clamp(1.2rem, 1.17rem + 0.15vw, 1.25rem)',
} as const satisfies ComplexStyleRule

/** `:where(h6)` */
export const h6 = {
fontSize: 'clamp(0.8rem, 0.78rem + 0.1vw, 0.83rem)',
} as const satisfies ComplexStyleRule

0 comments on commit c262753

Please sign in to comment.