4079 Commits

Author SHA1 Message Date
Adam Wathan
bef8775818 Source fontStyle options from config 2019-02-28 11:59:54 -05:00
Adam Wathan
90e28a087a Source fontSmoothing options from config 2019-02-28 11:59:37 -05:00
Adam Wathan
db0a283dea Source fontSize options from config 2019-02-28 11:59:17 -05:00
Adam Wathan
444236c427 Source fontFamily options from config 2019-02-28 11:58:49 -05:00
Adam Wathan
1f7f9e394e Source float options from config 2019-02-28 11:58:21 -05:00
Adam Wathan
5504bd1360 Source flexWrap options from config 2019-02-28 11:57:07 -05:00
Adam Wathan
b850ba2885 Source flexShrink options from config 2019-02-28 11:56:46 -05:00
Adam Wathan
f7a2411a96 Source flexGrow options from config 2019-02-28 11:56:01 -05:00
Adam Wathan
9c1104a709 Source flexDirection options from config 2019-02-28 11:55:37 -05:00
Adam Wathan
f355af33c4 Source flex options from config 2019-02-28 11:54:37 -05:00
Adam Wathan
35442918ee Fix mistakes 2019-02-28 11:53:36 -05:00
Adam Wathan
35094c9804 Source fill options from config 2019-02-28 11:52:39 -05:00
Adam Wathan
3ca9e20ed2 Source display options from config 2019-02-28 11:52:18 -05:00
Adam Wathan
d9bdafecf4 Source cursor options from config 2019-02-28 11:52:00 -05:00
Adam Wathan
8e5a744237 Source boxShadow options from config 2019-02-28 11:51:23 -05:00
Adam Wathan
ae7d2a1ff1 Source borderWidth options from config 2019-02-28 11:50:56 -05:00
Adam Wathan
a3c3007a81 Source borderStyle options from config 2019-02-28 11:50:27 -05:00
Adam Wathan
4378cb629b Source borderRadius options from config 2019-02-28 11:50:01 -05:00
Adam Wathan
517743513f Source borderColor options from config 2019-02-28 11:41:28 -05:00
Adam Wathan
0f66ec4a97 Source borderCollapse options from config 2019-02-28 11:40:54 -05:00
Adam Wathan
28ad7b9e2d Source backgroundSize options from config 2019-02-28 11:40:31 -05:00
Adam Wathan
6d9cff798d Source backgroundRepeat options from config 2019-02-28 11:39:59 -05:00
Adam Wathan
237baa3188 Source backgroundPosition options from config 2019-02-28 11:37:02 -05:00
Adam Wathan
6f1852adf2 Source backgroundColor options from config 2019-02-28 11:36:26 -05:00
Adam Wathan
89fc1e42bc Source backgroundAttachment options from config 2019-02-28 11:35:34 -05:00
Adam Wathan
a973e84ceb Source appearance options from config 2019-02-28 11:34:58 -05:00
Adam Wathan
b08455b8a1 Source alignSelf options from config 2019-02-28 11:34:18 -05:00
Adam Wathan
d0460f7e0d Source alignItems options from config 2019-02-28 11:33:50 -05:00
Adam Wathan
31b9466cc7 Source alignContent options from config 2019-02-28 11:33:08 -05:00
Adam Wathan
8cf5bc1537
Merge pull request #695 from tailwindcss/manually-escape-variants
Require plugin authors to manually escape variants
2019-02-28 11:11:45 -05:00
Adam Wathan
583caeac89
Merge pull request #691 from tailwindcss/new-shadows
Update default box shadows
2019-02-28 11:11:11 -05:00
Adam Wathan
007231fbfc Require plugin authors to manually escape variants
Not 100% convinced this is a net positive change, but I regret not having done things this way at the beginning.

In 0.x, we pass the `separator` and `className` values already escaped, so `:` comes through as `\:` for example, and `w-1/2` comes through as `w-1\/2`.

At first this sounds fine, less work for the plugin author right? But CSS escaping rules are kind of complicated and you have to escape characters differently depending on whether or not they are at the start of an identifier.

