Rename "reset" to "preflight"

This commit is contained in:
Jonathan Reinink 2017-10-31 17:05:10 -04:00
parent 333663a2ec
commit 2b1a6959d3
9 changed files with 13 additions and 13 deletions

View File

@ -30,7 +30,7 @@ A utility-first CSS framework for rapid UI development.
* You can see the styles here:
* https://github.com/nothingworksinc/tailwindcss/blob/master/css/preflight.css
*/
@tailwind reset;
@tailwind preflight;
/**
* Here you would import any custom component classes; stuff that you'd

View File

@ -1,4 +1,4 @@
@tailwind reset;
@tailwind preflight;
@tailwind utilities;

View File

@ -1,4 +1,4 @@
@tailwind reset;
@tailwind preflight;
html {
font-size: 14px;

View File

@ -14,7 +14,7 @@ Deciding on the best way to extend a framework can be paralyzing, so here's some
A bare-bones Tailwind setup is a single CSS file that looks like this:
```less
@@tailwind reset;
@@tailwind preflight;
@@tailwind utilities;
```
@ -47,7 +47,7 @@ For this reason, **we recommend defining any custom utility classes at the end o
```less
@@tailwind reset;
@@tailwind preflight;
@@tailwind utilities;
@ -61,7 +61,7 @@ This way your custom utilities can override Tailwind utilities if needed, althou
If you're using a preprocessor like Less, Sass, or Stylus, consider keeping your utilities in a separate file and importing them:
```less
@@tailwind reset;
@@tailwind preflight;
@@tailwind utilities;
@ -73,7 +73,7 @@ If you're using a preprocessor like Less, Sass, or Stylus, consider keeping your
If you'd like to create responsive versions of your own utilities based on the breakpoints defined in your Tailwind config file, wrap your utilities in the `@responsive { ... }` directive:
```less
@@tailwind reset;
@@tailwind preflight;
@@tailwind utilities;

View File

@ -174,7 +174,7 @@ Since Tailwind's utility classes don't rely on `!important` to defeat other styl
Here's an example:
```less
@@tailwind reset;
@@tailwind preflight;
@import "components/buttons";

View File

@ -19,7 +19,7 @@ Use the `@@tailwind` directive to insert Tailwind's `reset` and `utilities` styl
* You can see the styles here:
* https://github.com/tailwindcss/tailwindcss/blob/master/css/preflight.css
*/
@@tailwind reset;
@@tailwind preflight;
/**
* This injects all of Tailwind's utility classes, generated based on your

View File

@ -44,7 +44,7 @@ To avoid specificity issues, we highly recommend structuring your main styleshee
* You can see the styles here:
* https://github.com/tailwindcss/tailwindcss/blob/master/css/preflight.css
*/
@@tailwind reset;
@@tailwind preflight;
/**
* Here you would import any custom component classes; stuff that you'd

View File

@ -5,7 +5,7 @@ import _ from 'lodash'
import postcss from 'postcss'
import stylefmt from 'stylefmt'
import substituteResetAtRule from './lib/substituteResetAtRule'
import substitutePreflightAtRule from './lib/substitutePreflightAtRule'
import evaluateTailwindFunctions from './lib/evaluateTailwindFunctions'
import generateUtilities from './lib/generateUtilities'
import substituteHoverableAtRules from './lib/substituteHoverableAtRules'
@ -24,7 +24,7 @@ const plugin = postcss.plugin('tailwind', (config) => {
}
return postcss([
substituteResetAtRule(config),
substitutePreflightAtRule(config),
evaluateTailwindFunctions(config),
generateUtilities(config),
substituteHoverableAtRules(config),

View File

@ -4,7 +4,7 @@ import postcss from 'postcss'
export default function(options) {
return function (css) {
css.walkAtRules('tailwind', atRule => {
if (atRule.params === 'reset') {
if (atRule.params === 'preflight') {
atRule.before(postcss.parse(fs.readFileSync(`${__dirname}/../../css/preflight.css`, 'utf8')))
atRule.remove()
}