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

Box Shadow of Leaflet Control #1

Open
timlohnes opened this issue Aug 1, 2016 · 0 comments
Open

Box Shadow of Leaflet Control #1

timlohnes opened this issue Aug 1, 2016 · 0 comments

Comments

@timlohnes
Copy link

The legend button and legend don't have the standard look of a Leaflet control.

I changed this
var container = this._container = L.DomUtil.create('div', 'legend-container');

to this

var container = this._container = L.DomUtil.create('div', 'legend-container leaflet-bar');

Doing that created a new problem that I didn't elegantly solve.
When doing this, the legend appears below the i button showing the shadow the full width of the legend.
I just used a negative margin to move it back up and cover the i button on hover the way you have it.
Not sure why it is acting like that.

I also added the shadow to the legend for continuity

box-shadow: 0 1px 5px rgba(0,0,0,0.65);

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

No branches or pull requests

1 participant