Comments (3)
Same question here
from pinceau.
pinceau can distinguish between style logic and code logic in different blocks, and we often have such code in our applications
<template>
<div :style={ color: props. color } class="test"></div>
</template>
<script lang="ts" setup>
defineProps<{ color: string}>()
</script>
<style>
.test {
....
}
</style>
pinceau provides a solution that provides all dynamic styles in a style block
<template>
<div class="test"></div>
</template>
<script lang="ts" setup>
defineProps<{ color: string}>()
</script>
<style lang="ts">
.test {
color: () => props.color
}
I think this solves the problem of having too much style in the logic of the component, allowing developers to switch between focusing on style and focusing on logic
from pinceau.
@SGAMERyu yes, I see the value in this tool. But what is the suggested pattern for setting up default/global styles in a Nuxt 3 app?
from pinceau.
Related Issues (20)
- 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
- 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
- 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
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.