customizer - menu - padding top % are vW and not vh
-
hey, next update will include:

-
Thank you @arminunruh, why not let user set %vh or %vw? There is some selector that not allow to specify what kind of %.
Is this too complicated? for example in customizer the padding top of the sitetite in % is refering to the width.
From a user perspective though, it can feel a bit unintuitive, especially when working with vertical spacing like padding-top, which visually feels related to height.
If choosing the unit were possible, it would be very nice
-
usually % is always width based, even if you set a margin top spacing.
quoting from gemini:
" if i set margin-top in % in css the percentage is based on a width right?
Yes, you've got it exactly right—though I'll admit, it’s one of the most "wait, really?" quirks of CSS.
Even for vertical properties like margin-top and margin-bottom, the percentage is calculated based on the width of the containing block, not the height.
Why does it work this way?The logic dates back to the early days of the web.
"my comment about this:
additionally, % based spacing values often are only percentages based on the width of the parent container, not the whole width of the browser
that is why in the background, i use vw instead of %
additionally, sometimes i actually use 100vw - space bar width
cause 100vw is 100% width of browser + space bar width, which can create x axis overflowi think i will leave it the way it is for now
I also code custom websites or custom Lay features.
💿 Email me here: 💿
info@laytheme.com
Our Web Development company: 100k.studio
Want to tip me? https://www.paypal.com/paypalme/arminunruh
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it
