Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom layout-screen-size-threshold in mdl-layout #329

Closed
mscudlik opened this issue Dec 14, 2016 · 1 comment
Closed

Support custom layout-screen-size-threshold in mdl-layout #329

mscudlik opened this issue Dec 14, 2016 · 1 comment

Comments

@mscudlik
Copy link

mscudlik commented Dec 14, 2016

Please add the support for a custom screen size treshhold in mdl-layout.
Currently i can change the sass variable layout-screen-size-threshold to my desired value, but in the layout component a hard coded value is used to detect if a small screen is used. see sass variable here and hard coded value here
Changing only layout-screen-size-threshold leads to a mobile layout where the layout-drawer is still shown.

Using bootstrap4 for example, 768px is used as a treshhold/breakpoint and you cannot get a common look and feel this way.

Thanks a lot for your great work and best regards,
Matthias

@mseemann
Copy link
Owner

will works as follow:

/ * The LAYOUT_SCREEN_SIZE_THRESHOLD can be changed at the root module. Just provide a value for this OpaqueToken:
 *
 * providers: [
 *  {provide:LAYOUT_SCREEN_SIZE_THRESHOLD, useValue: 768 }
 * ]
 *
 * you also need to change the scss variable to the same value: $layout-screen-size-threshold: 768px.
*/
export const LAYOUT_SCREEN_SIZE_THRESHOLD = new OpaqueToken('layoutScreenSizeThreshold');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants