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

Spyglass Dispatch: Comcast's SpinCo Out Hunting • NVIDIA Makes Mint • The Fate of Chrome • Amazon Shows New 'Show' • End of Around the Horn • Writing on the Web

Thursday, November 21, 2024

Comcast's SpinCo Out Hunting • NVIDIA Makes Mint • The Fate of Chrome • Amazon Shows New 'Show' • End of Around the Horn • Writing on the Web The Spyglass Dispatch is a free newsletter sent

Issue 340 - Elon Musk hints at a new model for large families

Thursday, November 21, 2024

View this email in your browser If you are just now finding out about Tesletter, you can subscribe here! If you already know Tesletter and want to support us, check out our Patreon page Issue 340 -

Data Science Weekly - Issue 574

Thursday, November 21, 2024

Curated news, articles and jobs related to Data Science, AI, & Machine Learning ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Programmer Weekly - Issue 232

Thursday, November 21, 2024

View this email in your browser Programmer Weekly Welcome to issue 232 of Programmer Weekly. Let's get straight to the links this week. Quote of the Week "Writing software is a very intense,

Better - An AI Powered Code Reviewer

Thursday, November 21, 2024

Top Tech Content sent at Noon! How the world collects web data Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, November 21, 2024? The HackerNoon

Python Weekly - Issue 677

Thursday, November 21, 2024

View this email in your browser Python Weekly Welcome to issue 677 of Python Weekly. Let's get straight to the links this week. From Our Sponsor Get Your Weekly Dose of Programming A weekly

Web Tools #592 - JS Libraries, Git/CLI Tools, Media/SVG

Thursday, November 21, 2024

WEB VERSION Issue #592 • November 21, 2024 Advertisement Deploy AMD Instinct™ MI300X on Vultr AMD Instinct MI300X accelerators are now available on the Vultr cloud platform. With thousands of AMD

Stop Using the Wrong State Management in Jetpack Compose

Thursday, November 21, 2024

View in browser 🔖 Articles Benchmark Insights: Direct State Propagation vs. Lambda-based State in Jetpack Compose Here, we'll dive into some benchmark analysis on the state propagation approach in

wpmail.me issue#694

Thursday, November 21, 2024

wpMail.me wpmail.me issue#694 - The weekly WordPress newsletter. No spam, no nonsense. - November 21, 2024 Is this email not displaying correctly? View it in your browser. News & Articles State of

Turn off Google AI with two letters

Thursday, November 21, 2024

$250 off M4 MacBook; Linux Foundation marks 20 years; Bluesky tips -- ZDNET ZDNET Tech Today - US November 21, 2024 laptop This absurdly simple trick turns off AI in your Google Search results There