Brad Cornes
243e8814d8
Resolve purge paths relative to the current working directory ( #4655 )
...
* resolve purge paths relative to cwd
* simplify test
2021-06-15 16:37:04 -04:00
Robin Malfait
8518fee9ea
implement purge safelist ( #4580 )
...
* fix --help output in tests
* add tests to ensure we can use `purge.safelist`
* implement the `purge.safelist` for strings
* proxy `purge.safelist` to `purge.options.safelist`
This allows us to have a similar API in `AOT` and `JIT` mode.
* only proxy `purge.safelist` to `purge.options.safelist` if
`purge.options.safelist` doesn't exists yet.
2021-06-09 10:00:09 -04:00
Brad Cornes
a3db3a4700
Register PurgeCSS content as PostCSS dependencies ( #4543 )
...
* add `glob` property to `dir-dependency` messages
* Add `glob` to `dir-dependency` messages
* register purge content as postcss dependencies
2021-06-03 05:41:32 -04:00
Brad Cornes
6bf6738683
Add transform and extract APIs ( #4469 )
...
* add `transform` and `extract` APIs
* make svelte transform part of the transformer stuff
2021-05-26 09:43:05 -04:00
Adam Wathan
1849e35f14
Refactor internals to decouple watch strategies and extract IO
...
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2021-05-26 09:43:05 -04:00
Adam Wathan
5fa665835f
Fix formatting issues
2021-05-20 13:43:17 -04:00
Mateusz
f89bf5f4a6
Add :read-only variant ( #4102 )
...
* Add :read-only variant
* Added read-only variant to defaultConfig.stub
Co-authored-by: FunnyScarf <5177092+dyzajash@users.noreply.github.com>
2021-05-11 15:29:23 -04:00
Adam Wathan
7991646eff
Add screen function ( #4318 )
2021-05-11 15:25:25 -04:00
Adam Wathan
5ebe5e8309
Remove dependency on postcss-functions ( #4317 )
...
* Write postcss-functions ourselves
* Add test for nested theme calls
* Remove unused import
2021-05-11 14:33:05 -04:00
Adam Wathan
522787ac41
Revert fix lint errors?!
2021-05-11 14:25:34 -04:00
Adam Wathan
9fc13a6564
Fix lint errors
2021-05-11 13:55:02 -04:00
Brad Cornes
6a7d156608
Resolve purge paths ( #4214 )
...
* resolve purge paths
* add test for purgecss pattern resolution
* resolve purgecss patterns relative to the config file if there is one
* account for raw content when transforming purgecss options
* append test name to postcss `from` option in purge tests
fixes tests hanging
* add test for relative purge path resolution in JIT mode
2021-05-07 13:56:16 -04:00
Axel Hernández Ferrera
ed1727ab86
Improve @apply performance ( #3718 )
...
* Split the buildUtilityMap function to memoize the static part
* fix tests
2021-05-07 13:56:14 -04:00
Dylan Vann
c629ebb811
Fix function colors bug ( #2919 )
2021-05-07 13:56:10 -04:00
Martin Stühmer
251c8d2490
Version number corrected in substituteTailwindAtRules ( #3237 )
2021-05-07 13:56:09 -04:00
Illia Sakovich
7c62ecdcdd
from: undefined -> from: __filename ( #3356 )
2021-05-07 13:56:09 -04:00
Andrew
d552e20096
create new "empty" variant
...
this will generate classes like the following:
```css
.empty\:hidden:empty {
display: none
}
```
2021-01-06 12:19:21 -06:00
Robin Malfait
eac11cf57d
Performance improvements + memory leak fix ( #3032 )
...
* fix memory leak
* add optional condition to hasAtRule
* use known tree to handle `@apply` when required `@tailwind` at rules exists
Otherwise we will generate the lookup tree.
* only generate the missing `@tailwind` atrules when using `@apply`
* update perf config to reflect 2.0 changes
* update changelog
* ensure lookup tree is correctly cached based on used tailwind atrules
2020-12-11 15:03:49 +01:00
Robin Malfait
152202916c
Allow for recursively applying user defined classes ( #2832 )
2020-11-26 15:05:06 +01:00
Stefan Fisk
1e0fc09e0a
Fix !important on multiple selectors #2823 ( #2824 )
...
* Add failing test for #2823
* cleanup string literals
* use prettier for toMatchCSS diffs
* make sure that importants are applied correctly
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2020-11-26 14:53:58 +01:00
Navith
d4bd2d0b05
Make purge still preserve HTML elements for user-defined extractors ( #2704 )
...
* Add failing test for purge preserving element selectors when `defaultExtractor` is overridden
* `preserveHtmlElements` works with user-defined purge extractors
2020-10-31 10:02:40 -04:00
impulse
539738d418
fix: show correct key name when enabling darkMode ( #2635 )
2020-10-21 07:12:31 -04:00
Adam Wathan
b92f033f8b
Disable dark mode by default, rename config option to darkMode ( #2631 )
...
* Disable dark mode by default, rename config option to `darkMode`
* Rebuild fixtures
2020-10-20 21:36:05 -04:00
Adam Wathan
e13f083c4b
Join arrays when using theme consistently
2020-10-19 11:32:22 -04:00
Adam Wathan
6fa213d5d8
Don't calculate didYouMean suggestions prematurely
2020-10-19 09:40:28 -04:00
Matt Rothenberg
7572b0256c
feat: Show "Did you mean?" message when users @apply errant class ( #2590 )
...
* feat: suggest alternate classes if @apply value not found
* fix: remove only from test
* feat: move logic to applyComplexClasses
* fix: remove whitespace
* remove unused files
* did you mean suggestion
2020-10-19 09:35:22 -04:00
Brad Cornes
5bf4699a35
Add theme helper function errors ( #2615 )
...
* feat: throw when theme does not have requested path (#1799 )
* Add suggestions to theme function errors
Co-authored-by: Jason Quense <monastic.panic@gmail.com>
2020-10-19 08:12:14 -04:00
Adam Wathan
7376d7c8b1
Enable dark mode
2020-10-18 15:43:50 -04:00
Adam Wathan
c1a7e94e65
Rename export
2020-10-18 15:43:50 -04:00
Adam Wathan
a5ba851c88
Replace old apply implementation files
2020-10-18 15:43:50 -04:00
Adam Wathan
782a828c81
Switch to new apply implementation
2020-10-18 15:43:50 -04:00
Adam Wathan
dc7c477326
Remove unused import
2020-10-18 15:43:50 -04:00
Adam Wathan
b008d0c08a
Remove 'conservative' purge mode
2020-10-18 15:43:50 -04:00
Adam Wathan
38b4eeb288
Prettier likes parens a lot now
...
git blame is now broken forever.
2020-10-16 15:39:44 -04:00
Adam Wathan
e3ed12782f
Update prettier
2020-10-16 13:30:06 -04:00
Adam Wathan
dbc7dc69d2
Rename default variant to DEFAULT
2020-10-16 12:53:41 -04:00
Adam Wathan
32eac19858
Allow variant plugins to tell Tailwind they should stack ( #2382 )
...
* Fix unwanted stacking behavior on any non-darkModeVariant "dark" variant (#2380 )
* Add failing tests for non-darkModeVariant "dark" variant stacking behavior
* Fix unwanted non-darkModeVariant "dark" variant stacking (by making the failing test pass)
* Add unstable_stack option for variants to tell Tailwind they should stack
* Update eslint to allow unstable_ variables
* Update changelog
Co-authored-by: Navith <28162694+JakeNavith@users.noreply.github.com>
2020-09-14 09:12:36 -04:00
Adam Wathan
a4b30a0115
Safeguard against trailing slash in purge matches ( #2364 )
2020-09-10 14:44:48 -04:00
Adam Wathan
45cf3c595e
Fix issue where inserting extra PurgeCSS control comments could break integrated PurgeCSS support ( #2331 )
2020-09-05 23:35:16 -04:00
Adam Wathan
58781b517d
Only warn about conservative purge mode once per process
2020-09-05 17:41:05 -04:00
Robin Malfait
4c4c5a3834
Fix purging in 1.8 ( #2320 )
...
* re-add missing `@layer`'s for responsive rules
* use toMatchCss for better diffing
* do not wrap user `@responsive` rules in an `@layer`
2020-09-04 18:36:50 -04:00
Adam Wathan
09bd7d43f4
Move custom CSS within layers to corresponding Tailwind layer ( #2312 )
...
* Move custom CSS within layers to corresponding Tailwind layer
* Update changelog
2020-09-04 14:21:56 -04:00
Adam Wathan
d44e75fc79
Purge layers by default, deprecate conservative mode ( #2288 )
...
* Purge `layers` by default, deprecate `conservative` mode
* Ensure base styles are wrapped in @layer
* Update processPlugins test
2020-09-02 14:42:27 -04:00
Adam Wathan
956133a7a4
Don't associate custom CSS with a layer by default
2020-09-02 13:57:44 -04:00
Adam Wathan
aae71c5249
Preserve HTML elements by default when purging unused styles ( #2283 )
2020-09-01 16:20:16 -04:00
Adam Wathan
5701d7847b
Add dark mode variant ( #2279 )
...
* Initial dark mode prototype
* Isolate dark mode logic to config extension
* Update fixtures
* Fix lint warnings
2020-09-01 13:16:00 -04:00
Adam Wathan
2d090feb98
Only log purge notice once per process
2020-08-19 10:56:51 -04:00
Adam Wathan
ef149cfafb
Optimize rebuilds in long-running processes
2020-08-19 10:21:26 -04:00
Adam Wathan
f32ae238ef
Merge branch 'master' of github.com:tailwindlabs/tailwindcss
2020-08-18 09:06:35 -04:00
Adam Wathan
fdf468998f
Fix issue where motion variants incorrectly stack with group-hover variants
2020-08-18 09:03:32 -04:00