Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@pandacss/shared
Advanced tools
[0.34.0] - 2024-03-06
splitCssProps
typings, it would sometimes throw
Expression produces a union type that is too complex to represent"
import { defineConfig } from '@pandacss/dev'
export default defineConfig({
validation: 'error',
theme: {
semanticTokens: {
colors: {
primary: {
DEFAULT: { value: '#ff3333' },
lighter: { value: '#ff6666' },
},
background: { value: '{colors.primary}' }, // <-- ⚠️ wrong warning
background2: { value: '{colors.primary.lighter}' }, // <-- no warning, correct
},
},
},
})
value
twice in configimport { defineConfig } from '@pandacss/dev'
export default defineConfig({
validation: 'error',
theme: {
tokens: {
colors: {
primary: { value: '#ff3333' },
},
},
semanticTokens: {
colors: {
primary: {
value: { value: '{colors.primary}' }, // <-- ⚠️ new warning for this
},
},
},
},
})
blue.300/70
) in token references:{colors.blue.300/70}
token(colors.blue.300/70)
Note that this works both in style usage and in build-time config.
// runtime usage
import { css } from '../styled-system/css'
css({ bg: '{colors.blue.300/70}' })
// => @layer utilities {
// .bg_token\(colors\.blue\.300\/70\) {
// background: color-mix(in srgb, var(--colors-blue-300) 70%, transparent);
// }
// }
css({ bg: 'token(colors.blue.300/70)' })
// => @layer utilities {
// .bg_token\(colors\.blue\.300\/70\) {
// background: color-mix(in srgb, var(--colors-blue-300) 70%, transparent);
// }
// }
// build-time usage
import { defineConfig } from '@pandacss/dev'
export default defineConfig({
theme: {
tokens: {
colors: {
blue: {
300: { value: '#00f' },
},
},
},
semanticTokens: {
colors: {
primary: {
value: '{colors.blue.300/70}',
},
},
},
},
})
@layer tokens {
:where(:root, :host) {
--colors-blue-300: #00f;
--colors-primary: color-mix(in srgb, var(--colors-blue-300) 70%, transparent);
}
}
Deprecates emitPackage
, it will be removed in the next major version.
It's known for causing several issues:
node_modules
, leading to panda codegen
updates to the styled-system
not
visible in the browser../styled-system/css
instead of styled-system/css
)#styled-system/css
instead of
styled-system/css
@acme/styled-system
) and use importMap: "@acme/styled-system"
so that Panda knows which entrypoint to
extract, e.g. import { css } from '@acme/styled-system/css'
FAQs
Shared utilities for css panda
The npm package @pandacss/shared receives a total of 59,566 weekly downloads. As such, @pandacss/shared popularity was classified as popular.
We found that @pandacss/shared demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.