Socket
Socket
Sign inDemoInstall

@elvia/elvis-typography

Package Overview
Dependencies
0
Maintainers
7
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @elvia/elvis-typography

Elvia typography


Version published
Weekly downloads
2K
increased by61.69%
Maintainers
7
Install size
87.2 kB
Created
Weekly downloads
 

Readme

Source

Elvia typography

This package is meant for internal use only. All typographies are available through Elvis. This package should not be imported by an end-user directly.

Available typography reflect the typography classes availabe at design.elvia.io.

Usage SCSS

Insert at top of your scss file :

@use '@elvia/elvis-typography/src/elviaTypography.scss';

Remember to also import the correct typographies from the Google font api. If you are using the @elvia/elvis package you don't have to do this, because they are already imported there.

@import url('https://fonts.googleapis.com/css?family=Red+Hat+Display:400,400i,500,500i,700,900&display=swap');
@import url('https://fonts.googleapis.com/css?family=Red+Hat+Text:400,400i,500,500i,600,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Mono:ital,wght@0,400;0,500;1,400&display=swap');

Usage Typescript/Javascript

To use this package you can import the function getTypography(). It takes the name of the requested typography as input, and returns an object containing the typography's attributes if it exists.

import { getTypography } from '@elvia/elvis-typography';
const typography = getTypography('text-md');

It is also possible to use the function getTypographyCss(). It takes the name of the requested typography as input, and returns a string containing all the css for the typography, including a breakpoint for mobile font properties if there are any.

import { getTypographyCss } from '@elvia/elvis-typography';
const typography = getTypographyCss('text-md');

Maintaining

All typographies are built from the ElviaTypography-object in ./src/elviaTypography.js through Gulp. Remember to run yarn build if you make any changes. Elvis may also need to be rebuilt to include any changes made to the typographies.

FAQs

Last updated on 18 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc