Skip to content

Help on changing md-sidenav-content to width: 100%? #1341

Closed

Description

@donjae

Hi, I have a question on trying to make md-sidenav-content to have a width of 100%.

Bug, feature request, or proposal:

Md-Sidnav-Content width not modifiable, due to creation of md-sidenav-content tag on build/compiling. AKA, child elements cannot have 100% width of sidenav-content, when md-sidenav-content bases width on child element.

What is the expected behavior?

md-sidenav-content needs to have width: 100%; or at least an option to.

What is the current behavior?

md-sidenav-content width property is only specified when you have a fixed width length for the child content/element. Thus changing the width based on the child property.

BUT if you want the child element to take up the width of the full screen by 100%, it can't, because md-sidenav-content bases width on child element.

What are the steps to reproduce?

Try changing property width property on md-sidenav-content to 100% through src files. Not possible, because it is only instantiated through compilation/build

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

n/a (perhaps flexibility)

Which versions of Angular, Material, OS, browsers are affected?

Latest (2.0 alpha 2.8)

Is there anything else we should know?

n/a

Activity

  1. souppower commented on Oct 21, 2016

    @souppower

    @donjae Adding fullscreen to your md-sidenav-layout might fix your problem, in case you haven't figured it out yet.
    See #1520 #759

  2. donjae commented on Nov 7, 2016

    @donjae
    Author

    @souppower hmm, still not working. You mind giving an example of how you would implement the mixin?

  3. mmalerba commented on Nov 9, 2016

    @mmalerba
    Contributor

    Can you not just target the div with CSS?
    md-sidenav-layout.my-sidenav-layout .md-sidenav-content { width: 100%; }

  4. mmalerba commented on Nov 22, 2016

    @mmalerba
    Contributor

    #1966 adds an example of a fullscreen sidenav

  5. crosshopes commented on Mar 4, 2017

    @crosshopes

    Something I can't understand so far.
    where there is a doc which explains what we can touch this .md-sidenav-content
    I go through the official doc and never see this.
    Does it exist a specification saying what we could use in term of Css properties?

    Thx

  6. angular-automatic-lock-bot commented on Sep 5, 2019

    @angular-automatic-lock-bot

    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.

  7. locked and limited conversation to collaborators on Sep 5, 2019
  8. added
    needs: discussion
    on Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

needs: discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions