#grid v9

Sat, 6 Oct 2012: This is a little tool we created for our Analog holding page. It inserts a layout grid in web pages, allows you to hold it in place, and toggle between displaying it in the foreground or background. To see it in action, hit G on your keyboard.

Add the script to your page(s) just inside the </body> tag

Add the CSS to your page(s)

Modify #grid to suit your needs

Usage

The document must have keyboard focus for #grid to work. You may need to click on the document background or TAB into the page first.

G

Show the grid until you release.

G + H

Show and hold the grid (G will remove it again).

G + F

Toggle the grid to the foreground and back. Pressing F while the grid is held also works.

G + J

Jump to the next grid. Pressing J while the grid is held also works.

N.B. A cookie conveniently remembers the state of the grid when you refresh the page. While the grid is in front, you will not be able to interact with the page except in Chrome v4, Safari v4, Firefox v3.6, or more recent versions.

Release Notes

v9 — 30 May 2013

Minor release: Improved example usage to avoid conflicts.

v8 — 6 Oct 2012

Grid overlay can now be used inside a wrapping container with position: relative; rather than working inside the whole viewport. Thanks to Tom Arnold.

Holding down the #grid keys will no longer make browsers cry. Thanks to Callum Macrae.

Multiple grids can be set up and cycled through at a key press. To avoid keyboard shortcut conflicts, the default keys have been changed (see Usage). Using CTRL, ALT or SHIFT as a modifier key is now optional. Keys no longer show or affect the grid while typing in forms.

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

This essentially means that you’re free to copy, modify and distribute it for any project so long as you provide clear attribution to Analog Coop Limited. Contact us if you need a different license.