Comments (2)
yep, having the same problem right now.
That's bcoz of the missing utils
field in defineTheme({})
config. Passing an empty object utils: {}
doesn't work either.
Why it happens
Seems like Pinceau
generates wrong node_modules/.vite/pinceau/utils.ts
file in this case:
import { PinceauTheme, PropertyValue } from 'pinceau'
export const utils = undefined
export type GeneratedPinceauUtils = typeof utils
export default utils
And then CssFunctionType
takes GeneratedPinceauUtils
as a generic and returns never
.
Workaround
You can set a padding utility or anything else:
defineTheme({
...,
utils: {
px: (value: PropertyValue<"padding">) => ({
paddingLeft: value,
paddingRight: value,
}),
},
})
Make sure to restart your dev server (to trigger pinceau rebuild) and Vue/TS server after this.
from pinceau.
Hello @agenordebriat and @blinpete ;
Thank you so much for your interest in Pinceau, I'm really glad to hear that.
I'm currently working on #95 ; that will greatly improve the situation concerning typing support.
As for now, I can confirm the bug you mention is fixed in my current workspace.
I will close this issue once the PR gets merged, happy to get your feedpack on upcoming 1.0 release!
from pinceau.
Related Issues (20)
- Formatting in `<style lang="ts">` blocks
- Tokens are not working for me (Vite + Vue 3 ) HOT 1
- When importing version 1.0 of Pinceau, TypeScript is giving some issues.
- After installing @pinceau/vue, I encountered a strange error.
- The declaration file for @pinceau/vue/plugin cannot be found.
- Default $dt() to return value
- Where to apply basic styles (Nuxt 3) HOT 3
- pinceau/dist/index.mjs does not provide an export named 'PinceauTheme'
- Some examples broken under windows
- Not working with nuxt HOT 2
- Compound variants support
- Is this project abandoned ? 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)
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.