Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

layout hide is opposite to what is expected #494

Closed
6gsaifulislam opened this issue Oct 29, 2014 · 3 comments
Closed

layout hide is opposite to what is expected #494

6gsaifulislam opened this issue Oct 29, 2014 · 3 comments

Comments

@6gsaifulislam
Copy link

Using Chrome I am getting unexpected results using layout the attribute hide i.e. "hide-sm" so instead of it hiding the element when the screen is small it displays it and when the screen is large it hides it - but is it not as simple as that - it seems to have a mind of it own as to when it is hidden or not.

plunker: http://plnkr.co/edit/Sj4Nh5H8uBo2xERlO5aj?p=preview

@pandaiolo
Copy link
Contributor

xxxx-sm applies the small media query, which means screens width greater than 600px.

What you can do : <div hide block-sm><!-- element expectedly shown/hidden --><div> will hide for mobile, and display as block for small, medium and large screen.

I agree 'small' is a bit misleading, I also believed it was the mobile display. It is not, angular-material is mobile-first, so whatever is applied without media query, is mobile, and the others apply to bigger screens : small (>600), medium and large

@6gsaifulislam
Copy link
Author

Thanks that explains it - but netbeans show errors and reports the following
Attribute "!block-sm" is not serializable as XML 1.0.

Are you inferring that on a none mobile design (i.e. a normal web page) you should define which media query to use - I had assumed this was defined by the browser when running and resized?
Sorry if this seems a stupid question but it is one of the problems of using alpha/beta software is that the documentation is often the last thing to be done!

@rschmukler
Copy link
Contributor

@JohnAReid this will be resolved with the layout changes coming in 0.6.0-rc1. Sorry for the delay on the response. Feel free to open a new issue after that ships if it's not as expected.

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

5 participants