Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

fxHide.gt-sm/lt-md (or other) does not work for exact pixel breakpoint, probably by design #1096

Closed
sebastiangug opened this issue Jul 9, 2019 · 7 comments

Comments

@sebastiangug
Copy link

Bug Report

What is the expected behavior?

Have a way to use fxHide.gt-sm type of directives to show/hide elements for different breakpoints. For example, hide mobile navigation using [fxHide.gt-sm]="true" and then hide desktop navigation using [fxHide.lt-md]="true"

What is the current behavior?

It works but for the exact pixel value in the example above, the breakpoint is '960px' If the window is exactly 960px, none of the menus show up & there's no way to effectively use the responsive API breakpoints if

What is the use-case or motivation for changing an existing behavior?

Showing something at an exact breakpoint? I'm not sure what the workaround would be and even though the chances for someone having the exact resolution of a breakpoint are slim -- I wouldn't ship a product with that behaviour.

@CaerusKaru
Copy link
Member

Was this fixed by #1075? Can someone confirm by building with the nightly Flex Layout builds? Related to #1081

@sebastiangug
Copy link
Author

@CaerusKaru what's the new functionality? how does it make the choice between what will be hidden/displayed? or is there a new feature like fxHide.eq-sm // fxHide-lt-eq-sm?

I've read a bit through those issues but I'm guessing the old overlapping issue was fixed with the side-effect of not things not working at the exact breakpoint?

@CaerusKaru
Copy link
Member

If you actually look at the commit referenced in the PR I linked, you'll see that lg-XX breakpoints go up to .99px, and then the gt-XX breakpoints start at the next whole integer value (making it really, gte)

@sebastiangug
Copy link
Author

sebastiangug commented Jul 10, 2019

You can read about a bug where on some browsers because of that .99 was too close, it would assign it to the very next value. The issue at hand being that a fix for that bug might've caused this one.

@CaerusKaru
Copy link
Member

At no point do you mention other browsers being an issue. Further, the issue I linked is the literal commit that changes the values from .99 to .9 (I used .99 as a reference, because that was what I remembered, but I was wrong). So please, again, check with the nightly builds to see if that fix actually fixes this issue. Because it seems like it would.

PS You are dangerously close to a CoC violation. I edited your comment to remove the language, but please understand I hold no snark towards you, and my continued responses should indicate a desire to help.

@CaerusKaru
Copy link
Member

Closing without further comment. If there's a development, we can reopen.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants