bozdoz / wp-plugin-leaflet-map

Add leaflet maps to Wordpress with shortcodes
https://wordpress.org/plugins/leaflet-map/
GNU General Public License v2.0
140 stars 71 forks source link

Plugin_Settings: mention on viewport sizes #226

Closed sm8ps closed 10 months ago

sm8ps commented 1 year ago

Following up on #225 I thought it helpful to mention height and width settings relative to the viewport in the explanation. For CSS-unsavy users like me it covers a standard use case (relative to what I see) as opposed to the percentage setting (relative to what?).

In case this pull request should be accepted I would also take care of the translations.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

bozdoz commented 1 year ago

"vh" is just a different unit than "%". There are many many options: https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units

sm8ps commented 1 year ago

You are certainly right. Nevertheless it was quite confusing for me to see percentages mentioned which do not work as naively expected. For the average WP user, CSS is not a necessary skill but setting dimensions relative to the viewport is IMHO a straight-forward demand. That is why I think it would be helpful to mention it. If you disagree then I am totally fine with that, too.Thanks for the immensely useful plug-in anyways!

bozdoz commented 1 year ago

We could add it for height, but doesn't make as much sense for width which doesn't suffer the same problem as height in css.

sm8ps commented 1 year ago

You are right. I am totally lacking CSS knowledge (sorry) but I see that %- and vw-settings do agree.