Rouven Hurling
f629b647da
Implement optional prefix substitution in @apply
2018-09-14 15:10:17 +02:00
Adam Wathan
1a8383c08d
Merge branch 'master' into feature/focus-within
2018-09-13 21:41:16 +09:30
Adam Wathan
25744172d1
Extract duplication to function
2018-07-12 11:05:09 -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
Adam Wathan
8333d46cae
Add variant prefix to last class in a selector, not the first
2018-06-20 12:21:14 -04:00
Paulo
9e4e8a6d05
Add focus-within variant
2018-05-04 14:47:28 +02:00
Adam Wathan
2e34df923e
Add sourcemaps for replaced preflight styles
2018-03-30 10:23:56 -04:00
Adam Wathan
cc968d1791
Fix conflics, refactor variant generator
2018-03-13 08:12:20 -04:00
Adam Wathan
6e7ae58910
Move container component to a built-in plugin
2018-03-12 15:34:34 -04:00
Adam Wathan
20461a3418
Generate container classes as components, not utilities
2018-03-12 15:34:34 -04:00
Adam Wathan
fa0e06c2dd
Generate focus variants last and group-hover variants first
2018-03-12 15:34:14 -04:00
Adam Wathan
960275cc86
Add container classes as utilities not components
...
Just for now so that this feature can be introduced into the codebase
without forcing a BC break. The container classes will eventually be
moved to a built-in plugin that adds them as components.
2018-03-05 09:58:35 -05:00
Adam Wathan
dac591198f
Provide a function for prefixing utilities in plugins
2018-03-05 09:58:35 -05:00
Adam Wathan
18d45b19cf
Fix style
2018-03-05 09:58:35 -05:00
Adam Wathan
98f322920f
Move processPlugins to separate module
2018-03-05 09:58:35 -05:00
Adam Wathan
a6342e60ce
Add atRule helper for plugins
2018-03-05 09:58:35 -05:00
Adam Wathan
24d184fbfc
Pass escape function to plugins
2018-03-05 09:58:35 -05:00
Adam Wathan
4d3bbcad95
Pass config to plugins
2018-03-05 09:58:35 -05:00
Adam Wathan
e89fffbc3c
Remove unnecessary array destructuring
2018-03-05 09:58:35 -05:00
Adam Wathan
47518404c0
Rename selector to rule, extract plugin processing
2018-03-05 09:58:35 -05:00
Adam Wathan
73a6b6da85
Sort imports
2018-03-05 09:58:35 -05:00
Adam Wathan
5f77aa0ec3
Implement basic plugin system
2018-03-05 09:58:35 -05:00
Adam Wathan
eacc4635b6
Match apply rules against a lookup table instead of searching
2018-02-28 20:34:16 -05:00
fedeTibaldo
b7cb21360d
Update priority order to (from the highest): active-hover-focus
2018-02-19 17:23:22 +01:00
fedeTibaldo
62cf25f718
Change priority order to (from the highest): focus-active-hover
2018-02-16 18:09:20 +01:00
fedeTibaldo
2e4e4a79e2
Revert output order from hover-active-focus to focus-active-hover
2018-02-09 20:57:34 +01:00
fedeTibaldo
1f57fbfbaf
Add tests for active state variant
2018-02-09 20:20:24 +01:00
fedeTibaldo
b8ca236400
Add support for active state variant
2018-02-09 16:51:58 +01:00
Adam Wathan
ec9b9b99bd
Add support for making applied rules important
2017-12-13 13:00:37 -05:00
Adam Wathan
47a3b938de
Fix style
2017-12-13 13:00:01 -05:00
Adam Wathan
88ff6bdbc3
Don't normalize custom property sets in at-apply
2017-12-13 12:51:35 -05:00
Adam Wathan
6984ba0b99
Add source map information to generated utilities
2017-12-12 15:24:59 -05:00
Jack McDade
c84886e32e
Adjust syntax style to fit standards
2017-12-08 16:15:58 -05:00
Jack McDade
97ef316af8
Prevent @apply from adding !important.
2017-12-08 16:05:54 -05:00
Adam Wathan
858b725896
[0.3] Rename parent-hover to group-hover ( #271 )
2017-12-01 08:14:58 -05:00
Adam Wathan
ad48de9500
[0.3] Escape separator string ( #270 )
2017-11-30 15:55:06 -05:00
Adam Wathan
45c1c4826f
Merge branch 'master' into 0.3
2017-11-29 18:46:08 -05:00