Adam Wathan
cfe492220c
Refactor duplication
2018-07-11 11:45:45 -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
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
8333d46cae
Add variant prefix to last class in a selector, not the first
2018-06-20 12:21:14 -04:00
Adam Wathan
1de2a24eb3
Switch to more robust existing CSS escaping library
2018-06-04 09:14:38 -04:00
Adam Wathan
8e8f47c58d
Respect user prefix by default when creating component classes
2018-03-07 09:37:01 -05:00
Adam Wathan
7d589dd542
Fix style + kill unused code
2018-03-07 09:37:01 -05:00
Adam Wathan
c3f021a0c9
Prefix all classes in a selector, don't assume single class
2018-03-07 09:37:01 -05:00
Adam Wathan
d1423bab63
Drop shitty rule/atRule syntax for pure object syntax
2018-03-07 09:37:01 -05:00
Adam Wathan
10be05a167
Get object style parsing working without the insanity
2018-03-07 09:37:01 -05:00
Adam Wathan
6450748351
WIP
2018-03-07 09:37:01 -05:00
Adam Wathan
2feac441e7
Style fixes
2018-03-05 09:58:35 -05:00
Adam Wathan
9234df388e
Add utility helper for creating utility rules that are automatically escaped and respect prefix/important options
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
87b291a258
Test utilities can be added without specifying variants
2018-03-05 09:58:35 -05:00
Adam Wathan
9573024a1b
Expose config as a function to avoid mutation and make it easy to provide defaults
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
d9bc4e658a
Always use function for determining prefixes internally
2018-01-30 07:12:30 -05:00
Emil Tholin
357c87376e
Add support for passing a function as the prefix
2018-01-28 15:55:21 -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
ec19740eb0
Add support for hardcore bloat mode with modules: 'all'
...
Turns on every variant for every module :feelsgood:
2017-11-29 09:38:59 -05:00
Adam Wathan
f84507457f
Extract mergeConfigWithDefaults for easier testability
2017-11-24 12:34:09 -05:00
Adam Wathan
1a5c09c14d
Fix style
2017-11-23 15:03:34 -05:00
Adam Wathan
936a4eeefd
Extract function for generating modules
...
Fully parameterized, makes it easy to test module options behavior
without testing against the entire default module list.
2017-11-23 15:00:52 -05:00
Adam Wathan
0a6c4cc5c6
Use @variants to generate variants specified in config
...
...instead of using variant generators directly.
2017-11-23 12:01:04 -05:00
Adam Wathan
ea8915bef2
Generate responsive/hover variants based on config instead of hard-coded
2017-11-23 11:16:44 -05:00
Adam Wathan
98d5a55c47
Apply responsive and hover at the per-module level, in the main generator
2017-11-23 11:16:44 -05:00
Adam Wathan
2b93b55587
Merge pull request #209 from tailwindcss/error-on-media-apply
...
[0.2] Be more strict about which classes can be `@apply`'d
2017-11-17 09:33:12 -05:00
Adam Wathan
891271ff9d
Add "prefix" and "important" options to config
2017-11-11 08:12:27 -05:00
Adam Wathan
c4305d0c07
Don't allow @applying classes that ever appear inside of an at-rule
...
This is too complex to easily support; better to explicitly error for
now vs. the current behavior which is just silently doing something
other than you probably expect.
2017-11-10 12:18:20 -05:00
David Hemphill
79a2bb39e5
Reformat files
2017-11-06 15:02:02 -05:00
David Hemphill
9dbf5881cd
fix eslint issues
2017-11-06 15:00:55 -05:00
David Hemphill
ec607968cf
Add ESLinting and Prettier formatting and run an initial format on the codebase
2017-11-06 15:00:00 -05:00
Adam Wathan
4478b04090
Don't do any merging of config values at all
...
Leave this up to the user; their config file is a JS file and we give
them access to the default config, so they can do as much merging of
defaults as they like.
2017-10-24 12:13:25 -04:00
Adam Wathan
efe678ddf3
Add focusable at-rule
...
Allows you to wrap up classes to easily generate `.focus:{class}`
variants.
2017-10-21 11:15:25 -04:00
Adam Wathan
c20af3484c
Move default values for borders/rounded/shadows next to modifiers
...
Moves rounded out to it's own `radiuses` config, provide fewer default
shadows, remove `defaults` key, instead add a default to each utility
that has a no-suffix variant.
2017-10-17 14:54:31 -04:00
David Hemphill
42da4528ec
Merge branch 'master' into moar-tests
2017-10-14 00:11:59 -05:00
David Hemphill
ee1659ab76
prevent rules inside media queries from being used as a mixin
2017-10-14 00:11:19 -05:00
Adam Wathan
09a56e794f
Rename 'breakpoint' features to 'screens', support for 'raw' key
2017-10-13 11:39:55 -04:00
Adam Wathan
57cb4159a4
Remove magic color matching from config
...
Make the config just a dumb object instead of doing magic color string
matching. Let people do that sort of thing in their config JS file;
they have the full power of JS there to do whatever they want with
variables and stuff.
2017-10-10 21:24:35 -04:00
Adam Wathan
ba04169e4e
Add support for "tailwind" function to look up config values
2017-10-09 10:42:19 -04:00
Adam Wathan
9a880d43ea
Escape class names provided in @apply
...
Without this, can't mixin stuff like .w-1/4.
2017-10-06 15:40:40 -04:00
Adam Wathan
082fd3a389
Remove dependency on CSSNext
2017-10-06 15:31:45 -04:00
Adam Wathan
f6b4037691
Add min/max width/height + some cleanup
2017-10-05 10:42:04 -04:00
Adam Wathan
2d41a67b29
Add basic set of opacity utilities
2017-09-03 18:26:59 -04:00
Adam Wathan
50ad9dba2b
Refactor config merging to be less absolute trash
...
Needs better tests still.
2017-09-03 09:28:16 -04:00