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

changing map height and css #7

Open
moozer opened this issue Jul 7, 2020 · 1 comment
Open

changing map height and css #7

moozer opened this issue Jul 7, 2020 · 1 comment

Comments

@moozer
Copy link

moozer commented Jul 7, 2020

Very nice plugin. Very easy to use. Thank you for making it available.

I have been looking into not having it 300px high, and looking through the code I figures out that it was possible to use a custom id for the leaflet using the "divId" keyword. This allows me to set the css as I want and not be bound by the default 300px.

This is not in the docs, so I suggest adding something like the below text to
https://github.com/DavidJVitale/jekyll-leaflet/blob/master/docs/getting-started.md

I can make a pull request, if you prefer, but i figure that you may want a consistency in writing style :-)

again, thanks for a nice plugin.


It is possible to customize the leaflet style, ie. height, margins, and such. This is done using the divId keyword which sets the id of the leaflet map div.

It is done like so

{% raw %}
{% leaflet_map { "divId": "myleaflet" } %}
{}
{% endleaflet_map %}
{% endraw %}

@DavidJVitale
Copy link
Owner

Thanks for the suggestion @moozer , I agree completely that there should be some documentation on how to better apply custom styling. The divId property should definitely be documented, and I will look into making the CSS cascading a bit smarter so you can specify class-level styling to apply to your whole document (it doesn't work at the moment).

Will update you when I get these changes it, much thanks again for the suggestion!

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

2 participants