Files
js/theme/typography.ts
T
480ef20905 New landing (#113)
* New header

* GeneralCta wip

* Add right image

* Mobile fixes

* Prettify

* Update static gradient

* Add union

* Add dashboard section

* Add supported chains section

* Add free section

* Finish merge

* Fix stuff

* Add case studies section

* Gradients shananigans

* Fix borders

* Use ChakraNextImage

* Add Partners

* Fix lgtm

* Fix lgtm 2.0

* Change position

* Add footer and newsletter

* Delete old components

* Add contracts section

* Add get started section (kinda)

* Add union

* no union

* Fix spacing

* Fix copy

* Spacing and stuff

* Add sdk section

* Language selector for SDK section

* Add LinkButton

* Unused imports

* Update Link imports

* Update embed width

* Set active status

* Set active status

* Fix button width

* Add links to case studies

* Add links to partners

* Fix spacing

* Fix react warning

* Fix title/subtitle center issues

* Fix broken link

* Delete start building from menu

* Fix buttons on mobile

* Update images

* Update text

* Add external icon to tw-link

* Make icon a one-off

* Add hover

* small improvements, also make landing page way leaner in terms of size

* iframe a bit better again

* Add tracking everywhere

* Add tracking to CodeSelector

* clean up a bunch of small things everywhere

* doing more things more better

* Clean up, fix textAlign

* Fix lgtm

* Fix leftAlign

* Fix graphic centerAligned

* Fix cta padding

* Change CTA hover behavior

* Button adjustments

* LeftAlign?

* Change header bg with blur

* Fix icon size

* cleanup homepage section (#121)

* cleanup homepage section

* cleanup case-sudy stuff

* thirdweb deploy new design

* Rename union to bottomPattern

* Fix gap on mobile

* Update copy

* Footer isExternal

* Make TrackedLink generic and reuse it

* Fix mobile layout

* Update dashboard section

* Add opacity bg

* Update ContractCard

* Spacing and mobile hero image

* Fix aria-label_

* Fix pre-built contracts

* Latest changes

* Use tracked components

* Small renaming

* add examples scection, update lots of copy

* cheating lol

* nit pick

* Add github urls to example items

* homepage copy & random other fixes

* new multi chain graphic

* Fix typo

* Developer portal -> Docs

* Small fixes

* More small fixes

* Fix subscribe

* iPad fixes

* No italics anymore

* Multichain mobile svg

* Delete unused component

* changes

* Replace png with svg

Co-authored-by: Jonas Daniels <[email protected]>
Co-authored-by: Jarrod Watts <[email protected]>
2022-05-17 16:36:59 -07:00

139 lines
2.6 KiB
TypeScript

import { pxToRem } from "../utils/pxFunctions";
export const baseFontSizes = {
display: {
sm: pxToRem(44),
md: pxToRem(48),
lg: pxToRem(52),
xl: pxToRem(56),
"2xl": pxToRem(64),
},
title: {
sm: pxToRem(16),
md: pxToRem(18),
lg: pxToRem(20),
xl: pxToRem(24),
"2xl": pxToRem(28),
},
subtitle: {
sm: pxToRem(14),
md: pxToRem(16),
lg: pxToRem(18),
xl: pxToRem(20),
"2xl": pxToRem(24),
},
label: {
sm: pxToRem(12),
md: pxToRem(14),
lg: pxToRem(16),
xl: pxToRem(18),
"2xl": pxToRem(20),
},
body: {
sm: pxToRem(12),
md: pxToRem(14),
lg: pxToRem(16),
xl: pxToRem(18),
"2xl": pxToRem(20),
},
} as const;
export type FontSizeRecord = typeof baseFontSizes;
export const mdFontSizes: FontSizeRecord = {
display: {
sm: pxToRem(56),
md: pxToRem(64),
lg: pxToRem(72),
xl: pxToRem(80),
"2xl": pxToRem(88),
},
title: {
sm: pxToRem(20),
md: pxToRem(24),
lg: pxToRem(32),
xl: pxToRem(40),
"2xl": pxToRem(48),
},
subtitle: {
sm: pxToRem(16),
md: pxToRem(20),
lg: pxToRem(24),
xl: pxToRem(28),
"2xl": pxToRem(32),
},
label: {
sm: pxToRem(12),
md: pxToRem(14),
lg: pxToRem(16),
xl: pxToRem(24),
"2xl": pxToRem(28),
},
body: {
sm: pxToRem(12),
md: pxToRem(14),
lg: pxToRem(16),
xl: pxToRem(20),
"2xl": pxToRem(24),
},
};
export const fontWeights = {
display: 800,
title: 700,
subtitle: 500,
label: 600,
body: 400,
} as const;
export const lineHeights = {
display: 1.2,
title: 1.125,
subtitle: 1.6,
label: 1,
body: 1.6,
} as const;
export const letterSpacings = {
display: -1.5,
title: 0.15,
subtitle: 0.1,
label: "initial",
body: "initial",
} as const;
export type TypographyBase =
| "display"
| "title"
| "subtitle"
| "label"
| "body";
export type TypographySize = "sm" | "md" | "lg" | "xl" | "2xl";
export type TypographyFontSize = `${TypographyBase}.${TypographySize}`;
export type HeadingBase = Exclude<TypographyBase, "body">;
export type HeadingSizes = `${HeadingBase}.${TypographySize}`;
export type TextBase = Exclude<
TypographyBase,
"display" | "title" | "subtitle"
>;
export type TextSizes = `${TextBase}.${TypographySize}`;
export type LabelBase = Exclude<
TypographyBase,
"display" | "title" | "subtitle" | "body"
>;
export type LabelSizes = `${LabelBase}.${TypographySize}`;
export type BodyBase = Exclude<
TypographyBase,
"display" | "title" | "subtitle" | "label"
>;
export type BodySizes = `${BodyBase}.${TypographySize}`;