586 Commits

Author SHA1 Message Date
Michaël De Boey
3bb2a200ae Add object-position utilities 2018-11-01 21:58:17 -04:00
Michaël De Boey
4e4751c4d5 Add object-fit utilities 2018-11-01 21:58:17 -04:00
Adam Wathan
76691a563d Allow modules: [...variants] syntax to bulk apply variants 2018-11-01 21:33:42 -04:00
Adam Wathan
655963a100 Apply all first-class variants using modules: all 2018-11-01 20:30:48 -04:00
Adam Wathan
1e8a70b68c Promote pluginVariants from experiment to feature 2018-10-31 15:52:32 -04:00
Jesse
55f8207d21 Fix apostrophe in error 2018-10-17 11:47:14 +02:00
mattstypa
34ad504a46 Added tests for CLI utils 2018-09-25 11:09:20 -05:00
Matt Stypa
dbeeea4dbb Added ability to protect comments when --no-comments options is use for CLI init command 2018-09-24 21:12:07 -05:00
Matt Stypa
48387a8f8a Switched to use strip-comments instead of Babel for CLI init command 2018-09-24 21:00:30 -05:00
mattstypa
9e26fd84e3 CLI. Added --no-comments option to init commend 2018-09-24 15:44:36 -05:00
Adam Wathan
4fc519f9f5
Merge pull request #554 from MattStypa/cli
CLI Beautification
2018-09-24 23:00:18 +09:30
Matt Stypa
eb4da80ede Code style updates 2018-09-24 07:55:24 -05:00
Matt Stypa
1b1ae8abc9 When no output file is specified for the build command, the result will be piped to stdout 2018-09-23 22:00:50 -05:00
Adam Wathan
750b62c5d2 Enable shadowLookup by default 2018-09-21 14:55:54 -04:00
Adam Wathan
77a2aedc00 Refactor findClass 2018-09-15 08:58:09 -04:00
Adam Wathan
e497a2b5de Use existing prefixSelector function 2018-09-15 08:58:09 -04:00
Rouven Hurling
dfb8c256ab fix code, test and style 2018-09-15 08:58:09 -04:00
Rouven Hurling
3a103fe83a Fix travis issue (missed an opening bracket) 2018-09-15 08:58:09 -04:00
Rouven Hurling
a38c785350 Implement optional prefix substitution in @apply 2018-09-15 08:58:09 -04:00
SpiltCoffee
38ac38cf99 Fixed linting error 2018-09-15 13:07:29 +10:00
SpiltCoffee
002a4ba90d Changed Variant Generation to apply per selector in a ruleset (fixes #530) 2018-09-15 11:38:58 +10:00
mattstypa
d91eea88fb Reverted changes to processTailwindFeatures that would impact Webpack watch ability. As a result all commands also became Promise based 2018-09-14 11:07:23 -05:00
mattstypa
933b557e87 Code style fixes 2018-09-14 08:28:03 -05:00
Matt Stypa
6e448ea70a Config stub path was incorrect 2018-09-14 06:46:16 -05:00
Matt Stypa
ad695e9c13 CLI tool will now print the correct usage information 2018-09-14 06:42:33 -05:00
Matt Stypa
a20b4519d4 Node hashbang is required for npm bin files 2018-09-14 06:38:13 -05:00
Matt Stypa
b71cfe711e CLI tool rewrite 2018-09-13 21:37:10 -05:00
Adam Wathan
1a8383c08d
Merge branch 'master' into feature/focus-within 2018-09-13 21:41:16 +09:30
scottbedard
7fb1af00f6 fix remaining shorthand cases for flexbug #6
see https://github.com/philipwalton/flexbugs#flexbug-6
2018-09-12 19:43:47 -07:00
Scott Bedard
9cb177a737
Improve IE support for flex-1 utility
closes #549
2018-09-10 11:38:55 -07:00
Adam Wathan
d82a7556c0 Preserve units for zero value properties 2018-08-14 13:37:08 -04:00
Adam Wathan
7201c4f51b Rename lazyConfig to getConfig 2018-07-16 08:37:23 -04:00
Adam Wathan
c0adb29f27 Be more defensive about fetching input source file 2018-07-16 08:35:58 -04:00
Adam Wathan
91286ad6bf Process all Tailwind features as one big plugin 2018-07-16 08:30:57 -04:00
Adam Wathan
25744172d1 Extract duplication to function 2018-07-12 11:05:09 -04:00
Adam Wathan
1a9b87f085 Fix style 2018-07-12 11:02:13 -04:00
Adam Wathan
80baf4aa17 Pass generated utilities around as array instead of root
When you do something like container.before(someRoot), PostCSS actually *mutates* someRoot, leaving it empty and moving its contents before the container. container.before(arrayOfNodes) on the other hand does no weird mutation.

This PR makes sure generatedUtilities is an array of nodes instead of a PostCSS container to avoid this unexpected mutation. It makes it a bit more work to walk those nodes if they need to be transformed, but I think it's worth the trade-off. Can always write a helper function around that if the boilerplate starts to feel repetitive.
2018-07-11 19:14:33 -04:00
Adam Wathan
597bad6ee5 Clone generatedUtilities before inserting 2018-07-11 15:54:11 -04:00
Adam Wathan
dd6fa7c4eb
Merge pull request #516 from tailwindcss/shadow-table
[Experiment] Allow `@apply`-ing utility classes that aren't explicitly defined but would be generated
2018-07-12 02:01:19 +09:30
Adam Wathan
7846d2a228 Move plugin variant features behind experiment 2018-07-11 12:13:50 -04:00
Adam Wathan
24e1385aca Only enable shadow lookup if shadowLookup experiment is enabled 2018-07-11 11:51:47 -04:00
Adam Wathan
cfe492220c Refactor duplication 2018-07-11 11:45:45 -04:00
Adam Wathan
cdbea36564 Fallback to shadow table 2018-07-11 09:56:11 -04:00
Adam Wathan
f974b8df03 Add support for writing variant plugins with raw PostCSS API 2018-06-26 13:44:47 -04:00
Adam Wathan
9b22ff3513 Only process plugins once 2018-06-26 13:44:47 -04:00
Adam Wathan
b21d258f63 Wrap Tailwind plugins in new plugin to only unwrap config once 2018-06-26 13:44:47 -04:00
Adam Wathan
64cda2f44b Refactor duplication to use generateVariantFunction 2018-06-26 13:44:47 -04:00
Adam Wathan
d77bc055ee Support for basic variant generator plugins
Allows you to write a plugin that registers a new variant but only
allows you to modify the selector (like what our built-in generators
do.)

Next steps are to support variants that wrap rules with at-rules
(like @supports for example), variants that can modify properties
(as opposed to just selectors), and to give variant plugin authors
control over how responsive variants interact with their own variants.
2018-06-26 13:44:47 -04:00
Adam Wathan
9eca69ad83 Refactor process plugins to return an object 2018-06-26 13:44:47 -04:00
Adam Wathan
9d05910507 Generate variants based on the order specified in the modules config 2018-06-26 13:44:47 -04:00