mdb-ui-kit icon indicating copy to clipboard operation
mdb-ui-kit copied to clipboard

Adding a shadow to arbitrary elements?

Open andersodt opened this issue 10 years ago • 6 comments

I am looking to add shadows to various elements at will (like the navbar) -- is there currently an easy way to do this?

andersodt avatar Jan 12 '16 19:01 andersodt

Sure, include the shadows.less or sass file and do something like @include shadow-2dp() sass or .shadow-2dp() less.

rosskevin avatar Jan 12 '16 20:01 rosskevin

Is there no way to do it without recompiling from the source?

andersodt avatar Jan 12 '16 22:01 andersodt

The shadows are mixins, so you would need the source. You could copy them to your project and create them as classes if you would like.

rosskevin avatar Jan 13 '16 00:01 rosskevin

On less, mixins can be used as classes as well as far I know.

FezVrasta avatar Jan 13 '16 10:01 FezVrasta

What happened to 'shadow-z-1', etc.? This was a nice, simple method for including shadows -- why make it less simple?

Streemo avatar May 13 '16 01:05 Streemo

@Streemo are you having a hard time finding the shadow-z-1 mixin? https://github.com/FezVrasta/bootstrap-material-design/blob/master/less/_shadows.less#L1

We support both less and sass so we use them as mixins, not classes. Like @FezVrasta said, in less you could probably use them as a class.

rosskevin avatar May 13 '16 02:05 rosskevin