Skip to content

adding inherit as a "colour" #96

@danielepolencic

Description

@danielepolencic

Please close if not relevant.

I'm trying to replicate the "original" tachyons CSS library from tachyons.io website using this generator.
Reasoning: we want to migrate to the generator and customise existing scales and values, but we want the transition to happen gradually as we don't have the resources to rewrite everything in one go.

We currently have a config.json which is very close to the css library hosted on the main website.
Unfortunately, we use one "colour" inherit which is in the main project but cannot be added to the generator.
As soon as you add:

{
  "colors": {
    "inherit": "inherit"
  }
}

The library fails with the following error:

Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
Node#moveTo was deprecated. Use Container#append.
(node:6464) UnhandledPromiseRejectionWarning: Error: Unable to parse color from string "inherit"
    at new Color (/Users/pole/Sites/learnk8s/learnk8s.io/node_modules/colorable/node_modules/color/color.js:31:15)
    at Color (/Users/pole/Sites/learnk8s/learnk8s.io/node_modules/colorable/node_modules/color/color.js:7:41)
    at /Users/pole/Sites/learnk8s/learnk8s.io/node_modules/colorable/index.js:30:21
    at /Users/pole/Sites/learnk8s/learnk8s.io/node_modules/colorable/node_modules/lodash/index.js:3073:15
    at Function.forIn (/Users/pole/Sites/learnk8s/learnk8s.io/node_modules/colorable/node_modules/lodash/index.js:3362:16)
    at module.exports (/Users/pole/Sites/learnk8s/learnk8s.io/node_modules/colorable/index.js:29:9)
    at Colorable (/Users/pole/Sites/learnk8s/learnk8s.io/node_modules/tachyons-generator/docs/components/Colors.js:51:5)
    at module.exports (/Users/pole/Sites/learnk8s/learnk8s.io/node_modules/tachyons-generator/docs/components/Colors.js:77:17)
    at module.exports (/Users/pole/Sites/learnk8s/learnk8s.io/node_modules/tachyons-generator/docs/components/Styleguide.js:21:5)
    at module.exports (/Users/pole/Sites/learnk8s/learnk8s.io/node_modules/tachyons-generator/docs/index.js:9:23)
(node:6464) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6464) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Is there any workaround available?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions