[Theme] Layer Styles
See original GitHub issueFeature request
On Discord, the following question came up:
How can I specify coherent layer styles for light and dark mode? in regards to these docs.
Is your feature request related to a problem? Please describe.
This sounds like a great idea, but I’d prefer to not specify “success-light” and “success-dark”, and then decide which one I want to use in my client code.
Describe the solution you’d like
layerStyles
should accept a function and be colormode-aware:
layerStyles: (props) => ({
base: {
bg: mode('gray.100', 'gray.900')(props),
}
})
Additional context
theme.styles.global
do this already.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Free Layer Styles designs, themes, templates and ... - Dribbble
Free Layer Styles. Inspirational designs, illustrations, and graphic elements from the world's best designers. Want more inspiration?
Read more >Photoshop Layer Styles - Creative Market
Explore more than 2K Photoshop layer styles including paper, wood, neon, gold, and metal layer styles that make creating striking visuals a breeze....
Read more >Introduction to Photoshop Layer Styles - Design & Illustration
Photoshop layer styles are a popular way to add effects, such as drop shadows and strokes, to layers in a non-destructive way. With...
Read more >Text and Layer Styles - Chakra UI
Layer Styles allow you to save a combination of styling attributes to re-use in other components. Once created, pass the layerStyle prop to...
Read more >Fantastic Collection Of Photoshop Layer Styles | 2022
10 Photoshop Text Effects By Artorious Design photoshop layer style · Dark Orb Layer Styles photoshop layer style · Vista Glass Style ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thinking about this. I’d recommend using a className approach to solve this.
We append a
className
todocument.body
and you can leverage that className within the text and layer style. More like this:Over time, we might encourage using this approach rather than the functional approach. I have some ideas around making this work but It might complicate the code a bit and I’d rather avoid it.
I am talking about actually implementing it, so users can do it in the theme. I can’t see a way to access the
colorScheme
in thestyleResolver
function, so I could pass it to user’s theme.