tachyons-css / tachyons-custom

Tachyons with variables: for easy customization
MIT License
204 stars 31 forks source link

Version 4.9.8 is broken #14

Open elios264 opened 4 years ago

elios264 commented 4 years ago

https://github.com/tachyons-css/tachyons-custom/blob/b2da10f7d295c24f8cd1bfdecbd18824aac3aa29/css/tachyons.css#L389

it also returns undefined when building from source, whereas I can with 4.9.6,

and since you removed a bunch of colors it no longer match with what is documented in : https://tachyons.io/docs/table-of-styles/

DrSpez commented 4 years ago

I get the same issue with undefined Seems like _variables.css is not being correctly imported on build Also minified css turns out to be identical to original one

allancole commented 4 years ago

Yeah, I’m having the same exact issue.

It looks like the tachyons-build-css tool is referencing an older version of postcss-css-variables:

https://github.com/tachyons-css/tachyons-custom/blob/b2da10f7d295c24f8cd1bfdecbd18824aac3aa29/package-lock.json#L1856-L1859

The most recent version of postcss-css-variables is 0.17.0.

Troubleshooting

I also did some troubleshooting and when you add a fallback value to the CSS-variable, the fallback appears in the ouput. Here’s an example:

_spacing.css before compiling:

.pa0 { padding: var(--spacing-none); }
.pa1 { padding: var(--spacing-extra-small, 0.25rem); }
.pa2 { padding: var(--spacing-small); }

tachyons.css after compiling:

.pa0 { padding: undefined; }
.pa1 { padding: 0.25rem; }
.pa2 { padding: undefined; }

This make me feel like this is an incorrect options issue in the tachyons build tool itself.

Hoping @mrmrs or @johno can chime in on this sometime soon :-)

allancole commented 4 years ago

Did some digging and figured out what the problem is and solved it in #16.