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

Commit

Permalink
Add all "hyphens" values
Browse files Browse the repository at this point in the history
  • Loading branch information
benface committed Mar 22, 2019
1 parent b3ab258 commit 7bb4858
Show file tree
Hide file tree
Showing 8 changed files with 3,277 additions and 4,927 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/node_modules/
/node_modules/
4 changes: 2 additions & 2 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"src": {
"git": {
"tagName": "v%s"
}
}
}
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ 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).

## [1.1.0] - 2019-03-22

### Added
- Added the `hyphens-none` and `hyphens-manual` utilities

### Changed
- Changed the `hyphens` utility to `hyphens-auto`

## [1.0.2] - 2018-11-04

### Added
Expand All @@ -19,6 +27,7 @@ and this project mostly adheres to [Semantic Versioning](https://semver.org/spec

Initial release

[Unreleased]: https://github.com/benface/tailwindcss-typography/compare/v1.0.2...HEAD
[Unreleased]: https://github.com/benface/tailwindcss-typography/compare/v1.1.0...HEAD
[1.1.0]: https://github.com/benface/tailwindcss-typography/compare/v1.0.2...v1.1.0
[1.0.2]: https://github.com/benface/tailwindcss-typography/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/benface/tailwindcss-typography/compare/v1.0.0...v1.0.1
[1.0.1]: https://github.com/benface/tailwindcss-typography/compare/v1.0.0...v1.0.1
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Typography Tailwind CSS Plugin
# Typography Plugin for Tailwind CSS

## Installation

Expand All @@ -13,7 +13,6 @@ npm install tailwindcss-typography
{
plugins: [
require('tailwindcss-typography')({
variants: ['responsive'],
indents: {
'1': '1px',
'2': '2px',
Expand All @@ -22,6 +21,7 @@ npm install tailwindcss-typography
'default': '0 2px 5px rgba(0, 0, 0, 0.5)',
'lg': '0 2px 10px rgba(0, 0, 0, 0.5)',
},
variants: ['responsive'],
}),
],
}
Expand All @@ -34,7 +34,15 @@ This plugin generates the following utilities:
text-overflow: ellipsis;
}

.hyphens {
.hyphens-none {
hyphens: none;
}

.hyphens-manual {
hyphens: manual;
}

.hyphens-auto {
hyphens: auto;
}

Expand All @@ -49,4 +57,4 @@ This plugin generates the following utilities:
}
```

Note: The `textShadows` option accepts a `default` key which generates a simple `.text-shadow` class (instead of `.text-shadow-default`).
Note: The `textShadows` option accepts a `default` key which generates a simple `.text-shadow` class (instead of `.text-shadow-default`).
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
const _ = require('lodash');

module.exports = ({
variants = {},
indents = {},
textShadows = {},
variants = [],
} = {}) => ({ e, addUtilities }) => {
addUtilities(
{
'.ellipsis': { textOverflow: 'ellipsis' },
'.hyphens': { hyphens: 'auto' },
'.hyphens-none': { hyphens: 'none' },
'.hyphens-manual': { hyphens: 'manual' },
'.hyphens-auto': { hyphens: 'auto' },
...Object.assign(
{},
..._.map(indents, (value, name) => ({
Expand Down
Loading

0 comments on commit 7bb4858

Please sign in to comment.