For example, it's totally fine for a class to contain a zero (`0` ), but it can't _start_ with a zero. For a class to start with a zero, it needs to be escaped like this: `\30 `

This means that as a general rule, trying to escape the individual segments of a class separately is a bad idea — you should escape the class as a whole so only the necessary escaping is applied. We break this rule when we pre-escape the separator and className for plugin authors who use the `modifySelectors` function.

We already require users to manually escape class names when they are using `addUtilities` or `addComponents`, so to me it feels more consistent for things to work this way and it's how they should have worked from day one.

Basically this code:

```js
function({ addVariant }) {
  addVariant('first-child', ({ modifySelectors, separator }) => {
    modifySelectors(({ className }) => {
      return `.first-child${separator}${className}:first-child`
    })
  })
},
```

...would need to be re-written like this if I merge this change:

```js
function({ addVariant, e }) {
  addVariant('first-child', ({ modifySelectors, separator }) => {
    modifySelectors(({ className }) => {
      return `.${e(`first-child${separator}${className}`)}:first-child`
    })
  })
},
```

Although I think this is the right way for this to work, I hesitate because it's a breaking change that makes any variant plugins authored for 0.x incompatible with 1.x. It's an easy fix on the plugin author's part, but it's still annoying.

I'm leaning towards merging so I don't regret this even more later when the plugin ecosystem is a lot bigger. Anyone have any thoughts?
2019-02-28 10:17:09 -05:00
Adam Wathan
1d685a0557
Merge pull request #694 from tailwindcss/update-selector-parser
Leverage built-in escape handling in postcss-selector-parser
2019-02-28 08:48:07 -05:00
Adam Wathan
92d3bcfa6a Update shadows to incorporate progressive negative spread 2019-02-28 07:46:26 -05:00
Adam Wathan
361ffb6a2c Update fixtures 2019-02-27 20:31:53 -05:00
Adam Wathan
acf719b7a1 Add new shadows (need to update fixtures though) 2019-02-27 20:31:53 -05:00
Florian Bouvot
3fa1a0054f Fix order 2019-02-27 22:46:12 +01:00
Adam Wathan
5e935c10f7 Remove dependency on cssesc
Makes it easier to guarantee that our escape behavior stays in line with postcss-selector-parser if their internal implementation ever changes.
2019-02-27 16:40:19 -05:00
Florian Bouvot
9dc51a8d5e Add order utility 2019-02-27 21:59:23 +01:00
Adam Wathan
2f79cab8fa Switch from css.escape to cssesc
This is what postcss-selector-parser uses internally, best to rely on the same escaping logic everywhere.
2019-02-27 13:53:28 -05:00
Adam Wathan
b8f1078229 Use postcss-selector-parser class escape handling 2019-02-27 13:43:26 -05:00
Adam Wathan
cdb3bfddfa Update postcss-selector-parser 2019-02-27 13:42:44 -05:00
Adam Wathan
0d93dc8d54 Ignore index.html
I use this file with live-server for random testing when developing
locally. Totally worth cluttering up the .gitignore for the
convenience. #sorrynotsorry
2019-02-27 13:31:13 -05:00
Adam Wathan
4eb90a6aa3
Merge pull request #690 from tailwindcss/configure-flex-grow-shrink
Make flex-grow/shrink customizable
2019-02-26 14:03:27 -05:00
Adam Wathan
12dafbe1b1 Make flex-grow/shrink customizable 2019-02-26 13:45:12 -05:00
Adam Wathan
ef603120b1
Merge pull request #689 from tailwindcss/split-flexbox
Split flexbox plugin into multiple plugins
2019-02-26 10:45:54 -05:00
Adam Wathan
2b89e09409 Split flexShrink to separate plugin 2019-02-26 10:33:34 -05:00
Adam Wathan
06ef9557b3 Split flexGrow to separate plugin 2019-02-26 10:30:44 -05:00
Adam Wathan
7af36e1274 Split flex into separate plugin 2019-02-26 10:25:06 -05:00
Adam Wathan
13b81f0b5c Split alignContent into separate plugin 2019-02-26 10:19:55 -05:00