mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Rename "reset" to "preflight"
This commit is contained in:
parent
333663a2ec
commit
2b1a6959d3
@ -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
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
@tailwind reset;
|
||||
@tailwind preflight;
|
||||
|
||||
@tailwind utilities;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
@tailwind reset;
|
||||
@tailwind preflight;
|
||||
|
||||
html {
|
||||
font-size: 14px;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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";
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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),
|
||||
|
||||
@ -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()
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user