Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
Release 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
benface committed Feb 5, 2020
1 parent 05c2c6c commit 02da86a
Show file tree
Hide file tree
Showing 5 changed files with 1,973 additions and 1,926 deletions.
3 changes: 2 additions & 1 deletion .release-it.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"git": {
"tagName": "v%s"
"tagName": "v%s",
"requireCleanWorkingDir": false
}
}
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project mostly adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.0.0] - XXXX-XX-XX
## [3.0.0] - 2020-02-05

### Added
- Added kerning utilities, which can be disabled by setting the `kerning` option to `false` (thanks, [@mapgrid](https://github.com/mapgrid)!)
- Added text rendering utilities, which can be customized with the `textRendering` theme object (thanks, [@mapgrid](https://github.com/mapgrid)!)

### Changed
- Changed to use Tailwind 1.2’s new plugin definition syntax
Expand Down
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ module.exports = {
'contextual': 'contextual',
'no-contextual': 'no-contextual',
},
textRendering: { // defaults to these values
'rendering-auto': 'auto',
'optimize-legibility': 'optimizeLegibility',
'optimize-speed': 'optimizeSpeed',
'geometric-precision': 'geometricPrecision'
},
textStyles: theme => ({ // defaults to {}
heading: {
output: false, // this means there won't be a "heading" component in the CSS, but it can be extended
Expand Down Expand Up @@ -143,16 +149,19 @@ module.exports = {
textShadow: ['responsive'],
ellipsis: ['responsive'],
hyphens: ['responsive'],
kerning: ['responsive'],
textUnset: ['responsive'],
fontVariantCaps: ['responsive'],
fontVariantNumeric: ['responsive'],
fontVariantLigatures: ['responsive'],
textRendering: ['responsive'],
},
plugins: [
require('tailwindcss-typography')({
// all these options default to the values specified here
ellipsis: true, // whether to generate ellipsis utilities
hyphens: true, // whether to generate hyphenation utilities
kerning: true, // whether to generate kerning utilities
textUnset: true, // whether to generate utilities to unset text properties
componentPrefix: 'c-', // the prefix to use for text style classes
}),
Expand Down Expand Up @@ -193,6 +202,17 @@ This plugin generates the following utilities:
hyphens: auto;
}

/* generated when the "kerning" option is set to true */
.kerning {
font-kerning: normal;
}
.kerning-none {
font-kerning: none;
}
.kerning-auto {
font-kerning: auto;
}

/* generated when the "textUnset" option is set to true */
.font-family-unset {
font-family: inherit;
Expand Down Expand Up @@ -302,6 +322,20 @@ This plugin generates the following utilities:
.ligatures-no-contextual {
font-variant-ligatures: no-contextual;
}

/* configurable with the "textRendering" theme object */
.text-rendering-auto {
text-rendering: auto;
}
.text-optimize-legibility {
text-rendering: optimizeLegibility;
}
.text-optimize-speed {
text-rendering: optimizeSpeed;
}
.text-geometric-precision {
text-rendering: geometricPrecision;
}
```

The plugin also generates components for text styles. The above config example would generate something like this:
Expand Down
Loading

0 comments on commit 02da86a

Please sign in to comment.