`@initial` overriding other responsive variant values
See original GitHub issueBug report
Describe the bug
When using the responsive variant syntax I have observed that the @initial
value sometimes overrides what is specified at @md
.
To Reproduce
Code Sandbox: https://codesandbox.io/s/responsive-variants-t11m4?file=/src/App.tsx
- Ensure your screen width > 768px (to trigger the ‘@md’ breakpoint)
- Click the ‘Go to PageB’ link
- Observe that on route
/b
the Icon’s@md
value is being overwritten by the@initial
value - Refresh the Code Sandbox rendering window
- Observe that the
@md
value is now overriding the@initial
value. - Click the ‘Go to PageA’ link
- Observe that the Icon’s
@md
value is being overwritten by the@initial
value
Expected behavior
I would expect that the @initial
value is always overwritten by @md
(when we are above > 768px).
Screenshots
@initial
overwriting @md
:
@md
overwriting @initial
after refresh:
Issue Analytics
- State:
- Created 2 years ago
- Reactions:11
- Comments:5 (1 by maintainers)
Top Results From Across the Web
initial overriding other responsive variant values #737 - GitHub
When using the responsive variant syntax I have observed that the @initial value sometimes overrides what is specified at @md .
Read more >Configuring Variants - Tailwind CSS
When overriding the default variants, make sure you always specify all the variants you'd like to enable, not just the new ones you'd...
Read more >Specificity - CSS: Cascading Style Sheets - MDN Web Docs
Create a separate, short style sheet containing only important declarations specifically overriding any important declarations you were unable ...
Read more >Version 2.1.0 - Chakra UI
Add support for !important in token values as an escape hatch for overriding properties in responsive variants/sizes. <Button variant={["sm", "lg"]} ...
Read more >Breakpoints | Webflow University
You can customize your site design for different screen sizes using Webflow's built-in responsive breakpoints (also known as media queries).
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
Published under
1.2.6
🎉This is now fixed in a release candidate under the version
1.2.6-0
under a canary tag. Should be pretty stable if you’d like to upgrade now but expect a final release sometime next week once we finish migrating our products to use the updated version.Please, don’t hesitate in providing us with any feedback regarding this release. very much appreciated 🙏