tailwindcss-typography
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -8,2 +8,7 @@ # Changelog | ||
## [2.1.1] - 2019-05-27 | ||
### Fixed | ||
- Fixed an issue when using an array for a font family in a text style | ||
## [2.1.0] - 2019-05-26 | ||
@@ -65,3 +70,4 @@ | ||
[Unreleased]: https://github.com/benface/tailwindcss-typography/compare/v2.1.0...HEAD | ||
[Unreleased]: https://github.com/benface/tailwindcss-typography/compare/v2.1.1...HEAD | ||
[2.1.1]: https://github.com/benface/tailwindcss-typography/compare/v2.1.0...v2.1.1 | ||
[2.1.0]: https://github.com/benface/tailwindcss-typography/compare/v2.0.0...v2.1.0 | ||
@@ -68,0 +74,0 @@ [2.0.0]: https://github.com/benface/tailwindcss-typography/compare/v2.0.0-beta.2...v2.0.0 |
@@ -109,4 +109,4 @@ const _ = require('lodash'); | ||
const resolveTextStyle = function(styles) { | ||
if (!_.isObject(styles)) { | ||
return styles; | ||
if (!_.isPlainObject(styles)) { | ||
return _.isArray(styles) ? styles.join(', ') : styles; | ||
} | ||
@@ -113,0 +113,0 @@ return _.transform(styles, function(result, value, key) { |
{ | ||
"name": "tailwindcss-typography", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Tailwind CSS plugin to generate typography utilities", | ||
@@ -26,4 +26,4 @@ "author": "Benoît Rouleau <benoit.rouleau@icloud.com>", | ||
"release-it": "^12.2.1", | ||
"tailwindcss": "1.0.1" | ||
"tailwindcss": "1.0.2" | ||
} | ||
} |
@@ -31,7 +31,13 @@ # Typography Plugin for Tailwind CSS | ||
extends: 'heading', // this means all the styles in "heading" will be copied here; "extends" can also be an array to extend multiple text styles | ||
fontSize: theme('fontSize.6xl'), | ||
fontSize: theme('fontSize.5xl'), | ||
'@screen sm': { | ||
fontSize: theme('fontSize.6xl'), | ||
}, | ||
}, | ||
h2: { | ||
extends: 'heading', | ||
fontSize: theme('fontSize.5xl'), | ||
fontSize: theme('fontSize.4xl'), | ||
'@screen sm': { | ||
fontSize: theme('fontSize.5xl'), | ||
}, | ||
}, | ||
@@ -185,13 +191,23 @@ h3: { | ||
``` | ||
```css | ||
.c-h1 { | ||
font-weight: 700; | ||
line-height: 1.25; | ||
font-size: 4rem; | ||
font-size: 3rem; | ||
} | ||
@media (min-width: 640px) { | ||
.c-h1 { | ||
font-size: 4rem; | ||
} | ||
} | ||
.c-h2 { | ||
font-weight: 800; | ||
line-height: 1.25; | ||
font-size: 3rem; | ||
font-size: 2.25rem; | ||
} | ||
@media (min-width: 640px) { | ||
.c-h2 { | ||
font-size: 3rem; | ||
} | ||
} | ||
.c-h3 { | ||
@@ -238,9 +254,19 @@ font-weight: 700; | ||
line-height: 1.25; | ||
font-size: 4rem; | ||
font-size: 3rem; | ||
} | ||
@media (min-width: 640px) { | ||
.c-rich-text h1 { | ||
font-size: 4rem; | ||
} | ||
} | ||
.c-rich-text h2 { | ||
font-weight: 800; | ||
line-height: 1.25; | ||
font-size: 3rem; | ||
font-size: 2.25rem; | ||
} | ||
@media (min-width: 640px) { | ||
.c-rich-text h2 { | ||
font-size: 3rem; | ||
} | ||
} | ||
.c-rich-text h3 { | ||
@@ -247,0 +273,0 @@ font-weight: 700; |
12
test.js
@@ -340,3 +340,3 @@ const _ = require('lodash'); | ||
'default': 'sans-serif', | ||
'heading': 'Helvetica', | ||
'heading': ['Helvetica', 'Arial', 'sans-serif'], | ||
}, | ||
@@ -389,3 +389,3 @@ fontWeight: { | ||
.c-heading { | ||
font-family: Helvetica; | ||
font-family: Helvetica, Arial, sans-serif; | ||
font-weight: 700; | ||
@@ -398,3 +398,3 @@ } | ||
.c-h1 { | ||
font-family: Helvetica; | ||
font-family: Helvetica, Arial, sans-serif; | ||
font-weight: 800; | ||
@@ -405,3 +405,3 @@ line-height: 1.25; | ||
.c-h2 { | ||
font-family: Helvetica; | ||
font-family: Helvetica, Arial, sans-serif; | ||
font-weight: 800; | ||
@@ -412,3 +412,3 @@ line-height: 1.25; | ||
.c-h3 { | ||
font-family: Helvetica; | ||
font-family: Helvetica, Arial, sans-serif; | ||
font-weight: 700; | ||
@@ -527,3 +527,2 @@ font-size: 36px; | ||
/* | ||
test('text styles can be responsive', () => { | ||
@@ -618,3 +617,2 @@ return generatePluginCss({ | ||
}); | ||
*/ | ||
@@ -621,0 +619,0 @@ test('text styles can be set to not be output', () => { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
39715
310
0
999