Flexbox Grid - Custom Properties
How do I make an flexbox grid - custom properties?
What is a flexbox grid - custom properties? How do you make a flexbox grid - custom properties? This script and codes were developed by Dave on 17 September 2022, Saturday.
Flexbox Grid - Custom Properties - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Flexbox Grid - Custom Properties</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="l-grid l-grid--gutter-vertical-base"> <div class="l-grid__item l-grid__item--6-col"> <p>Cell 1</p> </div> <div class="l-grid__item l-grid__item--6-col"> <p>Cell 2</p> </div> <div class="l-grid__item l-grid__item--3-col"> <p>Cell 3</p> </div> <div class="l-grid__item l-grid__item--3-col"> <p>Cell 4</p> </div> <div class="l-grid__item l-grid__item--3-col"> <p>Cell 5</p> </div> <div class="l-grid__item l-grid__item--3-col"> <p>Cell 6</p> </div>
</div>
</body>
</html>
Flexbox Grid - Custom Properties - Script Codes CSS Codes
/* ============================================================================ GRID ========================================================================= */
:root { --shell-g-spacing-x-large: 2rem; --shell-g-spacing-large: 1.5rem; --shell-g-spacing-base: 1rem; --shell-g-spacing-small: 0.5rem; --shell-g-spacing-x-small: 0.25rem; --shell-grid-1-col-width: 8.333%; --shell-grid-2-col-width: 16.666%; --shell-grid-3-col-width: 25%; --shell-grid-4-col-width: 33.333%; --shell-grid-5-col-width: 41.666%; --shell-grid-6-col-width: 50%; --shell-grid-7-col-width: 58.333%; --shell-grid-8-col-width: 66.666%; --shell-grid-9-col-width: 75%; --shell-grid-10-col-width: 83.333%; --shell-grid-11-col-width: 91.666%;
}
/** * Grid container. * * 1. Negative left margin to negate the horizontal gutters. * * N.B. all grid gutter sizes are in "Settings -> Grid (Local)". */
.l-grid { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-flow: row wrap; flex-flow: row wrap; margin-left: calc(var(--shell-g-spacing-base) * -1); /* [1] */
}
/** * Grid items. * * 1. Allows the use of widths. * 2. Horizontal gutter. * 3. 100% width by default—"Mobile-first". * * N.B. all grid gutter sizes are in "Settings -> Grid (Local)". */
.l-grid__item { -ms-flex-preferred-size: auto; flex-basis: auto; /* [1] */ padding-left: var(--shell-g-spacing-base); /* [2] */ width: 100%; /* [3] */
}
/** * Modifier: all items match height of tallest item in a row. */
.l-grid--equal-height > .l-grid__item { display: -webkit-box; display: -ms-flexbox; display: flex;
}
/** * Modifier: gutterless for both horizontal and vertical gutters. * * N.B. we boost the specificity by chaining the base class to the modifier * class to make sure we're always overriding any gutter modifier classes. */
.l-grid.l-grid--gutterless { margin-left: 0;
}
.l-grid.l-grid--gutterless > .l-grid__item { margin-bottom: 0; padding-left: 0;
}
/** * Modifiers: gutter sizes. * * N.B. all grid gutter sizes are in "Settings -> Grid (Local)". */
/* Base * N.B. having to reinstate the default so that any nested grids that inherit * a "Gutterless" modifier can be easily reapplied */
.l-grid--gutter-horizontal-base { margin-left: calc(var(--shell-g-spacing-base) * -1);
}
.l-grid--gutter-horizontal-base > .l-grid__item { padding-left: var(--shell-g-spacing-base);
}
/* Decrease */
.l-grid--gutter-horizontal-small { margin-left: calc(0rem - var(--shell-g-spacing-small));
}
.l-grid--gutter-horizontal-small > .l-grid__item { padding-left: var(--shell-g-spacing-small);
}
.l-grid--gutter-horizontal-x-small { margin-left: calc(var(--shell-g-spacing-x-small) * -1);
}
.l-grid--gutter-horizontal-x-small > .l-grid__item { padding-left: var(--shell-g-spacing-x-small);
}
/* Increase */
.l-grid--gutter-horizontal-large { margin-left: calc(var(--shell-g-spacing-large) * -1);
}
.l-grid--gutter-horizontal-large > .l-grid__item { padding-left: var(--shell-g-spacing-large);
}
.l-grid--gutter-horizontal-x-large { margin-left: calc(var(--shell-g-spacing-x-large) * -1);
}
.l-grid--gutter-horizontal-x-large > .l-grid__item { padding-left: var(--shell-g-spacing-x-large);
}
/** * Modifiers: vertical gutters. * * N.B. all grid gutter sizes are in "Settings -> Grid (Local)". */
/* Base */
.l-grid--gutter-vertical-base > .l-grid__item { margin-bottom: var(--shell-g-spacing-base);
}
/* Decrease */
.l-grid--gutter-vertical-small > .l-grid__item { margin-bottom: var(--shell-g-spacing-small);
}
.l-grid--gutter-vertical-x-small > .l-grid__item { margin-bottom: var(--shell-g-spacing-x-small);
}
/* Increase */
.l-grid--gutter-vertical-large > .l-grid__item { margin-bottom: var(--shell-g-spacing-large);
}
.l-grid--gutter-vertical-x-large > .l-grid__item { margin-bottom: var(--shell-g-spacing-x-large);
}
/** * Modifiers: alignments. */
/* Middle */
.l-grid--align-middle { -webkit-box-align: center; -ms-flex-align: center; align-items: center;
}
/* Bottom */
.l-grid--align-bottom { -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end;
}
/* Center */
.l-grid--align-center { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
}
/* Right */
.l-grid--align-right { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end;
}
/** * Modifiers: "space between" and "space around". */
/* Space between */
.l-grid--space-between { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
}
/* Space around */
.l-grid--space-around { -ms-flex-pack: distribute; justify-content: space-around;
}
/** * Modifier: fit, all grid items have an equal width. * * 1. Provide all values to avoid IE 10 bug with the shorthand `flex` * property, see: https://git.io/vllC7. * Use `0%` to avoid bug in IE 10/11 with unitless `flex-basis`, see: * https://git.io/vllWx. */
.l-grid--fit .l-grid__item { -webkit-box-flex: 1; -ms-flex: 1 1 0%; flex: 1 1 0%; /* [1] */
}
/** * Modifier: horizontally center an individual grid item. */
.l-grid__item--align-center { margin: 0 auto;
}
/** * Modifiers: grid column widths. * * N.B. grid column widths can be found in "Settings -> Grid (Local)". */
/* 1 col */
.l-grid__item--1-col { width: var(--shell-grid-1-col-width);
}
/* 2 col */
.l-grid__item--2-col { width: var(--shell-grid-2-col-width);
}
/* 3 col */
.l-grid__item--3-col { width: var(--shell-grid-3-col-width);
}
/* 4 col */
.l-grid__item--4-col { width: var(--shell-grid-4-col-width);
}
/* 5 col */
.l-grid__item--5-col { width: var(--shell-grid-5-col-width);
}
/* 6 col */
.l-grid__item--6-col { width: var(--shell-grid-6-col-width);
}
/* 7 col */
.l-grid__item--7-col { width: var(--shell-grid-7-col-width);
}
/* 8 col */
.l-grid__item--8-col { width: var(--shell-grid-8-col-width);
}
/* 9 col */
.l-grid__item--9-col { width: var(--shell-grid-9-col-width);
}
/* 10 col */
.l-grid__item--10-col { width: var(--shell-grid-10-col-width);
}
/* 11 col */
.l-grid__item--11-col { width: var(--shell-grid-11-col-width);
}
* { box-sizing: border-box;
}
p { background-color: pink; padding: var(--shell-g-spacing-base);
}
Developer | Dave |
Username | DaveOrDead |
Uploaded | September 17, 2022 |
Rating | 3 |
Size | 2,975 Kb |
Views | 14,168 |
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!
Name | Size |
A Pen by Dave | 1,728 Kb |
Inline-block grid | 3,996 Kb |
Flexbox Grid - equal height | 2,855 Kb |
Scrollable tables | 1,926 Kb |
Dice roller | 4,109 Kb |
Words at War | 32,346 Kb |
Javascript Binding | 3,718 Kb |
Callbacks | 1,471 Kb |
Flexbox grid mark 2 | 2,131 Kb |
React Tic Tac Toe | 28,062 Kb |
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!
Name | Username | Size |
P1 | Vivi_Lai | 1,533 Kb |
Birthday Party Starter | Aussieyang | 1,629 Kb |
Sassy Buttons | Elyseholladay | 2,299 Kb |
Css Rotating 3d cubes different speed | Dghez | 2,364 Kb |
Css3 loader | Clknap | 2,391 Kb |
Dribbble Inspired Registration Form | Lancebush | 2,358 Kb |
AOR site logo | Thatbram | 2,527 Kb |
CSS Flip Animation | Bbodine1 | 2,525 Kb |
Canvas stripes | Adrianparr | 1,948 Kb |
Search Box in Content Moves to Fixed Header | Chriscoyier | 2,768 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!