Dev Tips: DevTools: Using the CSS Grid & Flexbox Editor

Dev Tips

 

DevTools: Better Debugging with the CSS Grid & Flexbox Editor  ✨


Hey friends. I took a break from emailing for a while, but I'm grateful to have you all here, part of this amazing Dev Tips community!
 


Introduction

The CSS flexbox and grid editor within Chrome DevTools helps you preview and modify a CSS flexbox layout and grid layout on a web page. This is useful for debugging layout problems, and experimenting with new layout techniques.


How to use this feature

  1. Using DevTools, inspect an element with display: flex / display: grid (example page).
  2. Click the Open Grid / Flexbox Editor icon within the Styles Pane (it's right next to the display property in the Styles Pane).
  3. You can select icons to enable any of the following:
    • align-contentcenter / space-between / space-around / space-evenly / stretch
    • justify-contentcenter / start / end / space-between / space-around / space-evenly
    • align-itemscenter / start / end / stretch / baseline
    • justify-itemscenter / start / end / stretch
  4. Observe the changes you make are reflected instantly.

When you select the various layout properties and values from the flexbox/grid editor, DevTools inserts the relevant style into the Style Pane.


Bonus feature

There is a handy CSS grid inspector (different to the grid editor) which you can access from the Elements Panel:

  1. Locate a DOM element using display: grid in the Elements Panel.
  2. Click the label/badge marked grid (located next to the element tag name).

Once you have enabled the Grid Inspector, an overlay appears on the web page to visualise the position of grid lines and tracks.

There's also a Layout Pane in the Elements Panel, you can use it to customise options for the CSS grid inspector and view:

  • Grid lines
  • Track sizes
  • Area names

This feature is also compatible with CSS Flexbox, so try the same technique you learnt here, but on display: flex elements!


Availibility

The Grid editor is currently in Chrome 92 (Canary) and should be making its way to stable soon. The Flexbox editor is already in stable.
 

Email Marketing Powered by Mailchimp

Copyright © 2021 Umar, All rights reserved.
You are receiving this email because you signed up for Dev Tips.

unsubscribe from this list    update subscription preferences 

Older messages

Dev Tips: Only download JavaScript when it is appropriate

Wednesday, December 16, 2020

Learn a few techniques for selectively downloading web page resources Dev Tips Hey everyone! I have a different sort of tip for you today, hope it's useful. JavaScript: Conditional JavaScript, only

Dev Tips: DevTools: Record tests with the puppeteer recorder

Friday, December 4, 2020

A test generator for puppeteer built into Canary DevTools Dev Tips DevTools: Record tests with the puppeteer recorder 🎥️ Introduction The Puppeteer Recorder feature in Chrome DevTools can monitor your

Dev Tips: DevTools: Refactor your styles with CSS Overview

Wednesday, November 18, 2020

View different metrics on your styles and improve your overall CSS architecture Dev Tips DevTools: Refactor your stylesheets with CSS Overview Introduction The CSS Overview Panel provides interesting

Dev Tips: DevTools: Create your own keyboard shortcuts  ⌨️

Friday, November 13, 2020

The Shortcut Editor lets you assign your own preferred keyboard shortcuts to common workflows. Dev Tips DevTools: Create your own keyboard shortcuts ⌨️ Introduction The DevTools Shortcut Editor lets

Dev Tips: DevTools: The New Media Panel  🎬

Wednesday, November 4, 2020

The Media Panel in DevTools provides useful video inspection tools, useful for debugging, understanding, and learning about video. Dev Tips DevTools: The New Media Panel 🎬 I've written an article

You Might Also Like

See what Apple did to the iPads

Tuesday, May 7, 2024

Plus: A sperm whale alphabet and Oyo wants some discounted funding View this email online in your browser By Christine Hall Tuesday, May 7, 2024 Hello, and welcome back to TechCrunch PM. Today's

🍿 5 Things to Do With Your Old TVs — Ditching Google Search for Perplexity AI

Tuesday, May 7, 2024

Also: How to Turn Off Vanish Mode on Instagram, and More! How-To Geek Logo May 7, 2024 Did You Know The lens of your eye casts everything it sees upside down onto your retina; only when the image

JSK Daily for May 7, 2024

Tuesday, May 7, 2024

JSK Daily for May 7, 2024 View this email in your browser A community curated daily e-mail of JavaScript news Building Large Scale Web Apps | A React Field Guide I had the privilege to work with Addy

Random Web App Ports, unittest, TypeIs vs TypeGuard, and More

Tuesday, May 7, 2024

`TypeIs` Does What I Thought `TypeGuard` Would Do in Python #628 – MAY 7, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo TypeIs Does What I Thought TypeGuard Would Do in Python In this post,

Daily Coding Problem: Problem #1434 [Medium]

Tuesday, May 7, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Airbnb. You are given a huge list of airline ticket prices between different cities

Chaos, Coyotes & Palm Trees 🌴

Tuesday, May 7, 2024

John Mulaney helps Netflix nail its final comedic frontier. Here's a version for your browser. Hunting for the end of the long tail • May 07, 2024 Chaos, Coyotes & Palm Trees John Mulaney's

Issue 155

Tuesday, May 7, 2024

🧑‍🚀🚀 Humanity has entered the 3rd space age. Professional fraud fighter goes undercover at a “Yahoo Boy School.” The AI music app that actually makes good music. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

A very random issue

Tuesday, May 7, 2024

Plus a new language that compiles to Go, charts for the terminal, and some Go books from Packt. | #​506 — May 7, 2024 Unsub | Web Version Together with Ardan Labs Go Weekly Evolving the Go Standard

Chart | The Growth of a $1,000 Investment, by Stock Market Index 📈

Tuesday, May 7, 2024

In this graphic, we've visualized stock market growth by country over the past five years using major indices. View Online | Subscribe Presented by: Discover the motivations and behaviors of

⚙️ A new LLM for Microsoft

Tuesday, May 7, 2024

Plus: A revenue beat for Palantir & a new partnership for OpenAI ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