@automattic/typography

1.0.0 • Public • Published

Typography

@automattic/typography is a Sass file for shared typographic elements across WordPress.com products. This package contains

  • the @font-face declaration for the WordPress.com brand font
  • font-size sass variables
  • font-family sass variables

Installation

yarn add @automattic/typography

Usage

Note that this package contains two sass files and there are use cases for @importing either file.

Import the variables.scss file

@import '@automattic/typography/styles/variables';

Apply font variables as needed:

.my-text {
    font-size: $font-body-small;
}

Import the fonts.sccc file

@import '@automattic/typography/styles/fonts';

Extend the .wp-brand-font selector in your SCSS:

.design__typography-branded {
	@extend .wp-brand-font;
	font-size: $font-title-medium;
}

Or apply the class name wp-brand-font to any elements that should display with Recoleta:

<h1 className="wp-brand-font">Brand font heading</h1>

Note that the fonts.scss file imports the variables.scss file.


Please refer to the Calypso Typography Docs for more information.

Readme

Keywords

Package Sidebar

Install

npm i @automattic/typography

Weekly Downloads

3,658

Version

1.0.0

License

GPL-2.0-or-later

Unpacked Size

3.98 kB

Total Files

5

Last publish

Collaborators

  • macbre
  • yuliyan
  • mjangda
  • matticbot
  • a8c
  • blowery
  • ehg_
  • sgomes
  • tyxla
  • saroshaga
  • nejclovrencic
  • sirbrillig
  • chriszarate
  • robersongomes
  • johngodley
  • jeherve
  • daledupreez-a8c
  • t2dw4t
  • luismulinari
  • andrea-sdl
  • elazzabi
  • fmfernandes
  • sirreal
  • wwa
  • chihsuan
  • manzoorwanijk
  • msurdi-a8c
  • newspack-npm
  • dsmartg
  • kthai15
  • bgrgicak
  • robertsreberski_a8c
  • artpi
  • gmjuhasz
  • kat3samsin
  • brunobasto
  • dhenridev
  • micbosia8c
  • mrmurphy
  • wpvip-bot
  • etobiesen
  • alshakero
  • arthur791004
  • dilirity
  • mehmoodak
  • natalia.vidal
  • chriskmnds
  • oandregal
  • galatanovidiu
  • kangzj
  • _mirka_
  • aduth
  • ebuccelli