Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dialog-typography

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dialog-typography

SASS/SCSS module settings

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
556
decreased by-0.36%
Maintainers
2
Weekly downloads
 
Created
Source

dialog(typography)

dialog(typography) :book:

GitHub version npm version travis build

Provides a central place to manage your typography across multiple breakpoints. Demo

Installation 💾

npm install dialog-typography
yarn add dialog-typography

Usage ☝️

  1. Set up your favorite breakpoint mixin. typo will call a mixin called bp($breakpointname). So it important to set up your own breakpoint mixin within a mixin called bp.

    For example:

    $dialog-breakpoints: (
       desktop: 'min-width: 701px',
       mobile: 'max-width: 700px'
    );
    
    @mixin bp($name) {
      @media (#{map-get($dialog-breakpoints, $name)}) {
        @content
      }
    }
    

    Or you could also use any popular breakpoint mixin

    @mixin bp($name)
      @inlcude media-query($name) {
        @content
      }
    }
    
  2. Import dialog-typography.scss after the creation of the bp mixin.

    @import 'dialog-typography/dist/dialog-typography';
    

    PS: make sure to add node_modules to your import paths

  3. Set up your typography.

    $dialog-typo: (
      desktop: (
        default: (
          font-size         : 1rem,
          font-family       : sans-serif,
          font-weight       : normal,
          font-style        : normal,
          line-height       : 1.5
        ),
        title: (
          font-weight       : bold,
          font-size         : 2.25rem,
          line-height       : 1.3
        ),
        subtitle: (
          font-weight       : bold,
          font-size         : 1.75rem,
          line-height       : 1.2
        ),
        paragraph: (
          font-size         : 1rem
        )
      ),
      mobile: (
        default: (
          font-size         : 1.15rem,
          line-height       : 1.5
        ),
        title: (
          font-size         : 3rem
        )
      )
    )
    
  4. Use in your components

.yourComponent {
   &__title {
      @include typo(title)
   }
}

License 👮🏼

Created with ♥ by meodai. Licensed under the MIT License.

Keywords

FAQs

Package last updated on 16 May 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc