components icon indicating copy to clipboard operation
components copied to clipboard

Sidenav blocking toolbar shadow - CSS

Open AmirTugi opened this issue 10 years ago • 5 comments

I am using the toolbar above the sidenav + sideav layout. Recently I have noticed that the toolbar shadow does not show up. I thought I needed to configure it by myself, but after a while I figured that it is the sidenav layout who is blocking me from seeing the shadow.

See this plunker

Tried to understand by myself what is going on over there, and why I can't stop this peculiar scenario, but to no avail.

What I want, obviously, is that the shadow of the md-toolbar to be displayed :)

AmirTugi avatar Oct 04 '16 17:10 AmirTugi

I'd rather say this is a css problem than a bug. The md-sidenav-layout has a default background-color which is not transparent. You can override it using inline style (or css file, theme, whatever) to make the layout background transparent.

<md-sidenav-layout style='width: 50%; background-color: rgba(255,255,255,0)'>

Or you can make the tool-bar's layer in top of sidenav-layout

<md-toolbar color="primary" style="box-shadow: 0 5px 5px #999;z-index: 1;position: relative;">

chouclee avatar Oct 04 '16 19:10 chouclee

Oh, that position: relative solved it. But how? Why?

AmirTugi avatar Oct 04 '16 21:10 AmirTugi

@AmirTugi Did you mean why position: relative is needed to make it z-index: 1 work?

chouclee avatar Oct 05 '16 20:10 chouclee

closing since this was just a CSS issue

mmalerba avatar Aug 02 '17 23:08 mmalerba

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.