[Box] Property 'outline' should accept theme colors
See original GitHub issueDescribe the bug A clear and concise description of what the bug is.
Using eg. outline="red.500"
it’s left as-is instead of transforming it to correct color.
Expected Behavior A clear and concise description of what you expected to happen.
Color should be transformed.
@chakra-ui/core: 0.8.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
outline - CSS: Cascading Style Sheets - MDN Web Docs
There are a few properties that affect an outline's appearance. It is possible to change the style, color, and width using the outline...
Read more >Change the colors in a text box or shape - Microsoft Support
On the Drawing Tools Format tab, click Shape Outline and, under Theme Colors, pick the color you want. Shape Styles commands on the...
Read more >Style Props - Chakra UI
The following table shows a list of every style prop and the properties within ... `theme.colors.gray[50]` ... <Box border='1px' borderColor='gray.200'>.
Read more >Theme Configuration - Tailwind CSS
The theme object contains keys for screens , colors , and spacing , as well ... Out of the box, your project will...
Read more >Global Theme Properties - Grommet
An object can be passed with a color and opacity or with a dark and light value. color can accept either a string...
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
Hi @FredyC,
I agree with @with-heart.
outline
is a shorthand property foroutline-width
,outline-color
, andoutline-style
. It depends on what you want to achieve.outline: 2px solid
, and thenoutlineColor: red.500
,theme.shadows.outline
borderColor
As regards accessibility, the goal of an outline is to indicate where the user’s focus is at any point in time. You can achieve that with any of the 3 options above.
Hope this helps.
Cheers.
Well, so
outlineColor
and others are part of the upcoming 1.x only as it seems. I don’t feel like upgrading just because of that and deal with other changes.The
theme.shadows.outline
would be lovely as a unified way, but it only setsbox-shadow
property, not theoutline
.And the border is not that great option either because sometimes I used it for a different thing.
I will cope somehow, just stating how it is.