Skip to content

Fix undefined variables issue - #16

Open
allancole wants to merge 4 commits into
tachyons-css:mainfrom
allancole:fix/issue-14-undefined-variables
Open

Fix undefined variables issue#16
allancole wants to merge 4 commits into
tachyons-css:mainfrom
allancole:fix/issue-14-undefined-variables

Conversation

@allancole

@allancole allancole commented May 10, 2020

Copy link
Copy Markdown
  • Add --preserve-variables option to allow CSS-variables to appear in output.
  • Update --minify option to make minification work again.
  • Fix :root selector typo.
  • Recompile the CSS with all the CSS-variables intact :-)

Fixes: #14

Allan Cole added 3 commits May 9, 2020 20:44
- Add `--preserve-variables` option to allow CSS-variables to appear in output.
- Update `--minify` option to make minification work again.
@jalcine

jalcine commented Jun 15, 2020

Copy link
Copy Markdown

gently bumps this PR

@jalcine

jalcine commented Jul 11, 2020

Copy link
Copy Markdown

I’ve had to downgrade my library in order to keep things working. Is there any interest in merging these changes to keep this library working?

(Originally published at: https://v2.jacky.wtf/post/002b6721-da8f-4a04-a904-fd376e10ce3e)

@orionrush

orionrush commented Jul 11, 2020 via email

Copy link
Copy Markdown

@allancole

Copy link
Copy Markdown
Author

@mrmrs / @johno, do either of you have a second to review and merge this small but necessary PR :-)

@bradobro

Copy link
Copy Markdown

@allancole thanks for the fix, really helped me out.

I'm cool with this patch, but noticed that correcting _variables.css (root: should be :root) is the only fix needed to restore former behavior.

The --preserve-variables is great for new browsers. Thanks for highlighting that. I'd like to see package.json stay as you propose here, but maybe add a script, npm legacy:css to hard code custom props.

Thanks again for the fix!

@Spittal

Spittal commented Sep 15, 2020

Copy link
Copy Markdown

I kind of think that the Tachyons team doesn't care about this repository. But there's a lot of variables that are used in source that are not defined in the variables.css for example:

    --border-width-none: 0;
    --border-width-1: 0.2rem;
    --border-width-2: 0.4rem;
    --border-width-3: 0.8rem;
    --border-width-4: 1.6rem;
    --border-width-5: 3.2rem;

    --black: #000;
    --near-black: #111;
    --dark-gray: #333;
    --mid-gray: #555;
    --gray: #777;
    --silver: #999;
    --light-silver: #aaa;
    --moon-gray: #ccc;
    --light-gray: #eee;
    --near-white: #f4f4f4;
    --white: #fff;
    --transparent: transparent;
    --black-90: rgba(0,0,0,.9);
    --black-80: rgba(0,0,0,.8);
    --black-70: rgba(0,0,0,.7);
    --black-60: rgba(0,0,0,.6);
    --black-50: rgba(0,0,0,.5);
    --black-40: rgba(0,0,0,.4);
    --black-30: rgba(0,0,0,.3);
    --black-20: rgba(0,0,0,.2);
    --black-10: rgba(0,0,0,.1);
    --black-05: rgba(0,0,0,.05);
    --black-025: rgba(0,0,0,.025);
    --black-0125: rgba(0,0,0,.0125);
    --white-90: rgba(255,255,255,.9);
    --white-80: rgba(255,255,255,.8);
    --white-70: rgba(255,255,255,.7);
    --white-60: rgba(255,255,255,.6);
    --white-50: rgba(255,255,255,.5);
    --white-40: rgba(255,255,255,.4);
    --white-30: rgba(255,255,255,.3);
    --white-20: rgba(255,255,255,.2);
    --white-10: rgba(255,255,255,.1);
    --white-05: rgba(255,255,255,.05);
    --white-025: rgba(255,255,255,.025);
    --white-0125: rgba(255,255,255,.0125);

As of 4.9.8 all of these variables are being referenced in source, but aren't in the variables file. It might be worth adding them back in.

@bradobro

bradobro commented Sep 16, 2020 via email

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Version 4.9.8 is broken

5 participants