Comments (6)
If I remove the @supports it still doesn't calculate the offset. It definitely has
<style>:root { --vh-offset: 69px; }</style>
in the DOM.
from vh-check.
Strangely it works if I removed the first declaration of min-height. If only I could get this to work with @supports now it would be perfect :/
from vh-check.
@ErikVeland I think It's because my example use a CSS pre-processor…
The code should be:
main {
/* for browser supporting VH without buggy behaviour & no supporting of CSS var */
min-height: calc(100vh);
}
/* make sure that CSS var are supported */
/* buggyFill will work on iOS 9.3+ only */
/* will degrade on a buggy 100vh on older version of iOS */
@supports (height: var(--vh-offset)) {
main {
min-height: calc(100vh - var(--vh-offset));
}
}
I'll fix that ^^
from vh-check.
@ErikVeland I've updated the README and the examples.
Tell me if your problem is solved.
from vh-check.
Thank you. I got it working! Also noticed that the JavaScript example also assumes some sort of library with the require function (node.js?)
from vh-check.
@ErikVeland The JS code is build as an UMD module.
In the README, it's using browserify (I should make it more clear…)
But you could also use the file directly like in the test-global example
from vh-check.
Related Issues (20)
- Publish actual code to NPM HOT 4
- NPM – shouldn't have .vscode folder published on npm
- Doesn't apply to Chrome / Android HOT 2
- should allow another way of computing the size
- calling multiple times vhCheck() will bind multiple time the orientationchange event
- Not working on new chrome ios HOT 6
- Value changes on zoom HOT 5
- IE11 - Object doesn't support property or method 'assign' HOT 3
- TESTS – add for real browsers starting at IE11
- Issues with TypeScript HOT 5
- Help: How can I use it with sass or vue? HOT 2
- Docs: bind boolean value HOT 1
- Get if the bottom bar is opened or closed HOT 4
- updateOnTouch only works when i touch again HOT 1
- Doesn't seem to work on Iphone X HOT 5
- Does not work in iOS Chrome HOT 1
- isNeeded = false for iPhone/Safari when target=_blank HOT 2
- Bottom gap on mobile Firefox
- Does not work correctly in a PWA standalone web app HOT 2
- All iphone phones with full screen cannot use this set of plug-ins.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vh-check.