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

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
benface committed May 6, 2018
0 parents commit 33daad3
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules/
25 changes: 25 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const _ = require('lodash');

module.exports = ({
variants = {},
indents = {},
textShadows = {},
} = {}) =>
({ e, addUtilities }) => {
addUtilities(
{
'.ellipsis': { textOverflow: 'ellipsis' },
'.hyphens': { hyphens: 'auto' },
...Object.assign(
{},
..._.map(indents, (value, name) => ({
[`.indent-${e(name)}`]: { textIndent: value },
})),
..._.map(textShadows, (value, name) => ({
[`.text-shadow${e(name === 'default' ? '' : `-${name}`)}`]: { textShadow: value },
})),
),
},
variants,
);
};
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "tailwindcss-typography",
"version": "1.0.0",
"description": "Tailwind CSS plugin to generate typography utilities",
"author": "Benoît Rouleau <benoit.rouleau@icloud.com>",
"license": "ISC",
"repository": "https://github.com/benface/tailwindcss-typography.git",
"bugs": "https://github.com/benface/tailwindcss-typography/issues",
"homepage": "https://github.com/benface/tailwindcss-typography",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"lodash": "^4.17.10"
}
}

0 comments on commit 33daad3

Please sign in to comment.