Merge pull request #2145 from tailwindlabs/extended-font-size-scale

Add experimental extendedFontSizeScale
This commit is contained in:
Adam Wathan 2020-08-07 15:17:36 -04:00 committed by GitHub
commit 89461f9999
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 97 additions and 1 deletions

View File

@ -7967,6 +7967,21 @@ video {
line-height: 1;
}
.text-7xl {
font-size: 5rem;
line-height: 1;
}
.text-8xl {
font-size: 6rem;
line-height: 1;
}
.text-9xl {
font-size: 8rem;
line-height: 1;
}
.leading-3 {
line-height: .75rem;
}
@ -33029,6 +33044,21 @@ video {
line-height: 1;
}
.sm\:text-7xl {
font-size: 5rem;
line-height: 1;
}
.sm\:text-8xl {
font-size: 6rem;
line-height: 1;
}
.sm\:text-9xl {
font-size: 8rem;
line-height: 1;
}
.sm\:leading-3 {
line-height: .75rem;
}
@ -58061,6 +58091,21 @@ video {
line-height: 1;
}
.md\:text-7xl {
font-size: 5rem;
line-height: 1;
}
.md\:text-8xl {
font-size: 6rem;
line-height: 1;
}
.md\:text-9xl {
font-size: 8rem;
line-height: 1;
}
.md\:leading-3 {
line-height: .75rem;
}
@ -83093,6 +83138,21 @@ video {
line-height: 1;
}
.lg\:text-7xl {
font-size: 5rem;
line-height: 1;
}
.lg\:text-8xl {
font-size: 6rem;
line-height: 1;
}
.lg\:text-9xl {
font-size: 8rem;
line-height: 1;
}
.lg\:leading-3 {
line-height: .75rem;
}
@ -108125,6 +108185,21 @@ video {
line-height: 1;
}
.xl\:text-7xl {
font-size: 5rem;
line-height: 1;
}
.xl\:text-8xl {
font-size: 6rem;
line-height: 1;
}
.xl\:text-9xl {
font-size: 8rem;
line-height: 1;
}
.xl\:leading-3 {
line-height: .75rem;
}

View File

@ -3,7 +3,12 @@ import chalk from 'chalk'
const featureFlags = {
future: ['removeDeprecatedGapUtilities'],
experimental: ['uniformColorPalette', 'extendedSpacingScale', 'defaultLineHeights'],
experimental: [
'uniformColorPalette',
'extendedSpacingScale',
'defaultLineHeights',
'extendedFontSizeScale',
],
}
export function flagEnabled(config, flag) {

View File

@ -0,0 +1,11 @@
export default {
theme: {
extend: {
fontSize: {
'7xl': ['5rem', { lineHeight: '1' }],
'8xl': ['6rem', { lineHeight: '1' }],
'9xl': ['8rem', { lineHeight: '1' }],
},
},
},
}

View File

@ -16,6 +16,7 @@ import { flagEnabled } from './featureFlags'
import uniformColorPalette from './flagged/uniformColorPalette.js'
import extendedSpacingScale from './flagged/extendedSpacingScale.js'
import defaultLineHeights from './flagged/defaultLineHeights.js'
import extendedFontSizeScale from './flagged/extendedFontSizeScale.js'
function getDefaultConfigs(config) {
const configs = [defaultConfig]
@ -32,6 +33,10 @@ function getDefaultConfigs(config) {
configs.unshift(defaultLineHeights)
}
if (flagEnabled(config, 'extendedFontSizeScale')) {
configs.unshift(extendedFontSizeScale)
}
return configs
}