Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(recipes): recipe.staticCss colocation #1765

Conversation

astahmer
Copy link
Collaborator

@astahmer astahmer commented Dec 4, 2023

Closes https://panda-css.canny.io/feature-request/p/tree-shaking-settings-in-definerecipe

📝 Description

Add a way to specify a recipe's staticCss options from inside a recipe config, e.g.:

import { defineRecipe } from '@pandacss/dev'

const card = defineRecipe({
  className: 'card',
  base: { color: 'white' },
  variants: {
    size: {
      small: { fontSize: '14px' },
      large: { fontSize: '18px' },
    },
  },
  staticCss: [{ size: ['*'] }],
})

would be the equivalent of defining it inside the main config:

import { defineConfig } from '@pandacss/dev'

export default defineConfig({
  // ...
  staticCss: {
    recipes: {
      card: {
        size: ['*'],
      },
    },
  },
})

💣 Is this a breaking change (Yes/No):

no

📝 Additional Information

Copy link

changeset-bot bot commented Dec 4, 2023

🦋 Changeset detected

Latest commit: e9935c6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 20 packages
Name Type
@pandacss/generator Patch
@pandacss/types Patch
@pandacss/core Patch
@pandacss/node Patch
@pandacss/parser Patch
@pandacss/dev Patch
@pandacss/config Patch
@pandacss/fixture Patch
@pandacss/preset-atlaskit Patch
@pandacss/preset-base Patch
@pandacss/preset-panda Patch
@pandacss/studio Patch
@pandacss/token-dictionary Patch
@pandacss/postcss Patch
@pandacss/astro Patch
@pandacss/error Patch
@pandacss/extractor Patch
@pandacss/is-valid-prop Patch
@pandacss/logger Patch
@pandacss/shared Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Dec 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
panda-docs ✅ Ready (Inspect) Visit Preview Dec 4, 2023 10:22pm
panda-playground 🛑 Canceled (Inspect) Dec 4, 2023 10:22pm
panda-studio 🛑 Canceled (Inspect) Dec 4, 2023 10:22pm

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.

None yet

2 participants