css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.


  <h2>Vertical Rhythm With  CSS Grid</h2>

  <p>Imagine that you're tasked with building or managing a website containing a real-estate agency's portfolio. On the website, you display pictures, house addresses, locations, number of rooms and other attributes. On the admin screen, you manage the portfolio, adding, removing and editing existing real estate.</p>

  <p>The columns WordPress shows by default (title, author, publication date, number of comments) are hardly relevant for your real-estate website, and you'd be more interested in seeing the existing pictures and information about the real-estate listings as a whole.</p>


  <p>Let's look at a standard admin overview screen for custom post types:</p>

  <figure class="break-out"><a href="https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/8b1824c3-4898-4a36-a9a5-9badf7d4b08a/1-default-large-opt.png"><img src="https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/8393f075-cfd9-4d3f-8153-19f2105ebc69/1-default-800w-opt.png" width="800" height="444" alt="Admin overview screen for custom post types"></a><figcaption>(<a href="https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/8b1824c3-4898-4a36-a9a5-9badf7d4b08a/1-default-large-opt.png">View large version</a>)</figcaption></figure>

  <p>This would be pretty useful if this were our website's blog posts or news items, right? But for our real-estate portfolio, this gives us no information at all. The same goes for web shops, car dealerships, creative portfolios and so forth. Luckily, there's a solution. We'll work towards a far more pleasing overview of our real-estate portfolio, which will look like this.</p>
              :root {
  --offset: 1.3rem + 1vmin + .5vw;
  --type-offset: 1.1rem + 0.5vw;

html {
    font-size: 100%;

body {
  line-height: calc(var(--offset, calc(1.3rem + 1.6vmin)));
  font-family: 'Elena', /* Web font */
                -apple-system, BlinkMacSystemFont,  /* macOS */
                AvenirNext, Avenir, /* iOS */
                'Roboto Slab', 'Droid Serif', /* Android */
                'Segoe UI',  /* Microsoft  */
                Oxygen-Sans, /* KDE */
                Ubuntu, /* Ubuntu */ 
                Cantarell, /* GNOME */
                Georgia, 'Times New Roman', serif; /* Fallback */
    font-size: calc(var(--type-offset, calc(1rem + .75vmin)));

img {
	max-width: 100%;
  height: auto;

article {
	display: grid;
	grid-template-columns: [full-width-start] 1fr [content-start] repeat(12, minmax(0, 4.5ch)) [content-end] 1fr [full-width-end];
	grid-row-gap: calc(var(--offset));

article > * {
	margin: 0;
	grid-column: content;

article > .break-out {
	grid-column: full-width;
	justify-self: center;
	margin: calc(0.5 * var(--offset)) 0;

h2 {
	margin: calc(2 * var(--offset)) 0 0 0;
  font-size: calc(1.5rem + 2.5vmin); 
  line-height: calc(1.5 * var(--offset));

h3 {
	margin: calc(0.5 * var(--offset)) 0 0 0;
  font-size: calc(1rem + 1.5vmin); 
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................