question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adaptive borders to color mode change

See original GitHub issue

What’s the easiest way to make border colors change based on color mode?

Since this is not allowed

borders: {
  base: '1px solid primary'
}

currently, I do the following

borders: {
  base: `1px solid ${palette.primary}`
}

Given how I define borders now, is there an easy way to make it adapt to color mode?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jxnblkcommented, Dec 18, 2019

For shorthand properties, you can use functional values, or you can use the borderColor property

0reactions
jxnblkcommented, Dec 19, 2019

You can also use variants with either borderColor or functional values

Read more comments on GitHub >

github_iconTop Results From Across the Web

Convert between color modes in Photoshop - Adobe Support
Learn how to use Adobe Photoshop to convert an image from one color mode to another, such as CMYK to RGB or color...
Read more >
Windows High Contrast Mode, Forced Colors Mode And CSS ...
The reason for doing so is a highly intentional tweak. It takes the thin outline border and makes it dramatically thicker.
Read more >
forced-colors - CSS: Cascading Style Sheets - MDN Web Docs
In forced colors mode, the values of the following properties are treated as if they have no author-level values specified. That is, browser- ......
Read more >
Interesting CSS Features You Should Know - Nelio Software
Switch to WordPress safely while keeping your design and content ... @media ( min-width: 400px ) { .colored-border { border-color: orange; } ...
Read more >
Adaptive icons - Android Developers
Provide two layers for the color version of the icon: one for the foreground, and one for the background. An example of a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found