Raruto / leaflet-elevation

Leaflet plugin that allows to add elevation profiles using d3js
GNU General Public License v3.0
255 stars 85 forks source link

Override WordPress theme styles #30

Closed hencheck94 closed 4 years ago

hencheck94 commented 4 years ago

Hi, Sorry for asking again a maybe stupid question.

After applying your solution for my first problem (adding a leaflet-map-container element around the map) , I stumbled upon another problem.

When using the standard Wordpress Theme Twenty Twenty, the map and altitude graph get displayed as expected in (Firefox, Chrome, Safari). But when changing the theme to, in my case, Fabulist it isn't anymore:

safari firefox

Do you have any idea what in the Theme may cause this and how to prevent it? Thank you in advance!

Raruto commented 4 years ago

Hi Jan,

in your parent theme you have the following css rule:

svg {
    width: 15px;
    height: 15px;
    display: inline-block;
    vertical-align: middle;
}

so in your child theme you would insert something like this:

.leaflet-map-container svg {
    height: auto;
    width: auto;
}

As you can see, this happens because the elevation chart profile is a valid SVG element.

Greetings, Raruto

hencheck94 commented 4 years ago

Thank you very very much! You solved it again :)