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.

`@initial` overriding other responsive variant values

See original GitHub issue

Bug 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

  1. Ensure your screen width > 768px (to trigger the ‘@md’ breakpoint)
  2. Click the ‘Go to PageB’ link
  3. Observe that on route /b the Icon’s @md value is being overwritten by the @initial value
  4. Refresh the Code Sandbox rendering window
  5. Observe that the @md value is now overriding the @initial value.
  6. Click the ‘Go to PageA’ link
  7. 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:

image

@md overwriting @initial after refresh:

image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:11
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
hadihallakcommented, Dec 2, 2021

Published under 1.2.6 🎉

1reaction
hadihallakcommented, Nov 18, 2021

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 🙏

Read more comments on GitHub >

github_iconTop 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 >

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