Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including leaflet-css with all npm packages installed. Try it out:

var leafletCss = require("leaflet-css")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

leaflet-css v0.1.0

Leaflet CSS

small library to add the css for leaflet without having to bother including ugly conditional comments

to use, either include leaflet.css.js or leaflet.css.min.js scripts like a regular plugin and don't bother putting the css links in the head, or you can include leaflet.css.bundle.js or leaflet.css.bundle.min.js instead of leaflet.js, i.e. instead of :

<link rel="stylesheet" href="" />
<!--[if lte IE 8]>
    <link rel="stylesheet" href="" />

<script src=""></script>

just include

<script src=""></script>

if you want to call more css in the same way, like maybe for your own plugin, you can do

L.css(["string of css (optional)","string of css for internet explorer, (also optional)"]);

build with

npm install #install dependencies
cake build # if that gets you an error try this first
npm install -g coffee-script # you may need a sudo

The css from leaflet and licenced per that project the rest is MIT licenced demo includes leaflet.sprite

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free