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

dynamic height scaling for network graph placement #726

Open
1blockologist opened this issue May 15, 2019 · 1 comment
Open

dynamic height scaling for network graph placement #726

1blockologist opened this issue May 15, 2019 · 1 comment
Assignees

Comments

@1blockologist
Copy link
Member

1blockologist commented May 15, 2019

I pinned the network graph to the bottom of the page as the screen grows larger, but can we do this with an elegant sass formula in main.scss

/* the delta in height is 4vh for every 1000px, can this be put into a Sass formula? */
@media (min-height: 800px){
.height-dynamic {
height: 28vh;
}
}
@media (min-height: 900px){
.height-dynamic {
height: 34vh;
}
}
@media (min-height: 1000px){
.height-dynamic {
height: 38vh;
}
}
@media (min-height: 1100px){
.height-dynamic {
height: 42vh;
}
}
@media (min-height: 1200px){
.height-dynamic {
height: 46vh;
}
}
@media (min-height: 1300px){
.height-dynamic {
height: 48vh;
}
}

I imagine the outcome would be using just one function like this since we know the delta has to increase by 4 every 1000px:

@media(min-height: $min-height){
.height-dynamic {
height: calc(.....);
}
}

@1blockologist 1blockologist self-assigned this May 15, 2019
@1blockologist
Copy link
Member Author

1blockologist commented May 15, 2019

I mainly just want to know how to do it, and marginally save some space

manual version is implemented correctly but doesn't scale infinitely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant