Leaflet / Leaflet.fullscreen

A fullscreen control for Leaflet
http://leaflet.github.io/Leaflet.fullscreen/
ISC License
436 stars 117 forks source link

Styles not applying when installing 'leaflet-fullscreen' as a package #72

Closed gitjul closed 6 years ago

gitjul commented 6 years ago

When I'm adding the plugin using yarn the script works but the styles aren't applied. When loading via CDN or dropping the files directly in my app all is good. Other leaflet plugins such as leaflet-draw work ok.

jfirebaugh commented 6 years ago

Hi @gitjul. The CSS is provided here. You'll need to consult the documentation for the tools you're using (e.g. webpack) to determine how to include that in your application.

gitjul commented 6 years ago

@jfirebaugh Hi! I noticed that file and I was expecting it to be loaded. But now I noticed that it wasn't set up in my project and all the leaflet styles are actually linked (from a cdn) in a separate file. I'll look into setting up css loading using webpack. So thanks!

Btw, what do you mean by "these two rules" in the part below?

/* Do not combine these two rules; IE will break. */
.leaflet-container:-webkit-full-screen {
  width:100%!important;
  height:100%!important;
  }
.leaflet-container.leaflet-fullscreen-on {
  width:100%!important;
  height:100%!important;
  }
gitjul commented 6 years ago

Also, sorry but where is the .svg file used? I don't see any relevant rule in the styles, was this an improvement you were planning?

jfirebaugh commented 6 years ago

Btw, what do you mean by "these two rules" in the part below?

It refers to the .leaflet-container:-webkit-full-screen and .leaflet-container.leaflet-fullscreen-on rules. They can't be combined as .leaflet-container:-webkit-full-screen, .leaflet-container.leaflet-fullscreen-on.

I believe the svg file is the original source for the png. It's included in case somebody wants to modify the icons in the future, but not used at runtime.