UNPKG

@chakra-ui/styled-system

Version:

Style function for css-in-js building component libraries

42 lines (41 loc) 1.06 kB
import { t, transforms } from "../utils"; export var typography = { fontFamily: t.prop("fontFamily", "fonts"), fontSize: t.prop("fontSize", "fontSizes", transforms.px), fontWeight: t.prop("fontWeight", "fontWeights"), lineHeight: t.prop("lineHeight", "lineHeights"), letterSpacing: t.prop("letterSpacing", "letterSpacings"), textAlign: true, fontStyle: true, wordBreak: true, overflowWrap: true, textOverflow: true, textTransform: true, whiteSpace: true, noOfLines: { static: { overflow: "hidden", textOverflow: "ellipsis", display: "-webkit-box", WebkitBoxOrient: "vertical", //@ts-ignore WebkitLineClamp: "var(--chakra-line-clamp)" }, property: "--chakra-line-clamp" }, isTruncated: { transform(value) { if (value === true) { return { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }; } } } }; /** * Types for typography related CSS properties */ //# sourceMappingURL=typography.js.map