material icon indicating copy to clipboard operation
material copied to clipboard

mdToast position in small (<960) screen size

Open HW-Siew opened this issue 10 years ago • 6 comments

The position of mdToast seems to be reset to default position in small screen even position parameter was set. Is that any way to override this behavior? Thank you. untitled

HW-Siew avatar Dec 29 '15 04:12 HW-Siew

@HW-Siew there's no option to override this behavior, this behavior is following the spec, however i do agree that <960 is way to much and we should consider lower that to xs breakpoint.

EladBezalel avatar Jan 10 '16 22:01 EladBezalel

@HW-Siew according the spec, toast should be full width bottom only on moblie

landscape

according the resonsive ui section respo mobile defined <960 on landscape

EladBezalel avatar Mar 01 '16 00:03 EladBezalel

Hi, @EladBezalel. Thank you. I missed out the spec.

HW-Siew avatar Mar 07 '16 11:03 HW-Siew

I display a toast when a bottom toolbar button is pressed, and on small screens the toast appears over the button that was just pressed, preventing further use of the toolbar until the toast disappears.

I understand we are to follow the spec here, but could you suggest an alternative? As it seems like a bit of an oversight (in the spec)...

code-tree avatar Mar 31 '16 04:03 code-tree

The problem with this default (and with not providing an override) is that mobile devices aren't the only case of small viewports. I'm developing a chrome extension, for instance, which has a max 600x800 viewport, and not being able to place toasts at the top of the view was a real pain. For others who might be having the same issue, here's how I overrode it:

md-toast {
  position:fixed;
  top: 0px;
}

johndshea avatar Nov 04 '16 20:11 johndshea

What they actually thought is the same as @EladBezalel said but what is happening id toast coming at bottom of div not the bottom of screen they missed this point until this is fixed use media queries

@media(max-width : 960px){ md-toast{ position: fixed; bottom: 0; } }

avreddy1996 avatar Aug 16 '17 07:08 avreddy1996