Breakpoint objects/aliases
See original GitHub issueHi there, is the below Styled System syntax supported in Theme UI? It doesn’t appear to be working when using the pragma like this: (none of the styles are being applied at all)
<div
sx={{
bg: { _: "green", sm: "red", md: "blue" },
}} >
Thanks!
https://github.com/styled-system/styled-system/blob/master/docs/responsive-styles.md#using-objects
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Debugger Data Model Function Aliases - Windows drivers
Function aliases are a quick unique short name by which a user of the debugger can access functionality defined in a debugger extension....
Read more >LLDB Where are the builtin aliases - debugging - Stack Overflow
Set a breakpoint using a regular expression to specify the location, where <linenum> is in decimal and <address> is in hex.
Read more >Debugging Scripts - Zugg Software
You can set Object Breakpoints on Aliases, Triggers, and Variables. To set an object breakpoint, go into the Settings Editor. Right-click on the...
Read more >Responsive Styles - Chakra UI
You can also define responsive values with breakpoint aliases in an object. Any undefined alias key will define the base, non-responsive value.
Read more >Alias 2022 Help | Debugging a plug-in in Windows | Autodesk
Invoke the plug-in and the appropriate code path to hit the breakpoint. In the Microsoft Visual C++ application: Step through the source interactively....
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 Free
Top 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
@jxnblk We’re using
theme-ui
in our shared component library in our organisation and we really appreciate the{ _: '12px', xl: '16px' }
object style when using styled-system props. We get quite a few questions from devs regarding why this syntax doesn’t exist with thesx
prop.It’s a really nice syntax, as if you add/remove/change breakpoints, you don’t need to update any arrays. It’s also a lot more concise to code. We’d love to see it added 😃
I share the sentiment with others @jxnblk. While
breakpoints
array makes for a concise definition and usage, any refactoring can quickly get out of hand when these values shift by 1. I am not sure what the syntax would look like, but I’d personally find it better to explicitly define the array, e.g.[query.sm, query.md, query.lg]
.