sakamies / postcss-gridlover

Enables using Gridlover sx and gr units in your CSS
MIT License
13 stars 1 forks source link

Getting error with Node 6.9.1LTS #5

Open anthonykasabian opened 7 years ago

anthonykasabian commented 7 years ago

src/node_modules/postcss-gridlover/rulecomputer.js:64 computedValue = scaleStack[scaleIndex].autoLineHeight; ^ TypeError: Cannot read property '0' of undefined

Cant exectue the buildTask.

:root { / colors / --color--primary-brand-darker: #0a7aa8; --color--primary-brand: #0093d0; --color-bright: #fff; --color-dark: #333; --color-disabled: #939393; --color-light: #f5f5f5; --color-secondary-brand-darker: #ca6e14; --color-secondary-brand: #ef861f;

/* fonts */
--primary-font: "FSAlbertPro-Regular", Arial, Helvetica, "Nimbus Sans L", sans-serif;
--secondary-font: "FSAlbertPro-Bold", Arial, Helvetica, "Nimbus Sans L", sans-serif;

/* font size */
/* stylelint-disable */
--base-font-size: 14px; /* Must be in pixels */
--base-line-height: 1.6; /* Must be a decimal number */
--base-scale-factor: 1.618; /* Must be a decimal number */
--base-units: px; /* px, rem, em */
--h1-font-size: 3sx;
--h2-font-size: 2sx;

and in global.css calling: html { font-size: var(--base-font-size); min-width: 320px; overflow-x: hidden; }

sakamies commented 7 years ago

Hmm that's odd. Did you get this working? I think I'll have time to take a look at this this weekend.

anthonykasabian commented 7 years ago

Ok deepdive into my setup. it was not a problem with node. The problem occurs if you import css. E.g. i have a style.css. I'm importing my _base.css and my _typography.css. But at runtime the plugin is not able to find the values. so it only works in the main style.css.