Comments (6)
Maybe using https://github.com/unjs/theme-colors?
from pinceau.
Hi,
I'm using Pinceau through Docus and from v1.8.x to v1.9.x, the
palette
function disappeared. How can I convert my code?import { defineTheme, palette } from 'pinceau' export default defineTheme({ color: { primary: palette('orange') } })
In the new version, Pinceau has removed the util export of the palette. You can refer to https://github.com/Tahul/pinceau/blob/6f92a673469cb71f8af3530e75015cc14b56b533/src/utils/palette.ts for the usage of token design.
I guess the author's @Tahul initial design was probably intended to validate a portion of the design and the implemented utility functions, which may not be part of the official API provided by Pinceau.
from pinceau.
Yes, I replace it with
export default defineTheme({
color: {
primary: {
50: '#fff7ed',
100: '#ffedd5',
200: '#fed7aa',
300: '#fdba74',
400: '#fb923c',
500: '#f97316',
600: '#ea580c',
700: '#c2410c',
800: '#9a3412',
900: '#7c2d12',
}
}
})
But more documentation about this could be awesome
from pinceau.
Whoo thanks 👀
from pinceau.
Another approach: https://github.com/nuxt-modules/design-tokens/blob/main/src/palette.ts
from pinceau.
The question have now an anwser.
from pinceau.
Related Issues (20)
- Formatting in `<style lang="ts">` blocks
- Tokens are not working for me (Vite + Vue 3 ) HOT 1
- How to add other color variants ?
- support tsx
- Unexpected TS issue with the type of css function HOT 4
- Migrate to magicast HOT 4
- support css support synatx
- wrong order applied for responsive tokens
- wrong order applied for responsive tokens HOT 1
- Is it possible to import other functions in <style lang="ts"> HOT 2
- Getting warning on setting variant options default as true when using BooleanVariant HOT 2
- cssProp doesn't seems to work HOT 1
- Can we support multiple variants of this form?
- Typescript does not distribute media keys into ComputedStyleProp in TS 5.x
- responsive value under css property HOT 1
- Broken with latest version of Nuxt HOT 5
- How to inspect the source of css? HOT 1
- Switching to monorepo HOT 1
- Sourcemap is likely to be incorrect: a plugin (pinceau-transforms)
- css function properties autocompletion not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pinceau.