
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
@nib-styles/v2-typography
Advanced tools
nib styled typography
npm install --save @nib-styles/v2-typography
Note: Requires Opens Sans
and Roboto
fonts from Google Fonts:
<link rel='stylesheet' href='//fonts.googleapis.com/css?family=Open+Sans:400,700|Roboto:300,700' />
@import "@nib-styles/v2-typography";
.product {
&__title {
@include title(2, $color: 'grey', $pad: true)
}
&__description {
@include copy($color: 'grey', $pad: true)
}
&__link {
@include link($color: 'green')
}
}
<div class="product">
<h2 class="product__title">Top</h2>
<p class="product__description">
The best hospital cover you can get.
<a class="product__link">Join now!</a>
</p>
</div>
@import "@nib-styles/v2-typography/compiled";
<div class="v2-article">
<h2 class="v2-title v2-title--2 v2-title--color-doc">Top</h2>
<p class="v2-copy">
The best hospital cover you can get.
<a class="v2-link v2-link--green">Join now!</a>
</p>
</div>
@include title($size, $color : null, $padding : false)
$size
Required. An integer from 1-4
.
$color
Optional. May be grey
, green
or white
. If no color is provided the title will inherit the color from its parent element.
$padding
Optional. If true
an amount of top and bottom margin is applied.
@include copy($size : null, $color : null, $padding : false)
$size
Optional. May be small
or large
.
$color
Optional. May be grey
, green
or white
. If no color is provided the title will inherit the color from its parent element.
$padding
Optional. If true
an amount of top and bottom margin is applied.
@include link($color : null)
$color
Optional. May be green
, grey
or white
. If no color is provided the title will inherit the color from its parent element.text-color-disabled($color)
$color
Required. The normal text color.v2-icons
currentColour
when no color is specifiedtitle()
, copy()
and link()
mixins e.g. copy($color: green)
, copy($color: 'green')
copy()
color defaults to inherittitle()
, copy()
and link()
mixins error if they receive an invalid paramcopy()
size configurable via mixin$font-copy
and $font-title
variableslink()
/.v2-link
now has font specified so it doesn't have to be inside a v2-copy
blocktitle()
padding should be dependent on the title sizecolor: inherit
on .v2-link
by defaultFAQs
nib styled typography
The npm package @nib-styles/v2-typography receives a total of 6 weekly downloads. As such, @nib-styles/v2-typography popularity was classified as not popular.
We found that @nib-styles/v2-typography demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 27 open source maintainers collaborating on the project.
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.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.