diff --git a/docs/source/_partials/class-table.blade.php b/docs/source/_partials/class-table.blade.php index 12f6e51c4..424177486 100644 --- a/docs/source/_partials/class-table.blade.php +++ b/docs/source/_partials/class-table.blade.php @@ -1,5 +1,10 @@ -
-
+@php + $scroll = isset($scroll) ? $scroll : true; + $scroll = (count($rows) > 10 && ($scroll !== false)); +@endphp + +
+
@@ -19,4 +24,9 @@
+ @if ($scroll) +
+ +
+ @endif
diff --git a/docs/source/_partials/work-in-progress-example.blade.php b/docs/source/_partials/work-in-progress-example.blade.php index dfaada514..b361e0a34 100644 --- a/docs/source/_partials/work-in-progress-example.blade.php +++ b/docs/source/_partials/work-in-progress-example.blade.php @@ -1,5 +1,5 @@
-
+
diff --git a/docs/source/_partials/work-in-progress.blade.php b/docs/source/_partials/work-in-progress.blade.php index 6604eb1a0..5ebf74738 100644 --- a/docs/source/_partials/work-in-progress.blade.php +++ b/docs/source/_partials/work-in-progress.blade.php @@ -1,4 +1,4 @@ -
+
diff --git a/docs/source/docs/border-radius.blade.md b/docs/source/docs/border-radius.blade.md index 6dd358907..40a7730ec 100644 --- a/docs/source/docs/border-radius.blade.md +++ b/docs/source/docs/border-radius.blade.md @@ -24,7 +24,7 @@ features: [ '.rounded', 'border-radius: .25rem;', - "Apply a medium border radius to all corners of an element.", + "Apply the default border radius to all corners of an element.", ], [ '.rounded-lg', @@ -79,22 +79,22 @@ features: [ '.rounded-t', "border-top-left-radius: .25rem;\nborder-top-right-radius: .25rem;", - "Apply a medium border radius to the top corners of an element.", + "Apply the default border radius to the top corners of an element.", ], [ '.rounded-r', "border-top-right-radius: .25rem;\nborder-bottom-right-radius: .25rem;", - "Apply a medium border radius to the right corners of an element.", + "Apply the default border radius to the right corners of an element.", ], [ '.rounded-b', "border-bottom-right-radius: .25rem;\nborder-bottom-left-radius: .25rem;", - "Apply a medium border radius to the bottom corners of an element.", + "Apply the default border radius to the bottom corners of an element.", ], [ '.rounded-l', "border-top-left-radius: .25rem;\nborder-bottom-left-radius: .25rem;", - "Apply a medium border radius to the left corners of an element.", + "Apply the default border radius to the left corners of an element.", ], [ '.rounded-t-lg', @@ -179,22 +179,22 @@ features: [ '.rounded-tl', 'border-top-left-radius: .25rem;', - "Apply a medium border radius to the top left corner of an element.", + "Apply the default border radius to the top left corner of an element.", ], [ '.rounded-tr', 'border-top-right-radius: .25rem;', - "Apply a medium border radius to the top right corner of an element.", + "Apply the default border radius to the top right corner of an element.", ], [ '.rounded-br', 'border-bottom-right-radius: .25rem;', - "Apply a medium border radius to the bottom right corner of an element.", + "Apply the default border radius to the bottom right corner of an element.", ], [ '.rounded-bl', 'border-bottom-left-radius: .25rem;', - "Apply a medium border radius to the bottom left corner of an element.", + "Apply the default border radius to the bottom left corner of an element.", ], [ '.rounded-tl-lg', diff --git a/docs/source/docs/height.blade.md b/docs/source/docs/height.blade.md index 8a20aedd6..26824f247 100644 --- a/docs/source/docs/height.blade.md +++ b/docs/source/docs/height.blade.md @@ -12,91 +12,92 @@ features: @include('_partials.work-in-progress') @include('_partials.class-table', [ + 'scroll' => false, 'rows' => [ [ '.h-1', 'height: 0.25rem;', - "Set the element's height to 0.25rem.", + "Set the element's height to 0.25rem.", ], [ '.h-2', 'height: 0.5rem;', - "Set the element's height to 0.5rem.", + "Set the element's height to 0.5rem.", ], [ '.h-3', 'height: 0.75rem;', - "Set the element's height to 0.75rem.", + "Set the element's height to 0.75rem.", ], [ '.h-4', 'height: 1rem;', - "Set the element's height to 1rem.", + "Set the element's height to 1rem.", ], [ '.h-6', 'height: 1.5rem;', - "Set the element's height to 1.5rem.", + "Set the element's height to 1.5rem.", ], [ '.h-8', 'height: 2rem;', - "Set the element's height to 2rem.", + "Set the element's height to 2rem.", ], [ '.h-10', 'height: 2.5rem;', - "Set the element's height to 2.5rem.", + "Set the element's height to 2.5rem.", ], [ '.h-12', 'height: 3rem;', - "Set the element's height to 3rem.", + "Set the element's height to 3rem.", ], [ '.h-16', 'height: 4rem;', - "Set the element's height to 4rem.", + "Set the element's height to 4rem.", ], [ '.h-24', 'height: 6rem;', - "Set the element's height to 6rem.", + "Set the element's height to 6rem.", ], [ '.h-32', 'height: 8rem;', - "Set the element's height to 8rem.", + "Set the element's height to 8rem.", ], [ '.h-48', 'height: 12rem;', - "Set the element's height to 12rem.", + "Set the element's height to 12rem.", ], [ '.h-64', 'height: 16rem;', - "Set the element's height to 16rem.", + "Set the element's height to 16rem.", ], [ '.h-auto', 'height: auto;', - "Set the element's height to auto.", + "Set the element's height to auto.", ], [ '.h-px', 'height: 1px;', - "Set the element's height to 1px.", + "Set the element's height to 1px.", ], [ '.h-full', 'height: 100%;', - "Set the element's height to 100%.", + "Set the element's height to 100%.", ], [ '.h-screen', 'height: 100vh;', - "Set the element's height to 100vh.", + "Set the element's height to 100vh.", ], ] ]) diff --git a/docs/source/docs/max-height.blade.md b/docs/source/docs/max-height.blade.md index 89d8bc012..8071a3142 100644 --- a/docs/source/docs/max-height.blade.md +++ b/docs/source/docs/max-height.blade.md @@ -12,16 +12,17 @@ features: @include('_partials.work-in-progress') @include('_partials.class-table', [ + 'scroll' => false, 'rows' => [ [ '.max-h-full', 'max-height: 100%;', - "Set the element's maximum height to 100%.", + "Set the element's maximum height to 100%.", ], [ '.max-h-screen', 'max-height: 100vh;', - "Set the element's maximum height to 100vh.", + "Set the element's maximum height to 100vh.", ], ] ]) diff --git a/docs/source/docs/max-width.blade.md b/docs/source/docs/max-width.blade.md index 9aa5e05a4..7b7b9d90b 100644 --- a/docs/source/docs/max-width.blade.md +++ b/docs/source/docs/max-width.blade.md @@ -12,56 +12,57 @@ features: @include('_partials.work-in-progress') @include('_partials.class-table', [ + 'scroll' => false, 'rows' => [ [ '.max-w-xs', 'max-width: 20rem;', - "Set the element's maximum width to 20rem.", + "Set the element's maximum width to 20rem.", ], [ '.max-w-sm', 'max-width: 30rem;', - "Set the element's maximum width to 30rem.", + "Set the element's maximum width to 30rem.", ], [ '.max-w-md', 'max-width: 40rem;', - "Set the element's maximum width to 40rem.", + "Set the element's maximum width to 40rem.", ], [ '.max-w-lg', 'max-width: 50rem;', - "Set the element's maximum width to 50rem.", + "Set the element's maximum width to 50rem.", ], [ '.max-w-xl', 'max-width: 60rem;', - "Set the element's maximum width to 60rem.", + "Set the element's maximum width to 60rem.", ], [ '.max-w-2xl', 'max-width: 70rem;', - "Set the element's maximum width to 70rem.", + "Set the element's maximum width to 70rem.", ], [ '.max-w-3xl', 'max-width: 80rem;', - "Set the element's maximum width to 80rem.", + "Set the element's maximum width to 80rem.", ], [ '.max-w-4xl', 'max-width: 90rem;', - "Set the element's maximum width to 90rem.", + "Set the element's maximum width to 90rem.", ], [ '.max-w-5xl', 'max-width: 100rem;', - "Set the element's maximum width to 100rem.", + "Set the element's maximum width to 100rem.", ], [ '.max-w-full', 'max-width: 100%;', - "Set the element's maximum width to 100%.", + "Set the element's maximum width to 100%.", ], ] ]) diff --git a/docs/source/docs/min-height.blade.md b/docs/source/docs/min-height.blade.md index a0495f98c..add177599 100644 --- a/docs/source/docs/min-height.blade.md +++ b/docs/source/docs/min-height.blade.md @@ -12,21 +12,22 @@ features: @include('_partials.work-in-progress') @include('_partials.class-table', [ + 'scroll' => false, 'rows' => [ [ '.min-h-0', 'min-height: 0;', - "Set the element's minimum height to 0.", + "Set the element's minimum height to 0.", ], [ '.min-h-full', 'min-height: 100%;', - "Set the element's minimum height to 100%.", + "Set the element's minimum height to 100%.", ], [ '.min-h-screen', 'min-height: 100vh;', - "Set the element's minimum height to 100vh.", + "Set the element's minimum height to 100vh.", ], ] ]) diff --git a/docs/source/docs/min-width.blade.md b/docs/source/docs/min-width.blade.md index 954df1953..86be64906 100644 --- a/docs/source/docs/min-width.blade.md +++ b/docs/source/docs/min-width.blade.md @@ -12,16 +12,17 @@ features: @include('_partials.work-in-progress') @include('_partials.class-table', [ + 'scroll' => false, 'rows' => [ [ '.min-w-0', 'min-width: 0;', - "Set the element's minimum width to 0.", + "Set the element's minimum width to 0.", ], [ '.min-w-full', 'min-width: 100%;', - "Set the element's minimum width to 100%.", + "Set the element's minimum width to 100%.", ], ] ]) diff --git a/docs/source/docs/width.blade.md b/docs/source/docs/width.blade.md index 9631eb17c..23954527e 100644 --- a/docs/source/docs/width.blade.md +++ b/docs/source/docs/width.blade.md @@ -12,146 +12,147 @@ features: @include('_partials.work-in-progress') @include('_partials.class-table', [ + 'scroll' => false, 'rows' => [ [ '.w-1', 'width: 0.25rem;', - "Set the element's width to 0.25rem.", + "Set the element's width to 0.25rem.", ], [ '.w-2', 'width: 0.5rem;', - "Set the element's width to 0.5rem.", + "Set the element's width to 0.5rem.", ], [ '.w-3', 'width: 0.75rem;', - "Set the element's width to 0.75rem.", + "Set the element's width to 0.75rem.", ], [ '.w-4', 'width: 1rem;', - "Set the element's width to 1rem.", + "Set the element's width to 1rem.", ], [ '.w-6', 'width: 1.5rem;', - "Set the element's width to 1.5rem.", + "Set the element's width to 1.5rem.", ], [ '.w-8', 'width: 2rem;', - "Set the element's width to 2rem.", + "Set the element's width to 2rem.", ], [ '.w-10', 'width: 2.5rem;', - "Set the element's width to 2.5rem.", + "Set the element's width to 2.5rem.", ], [ '.w-12', 'width: 3rem;', - "Set the element's width to 3rem.", + "Set the element's width to 3rem.", ], [ '.w-16', 'width: 4rem;', - "Set the element's width to 4rem.", + "Set the element's width to 4rem.", ], [ '.w-24', 'width: 6rem;', - "Set the element's width to 6rem.", + "Set the element's width to 6rem.", ], [ '.w-32', 'width: 8rem;', - "Set the element's width to 8rem.", + "Set the element's width to 8rem.", ], [ '.w-48', 'width: 12rem;', - "Set the element's width to 12rem.", + "Set the element's width to 12rem.", ], [ '.w-64', 'width: 16rem;', - "Set the element's width to 16rem.", + "Set the element's width to 16rem.", ], [ '.w-auto', 'width: auto;', - "Set the element's width to auto.", + "Set the element's width to auto.", ], [ '.w-px', 'width: 1px;', - "Set the element's width to 1px.", + "Set the element's width to 1px.", ], [ '.w-1/2', 'width: 50%;', - "Set the element's width to 50%.", + "Set the element's width to 50%.", ], [ '.w-1/3', 'width: 33.33333%;', - "Set the element's width to 33.33333%.", + "Set the element's width to 33.33333%.", ], [ '.w-2/3', 'width: 66.66667%;', - "Set the element's width to 66.66667%.", + "Set the element's width to 66.66667%.", ], [ '.w-1/4', 'width: 25%;', - "Set the element's width to 25%.", + "Set the element's width to 25%.", ], [ '.w-3/4', 'width: 75%;', - "Set the element's width to 75%.", + "Set the element's width to 75%.", ], [ '.w-1/5', 'width: 20%;', - "Set the element's width to 20%.", + "Set the element's width to 20%.", ], [ '.w-2/5', 'width: 40%;', - "Set the element's width to 40%.", + "Set the element's width to 40%.", ], [ '.w-3/5', 'width: 60%;', - "Set the element's width to 60%.", + "Set the element's width to 60%.", ], [ '.w-4/5', 'width: 80%;', - "Set the element's width to 80%.", + "Set the element's width to 80%.", ], [ '.w-1/6', 'width: 16.66667%;', - "Set the element's width to 16.66667%.", + "Set the element's width to 16.66667%.", ], [ '.w-5/6', 'width: 83.33333%;', - "Set the element's width to 83.33333%.", + "Set the element's width to 83.33333%.", ], [ '.w-full', 'width: 100%;', - "Set the element's width to 100%.", + "Set the element's width to 100%.", ], [ '.w-screen', 'width: 100vw;', - "Set the element's width to 100vw.", + "Set the element's width to 100vw.", ], ] ]) diff --git a/docs/source/img/twitter-large-card.png b/docs/source/img/twitter-large-card.png new file mode 100644 index 000000000..46ce053cf Binary files /dev/null and b/docs/source/img/twitter-large-card.png differ diff --git a/docs/source/index.blade.php b/docs/source/index.blade.php index 41a1f4597..0f94ff193 100644 --- a/docs/source/index.blade.php +++ b/docs/source/index.blade.php @@ -5,13 +5,13 @@ - + - + @endsection @section('body') diff --git a/docs/tailwind.js b/docs/tailwind.js index e92b00ff5..2d635826d 100644 --- a/docs/tailwind.js +++ b/docs/tailwind.js @@ -93,4 +93,8 @@ config.margin = Object.assign(config.margin, { config.negativeMargin = config.margin +config.shadows = Object.assign({ + 'md-light': '0 0 12px 8px rgb(255,255,255)' +}, config.shadows) + module.exports = config diff --git a/src/lib/evaluateTailwindFunctions.js b/src/lib/evaluateTailwindFunctions.js index 307baf3c3..40ce28a54 100644 --- a/src/lib/evaluateTailwindFunctions.js +++ b/src/lib/evaluateTailwindFunctions.js @@ -2,12 +2,10 @@ import _ from 'lodash' import functions from 'postcss-functions' export default function(config) { - const options = config() - return functions({ functions: { config: (path, defaultValue) => { - return _.get(options, _.trim(path, `'"`), defaultValue) + return _.get(config(), _.trim(path, `'"`), defaultValue) }, }, }) diff --git a/src/lib/substituteClassApplyAtRules.js b/src/lib/substituteClassApplyAtRules.js index 5408e82f6..7517bbe08 100644 --- a/src/lib/substituteClassApplyAtRules.js +++ b/src/lib/substituteClassApplyAtRules.js @@ -24,7 +24,7 @@ function findMixin(css, mixin, onError) { if (_.isEmpty(matches)) { // prettier-ignore - onError(`\`@apply\` cannot be used with ${mixin} because ${mixin} either does not exist, or it's actual definition includes a pseudo-class like :hover, :active, etc.`) + onError(`\`@apply\` cannot be used with \`${mixin}\` because \`${mixin}\` either cannot be found, or it's actual definition includes a pseudo-selector like :hover, :active, etc. If you're sure that \`${mixin}\` exists, make sure that any \`@import\` statements are being properly processed *before* Tailwind CSS sees your CSS, as \`@apply\` can only be used for classes in the same CSS tree.`) } if (matches.length > 1) {