CSS Grid Overlay

3,090 Kb

How do I make an css grid overlay?

A grid overlay to help with spacing during development.. What is a css grid overlay? How do you make a css grid overlay? This script and codes were developed by Cliff Pyles on 15 January 2023, Sunday.

CSS Grid Overlay Previews

CSS Grid Overlay - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS Grid Overlay</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">

CSS Grid Overlay - Script Codes CSS Codes

/* Settings */
:root { --offset: 1.5rem; --max_width: 72rem; --columns: 6; --gutter: .5rem; --baseline: 1rem; --baseline-shift: calc(var(--baseline) / 2); --line-thickness: 1px; --color: rgba(126, 195, 241, 0.25); --background-color: rgba(126, 195, 241, 0.1); --media-query: 'base viewport'; --media-query-color: rgba(126, 195, 241, 0.75);
@media (min-width: 35em) { :root { --offset: 2rem; --gutter: .75rem; --baseline: 1.5rem; --color: rgba(143, 55, 169, 0.25); --media-query: 'small viewport'; }
@media (min-width: 48em) { :root { --offset: 3rem; --columns: 12; --gutter: 1rem; --baseline: 2rem; --color: rgba(126, 195, 241, 0.25); --media-query: 'medium viewport'; }
@media (min-width: 70em) { :root { --offset: 4rem; --baseline: 3rem; --color: rgba(143, 55, 169, 0.25); --media-query: 'large viewport'; }
/* Helper variables */
:root { --repeating-width: calc(100% / var(--columns)); --column-width: calc((100% / var(--columns)) - var(--gutter)); --background-width: calc(100% + var(--gutter)); --background-columns: repeating-linear-gradient(to right, var(--color), var(--color) var(--line-thickness), var(--background-color) var(--line-thickness), var(--background-color) calc(var(--column-width) - var(--line-thickness)), var(--color) calc(var(--column-width) - var(--line-thickness)), var(--color) var(--column-width), transparent var(--column-width), transparent var(--repeating-width)); --background-baseline: repeating-linear-gradient(to bottom, var(--color), var(--color) 1px, transparent 1px, transparent var(--baseline));
html { position: relative;
html::before { position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin-right: auto; margin-left: auto; width: calc(100% - (2 * var(--offset))); max-width: var(--max_width); min-height: 100vh; content: ''; background-image: var(--background-columns), var(--background-baseline); background-size: var(--background-width) 100%; background-position: 0 var(--baseline-shift); z-index: 1000;
html::after { content: var(--media-query); position: fixed; top: 1rem; left: 1rem; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; color: var(--media-query-color);
body { min-height: 100vh;
CSS Grid Overlay - Script Codes
CSS Grid Overlay - Script Codes
Home Page Home
Developer Cliff Pyles
Username cliffpyles
Uploaded January 15, 2023
Rating 3
Size 3,090 Kb
Views 6,072
Do you need developer help for CSS Grid Overlay?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Cliff Pyles (cliffpyles) Script Codes
Create amazing marketing copy with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!