Hello!
Here is a problem I have at work that I've been trying to solve, but I can't seem to find the solution.
Just to help you understand what's going on, my problem is mathematical but from a web developer standpoint. I'm trying to organize elements in the page according to the window screen. I need to calculate which position they will be in different scenario.
Here is the default grid :
And here is the grid at another breakpoint :
The numbers in second image are to identify which blocks is supposed to be at that position.
Basically, here is what happens
That patterns repeat itself indefinitely.
What I'm trying to find a some sort of formula that would help me convert any original position to their new position.
Thank you!
Here is a problem I have at work that I've been trying to solve, but I can't seem to find the solution.
Just to help you understand what's going on, my problem is mathematical but from a web developer standpoint. I'm trying to organize elements in the page according to the window screen. I need to calculate which position they will be in different scenario.
Here is the default grid :
And here is the grid at another breakpoint :
The numbers in second image are to identify which blocks is supposed to be at that position.
Basically, here is what happens
Original position | Result position |
1 | 1 |
2 | 2 |
3 | 5 |
4 | 3 |
5 | 4 |
6 | 7 |
7 | 6 |
8 | 9 |
9 | 10 |
10 | 8 |
11 | 11 |
12 | 12 |
That patterns repeat itself indefinitely.
What I'm trying to find a some sort of formula that would help me convert any original position to their new position.
Thank you!