Allow mixins to be used in default styles and imported across projects

Could we get the following:

  1. Include mixins from imported project (does not look like they are currently)
  2. Use mixins when defining default styles
  3. Allow mixins to change across global variants
  4. Allow swapping one included project with another
    Usecase:
    • We have our “design system” in a separate project and import it into our website project (for extensibility)
    ◦ Defines tokens, default styles, components, etc.
    • (2) In design system, would be nice to create a “h1” mixin and then use it to define the H1 default style so we only have to define header style once, and can use the mixin or the tag depending on whether we want the style or also the tag… (3) is needed to make this work fully…
    • (1) We would also want this h1 mixin to be imported into our primary project from the design system project
    • (4) When making updates to the design system, would be nice to make this in a copy, and be able to switch over to it when ready…

Hmm, mixins should be getting imported along with other objects from the upstream project… Do you have an example project I can debug with, and just to sanity check, the mixins are in the published version that was subsequently imported/updated in the downstream project?

Also, it should be possible to switch your default styles to using the ones that are defined in an imported project

All that said, I do also think it would be nice to use mixins in default styles!

For 4, we are working on branching as a first class feature in general

@yang for the mixing import, I am trying to export “test export mixin” from https://studio.plasmic.app/projects/mrgn3VC2r6s7VB3wKPe7xp to https://studio.plasmic.app/projects/k5wi36LTCNmnJb5rh2sgis, but I cannot see the mixins section in the sidebar… however I see now that the mixins are available regardless when trying to add a mixin to an element. I was confused here, because for other exported properties, they show up in the sidebar (see screenshot)

We are using default styles exported from the project. This is working well.

Mixins are a bit hampered by not supporting breakpoints though… They should be able to support breakpoints in the same way default styles do… Would make them much more useful…

  1. Great, I am excited to learn more :slightly_smiling_face:

(Btw: you guys are doing amazing work, and I highly appreciate how you are interacting with the community)

image.png