Coder Social home page Coder Social logo

Nested alias values about theo HOT 3 OPEN

hmalaud avatar hmalaud commented on June 2, 2024 1
Nested alias values

from theo.

Comments (3)

dayton-bobbitt avatar dayton-bobbitt commented on June 2, 2024

Hi @hmalaud, did you ever find out if nesting aliases / props is possible?

I'm hoping to accomplish something like the following:

props:
  color:
    border:
      button:
        value: "#000"
    background:
      button:
        value: "#FFF"

Which would generate the following Sass variables:

$color-border-button: #000 !default;
$color-background-button: #FFF !default;

from theo.

hmalaud avatar hmalaud commented on June 2, 2024

Hello @dayton-bobbitt , unfortunately I wasn't able to make it work this so I forked the project and made something that was working for me back then: https://github.com/hmalaud/theo. I wanted something like this to be loopable, so I'm not sure this is exactly what you're looking for:

props:
  -
    name: bg-color
    value: '#whatever'
    type: color
  -
    name: color
    value: '#whatever'
    type: color
  -
    name: light-color
    value: '#more-whatever'
    type: color

I can't promise it will work for you, but when I tried it 3/4 months ago, it was still working with the latest updates from theo! 🤞🏻

from theo.

dayton-bobbitt avatar dayton-bobbitt commented on June 2, 2024

Thanks @hmalaud! I'm currently exploring tools we can use to generate design tokens with cross-platform support, so I definitely keep this in mind.

from theo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.