1.0.3 • Published 6 years ago

@citizensadvice/text-align v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Text-align npm (scoped)

Defines the horizontal alignment of text.

Classes

Class namesValue
.text-leftAlign content left
.text-rightAlign content right
.text-centerAlign content center
.text-justifyJutify content

Responsive text-align classes

To apply specific classes at set screen widths, use the following classes:

AbbrValue
ns$breakpoint-ns (min-width: 48rem)
m$breakpoint-m (min-width: 48rem, max-width: 64rem)
l$breakpoint-l (min-width: 64rem)

Examples

<div class="text-left text-center-l">Lorem ipsum</div>

// This will align content to the left on devices with a width up until 64rem where upon it will be
centered.

Installation

$ npm install @citizensadvice/text-align

now import into your stylesheet...

@import '@citizensadvice/text-align/index.scss';

You can make use of the unpkg service, try adding the link below to the head of your HTML file.

<link src="https://unpkg.com/@citizensadvice/text-align@latest/build/text-align.css" />