grantfayvor / gridify

Have you ever wanted gridlines directly in your browser to measure lines while developing? Then this is for you. You can also measure distances between elements in pixels. Swell right.
Apache License 2.0
0 stars 0 forks source link

Opt-in for Responsive Grid #2

Open obumnwabude opened 3 years ago

obumnwabude commented 3 years ago

Description

To build a grid, one needs to hover on the rulers, and then drag moveable grid lines into the viewport, (whether horizontal or vertical). However, the grid lines are fixed. If the window is resized or if the DevTools (Browser Inspector) Device Toolbar is activated, and the viewport size is adjusted with the mobile and responsive options; the previously drawn grid lines do not change their positions. For example, if there is a vertical grid line at say 992px from the left (that's the line is at the extreme right of the screen) when the viewport width has been reduced to anything less than 992px, that particular grid line will no longer be in view.

This could be normal and expected when using Hex Grid. But it's a problem when attempting to draw a responsive/fluid grid. Just as one wants components/elements/boxes on the page to resize with screen size changes, so I was proposing that one could have responsive/fluid grids with Hex Grid.

Describe the solution you'd like

A possible solution could be having the responsive grid option toggleable in the right-click context menu of Hex Grid in Chrome. It could be turned off by default. But when turned on, gridlines drawn afterward will remember their position relative to the viewport (maybe as percentages). So that on viewport resize, they are redrawn to new positions relative to the new viewport size. Also, there could be a dialog box to confirm that all grid lines on the screen will be removed at the point of toggling the responsive option. So that at any point in time, there are either only fixed grid lines or only responsive grid lines on the screen.

grantfayvor commented 3 years ago

Hmmm. I can see the possible benefits. There may be no need to have a separate menu so we don't have options overload. It could just be enabled by default.

obumnwabude commented 3 years ago

Really?

Yes! It's beneficial and enabling by default will help. But please give developers the option to activate/deactivate responsive grids. This because fixed and responsive grid lines each have their benefits. There's a variety of developers. Giving out all these options will help. Personally, I will like to have both options.

Supporting both types could lead to having both grid line types at once, and possibly having to demarcate the difference.

Please consider keeping both!