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

Is there a way to reference the viewport's position? #214

Open
gabeblackbeard opened this issue Jul 29, 2016 · 3 comments
Open

Is there a way to reference the viewport's position? #214

gabeblackbeard opened this issue Jul 29, 2016 · 3 comments

Comments

@gabeblackbeard
Copy link

It appears "position: fixed" doesn't work in GSS as it did in regular CSS.
I've made a header that I need to be at the top of the window, always, and it makes full use of GSS to center buttons, logo etc.
Is there any property I can use that would take into account the scroll position of the viewport?

@Inviz
Copy link
Contributor

Inviz commented Jul 30, 2016

$scroll-top

@gabeblackbeard
Copy link
Author

Thank you a ton for the reply! It seems there's some lag associated with it though, as sometimes when I scroll the window down and up, the header moves out of position for a few miliseconds. Is there really no way to perfectly reproduce the effect one would get with "position: fixed" in regular css? How would a gss user make one of those headers that stick to the top of the window?

@kkirby
Copy link

kkirby commented Jan 29, 2018

Late reply. Calculating constraints on the fly at 60fps is not exactly something that can be done with just JavaScript. Maybe this library can we re-written in WebAssembly to gain better performance.

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

3 participants