Under the Hood: A Closer Look at the Technology that Powers Flex

December 14, 2021
0 minute read

On July 12th, we released (in beta) Duda Flex, a brand new editor experience for our web pros. This article will cover Duda Flex, how it differs from the previous editor experience and one of the underlying technologies that power Duda Flex.



Are you ready to dive deep? Let's go!

What is Duda Flex?

Duda Flex is our newest editor experience for web pros to design pixel-perfect websites faster than ever. At its core, Duda Flex empowers web pros to take full advantage of the latest CSS developments, making it significantly easier to express position and layout.

Let's take a quick tour of the new editor experience:

Layers

The Layers panel provides a convenient hierarchy of all the grids and child elements within the current Flex section. Each item listed in the Layers panel has inline options: "hide" and/or "add widget". Grids, Flexboxes, and Containers have the "hide" and "add widget" options, while all other elements only have the "hide" option.

Fun fact 💡: Duda will structure the underlying HTML markup based on the hierarchy defined in the Layers panel.

Grid Design

The Grid Design panel contains all of the settings for the selected Grid container. Here, we can update the number of rows and columns, the gap size, and the height of a Grid.

If you're familiar with CSS Grid, we're exposing grid-template-columns , grid-template-rows , and gap in the editor. If you're not familiar with CSS Grid, don't worry, we'll go over those properties shortly.

Flex Editor

The Flex Editor resembles many popular design tools, such as Figma, with various capabilities such as pixel-by-pixel placement, helpful spacing recommendations and "rulers", and much more.


Some more technical readers may ask themselves: "what's going on under the hood to enable this new editor experience?". Well, you're in luck; the rest of the article will go over a core technology that enables the Duda Flex experience — CSS Grid.

CSS Grid

One of the foundational technologies at the center of Duda Flex is CSS Grid. CSS Grid extends Flexbox concepts and enables developers to express their layouts in two dimensions (rows and columns) instead of the single dimension Flexbox provides (rows or columns). Thus, allowing developers to specify the exact position of an element based on its parent grid container.

Let's take a look at an example where we want to structure several header elements in the following fashion:

header-1 header-2 header-3
header-4 header-4 header-5

First, we'll set up our HTML document with a container div and five h1 elements with classes based on where we want them to appear in the grid.

See the Pen Duda Flex: CSS Grid by Everett Morgan ( @everett-duda ) on CodePen.

Next, we'll use the below CSS to express the structure of the grid system and its child elements. Although you may not be familiar with some of the new properties introduced with CSS Grid, don't worry, we'll cover them in a moment.

See the Pen Duda Flex: CSS Grid (CSS) by Everett Morgan ( @everett-duda ) on CodePen.

Now, let's check how that looks in the browser:

See the Pen Duda Flex: CSS Grid (CSS) by Everett Morgan ( @everett-duda ) on CodePen.

As we can see, our elements are exactly how we envisioned them. It's that easy with CSS Grid in our toolbox!

Key Concepts

Next, let's go over some terms to help you get familiar with the grid system. A grid system is comprised of different concepts: lines, tracks, cells, areas, and gutters.

Lines

There are two types of lines: column lines and row lines. Think of them as the lines between each column and row in a table.

Tracks

A track is the space between two adjacent grid lines. So, for example, if we have a 3x3 grid, we can extract the leftmost column track (1, 4, 7) or the topmost row track (1, 2, 3).

Cells

A cell is the smallest area within a single column and row. Think of the cells within an Excel table; they're the same.

Areas

An area is a four-sided collection of two or more cells within a grid system. So, for example, we can lay out an element across four cells: 1, 2, 4, 5.

Note 💡: the image on the right depicts an invalid area.

Gutters

A gutter is the space between rows and columns in the grid. By default, grids do not have gutters set up and require the developer to explicitly define the gutter, or gap, between rows and columns.

Note 💡: a gutter differs from the padding and margin of the grid element.

New CSS Properties

Now, let's dive into the new CSS properties that come with CSS Grid:

Grid Container

The below properties are specifically used to define the structure of a grid container.

display: grid

CSS Grid adds a new value to the display property, grid, which specifies the target element as a grid container. That allows for the usage of grid-template-columns, grid-template-rows, and gap to express the grid's structure.

 

display: grid;

grid-template-columns

The grid-template-columns property defines the number of explicit columns in the grid and their respective sizes based on a CSS unit of measurement.

 

<!-- same size for all columns -->

grid-template-columns: 1fr 1fr 1fr 1fr 1fr [cols...];


<!-- unique sizes for each column -->

grid-template-columns: 25px 75px 35px [cols...];

grid-template-rows

The grid-template-rows property is exactly like grid-template-columns except it defines the number of explicit rows.

 

<!-- same size for all rows -->

grid-template-rows: 1fr 1fr 1fr [rows...];


<!-- unique sizes for each row -->

grid-template-rows: 50px 100px 75px [rows...];

gap

The gap property defines the size of the space between columns and rows. Think of this as a "gutter" that sits between the columns and rows of a grid.

 

<!-- set a 10px row and column gap -->

gap: 10px;


<!-- set a 10px row gap and a 50px column gap -->

gap: 10px 50px;

Grid Elements

The below properties are specifically used to define the layout and positioning of child elements within a grid container.

grid-column

The grid-column property is used on child elements of a grid container to specify which column, or columns, an element should cover.

 

<!-- place the element in a single column -->

grid-column: 1;


<!-- layout starting at line 1 to line 3 -->

grid-column: 1 / 3;


<!-- layout  starting at line 1 and span across column 2 -->

grid-column: 1 / span 2;

grid-row

The grid-row property is the same as grid-column, except it specifies which row, or rows, an element should cover.

 

<!-- place  in the first row -->

grid-row: 1;


<!-- layout starting at line 1 to line 3 -->

grid-row: 1 / 3;


<!-- layout starting at line 1 and span across row 2 -->

grid-row: 1 / span 2;

'/' and 'span'

The / "forward slash" is used with the grid-column and grid-row CSS properties to specify the area of an element using a starting and ending grid line.

 

<!-- layout starting at line 1 to line 2 -->

grid-row: 1 / 2;

The span keyword is used with the / "forward slash" and can span an element across the column or row after the specified grid line.

 

<!-- layout starting at line 1 and span across row 2 -->

grid-row: 1 / span 2;

Connecting back to duda flex

Now, with our newfound knowledge of CSS Grid, let's deconstruct the grid created in the above video.

As we can see from the Grid Design panel, the grid structure had 3 columns ( grid-template-columns: 3 ), 2 rows ( grid-template-rows: 2 ), and a 30px gap ( gap: 30px ).

At the start, we only have one child element within the main Grid, Max Powers. Then, we add Celine and Amy by duplicating Max and dragging them to their respective areas. After we dropped each element, Duda calculated the placement within the Grid based on its left side. Here's a table showing the CSS values used for grid-column and grid-row .

grid-column grid-column (lines) grid-row grid-row (lines)
Max 1 1 / 2 1 1 / 2
Celine 2 2 / 3 1 1 / 2
Amy 3 3 / 4 1 1 / 2

Note 💡: grid-column: 1 is the same as grid-column: 1 / 2 , same goes for grid-row.

What's next?

Stay tuned for the next expert posts, diving into Flex's full design capabilities through practical walkthroughs and pro tips.


Did you find this article interesting?


Thanks for the feedback!
By Shawn Davis April 1, 2026
Core Web Vitals aren't new, Google introduced them in 2020 and made them a ranking factor in 2021. But the questions keep coming, because the metrics keep changing and the stakes keep rising. Reddit's SEO communities were still debating their impact as recently as January 2026, and for good reason: most agencies still don't have a clear, repeatable way to measure, diagnose, and fix them for clients. This guide cuts through the noise. Here's what Core Web Vitals actually measure, what good scores look like today, and how to improve them—without needing a dedicated performance engineer on every project. What Core Web Vitals measure Google evaluates three user experience signals to determine whether a page feels fast, stable, and responsive: Largest Contentful Paint (LCP) measures how long it takes for the biggest visible element on a page — usually a hero image or headline — to load. Google considers anything under 2.5 seconds good. Above 4 seconds is poor. Interaction to Next Paint (INP) replaced First Input Delay (FID) in March 2024. Where FID measures the delay before a user's first click is registered, INP tracks the full responsiveness of every interaction across the page session. A good INP score is under 200 milliseconds. Cumulative Layout Shift (CLS) measures visual stability — how much page elements unexpectedly move while content loads. A score below 0.1 is good. Higher scores signal that images, ads, or embeds are pushing content around after load, which frustrates users and tanks conversions. These three metrics are a subset of Google's broader Page Experience signals, which also include HTTPS, safe browsing, and mobile usability. Core Web Vitals are the ones you can most directly control and improve. Why your clients' scores may still be poor Core Web Vitals scores vary dramatically by platform, hosting, and how a site was built. Some of the most common culprits agencies encounter: Heavy above-the-fold content . A homepage with an autoplay video, a full-width image slider, and a chat widget loading simultaneously will fail LCP every time. The browser has to resolve all of those resources before it can paint the largest element. Unstable image dimensions . When an image loads without defined width and height attributes, the browser doesn't reserve space for it. It renders the surrounding text, then jumps it down when the image appears. That jump is CLS. Third-party scripts blocking the main thread . Analytics pixels, ad tags, and live chat tools run on the browser's main thread. When they stack up, every click and tap has to wait in line — driving INP scores up. A single slow third-party script can push an otherwise clean site into "needs improvement" territory. Too many web fonts . Each font family and weight is a separate network request. A page loading four font files before rendering any text will fail LCP, especially on mobile connections. Unoptimized images . JPEGs and PNGs served at full resolution, without compression or modern formats like WebP or AVIF, add unnecessary weight to every page load. How to measure them accurately There are two types of Core Web Vitals data you should be looking at for every client: Lab data comes from tools like Google PageSpeed Insights, Lighthouse, and WebPageTest. It simulates page loads in controlled conditions. Lab data is useful for diagnosing specific issues and testing fixes before you deploy them. Field data (also called Real User Monitoring, or RUM) comes from actual users visiting the site. Google collects this through the Chrome User Experience Report (CrUX) and surfaces it in Search Console and PageSpeed Insights. Field data is what Google actually uses as a ranking signal — and it often looks worse than lab data because it reflects real-world device and connection variability. If your client's site has enough traffic, you'll see field data in Search Console under Core Web Vitals. This is your baseline. Lab data helps you understand why the scores are what they are. For clients with low traffic who don't have enough field data to appear in CrUX, you'll be working primarily with lab scores. Set that expectation early so clients understand that improvements may not immediately show up in Search Console. Practical fixes that move the needle Fix LCP: get the hero image loading first The single most effective LCP improvement is adding fetchpriority="high" to the hero image tag. This tells the browser to prioritize that resource over everything else. If you're using a background CSS image for the hero, switch it to anelement — background images aren't discoverable by the browser's preload scanner. Also check whether your hosting serves images through a CDN with caching. Edge delivery dramatically reduces the time-to-first-byte, which feeds directly into LCP. Fix CLS: define dimensions for every media element Every image, video, and ad slot on the page needs explicit width and height attributes in the HTML. If you're using responsive CSS, you can still define the aspect ratio with aspect-ratio in CSS while leaving the actual size fluid. The key is giving the browser enough information to reserve space before the asset loads. Avoid inserting content above existing content after page load. This is common with cookie banners, sticky headers that change height, and dynamically loaded ad units. If you need to show these, anchor them to fixed positions so they don't push content around. Fix INP: reduce what's competing for the main thread Audit third-party scripts and defer or remove anything that isn't essential. Tools like WebPageTest's waterfall view or Chrome DevTools Performance panel show you exactly which scripts are blocking the main thread and for how long. Load chat widgets, analytics, and ad tags asynchronously and after the page's critical path has resolved. For most clients, moving non-essential scripts to load after the DOMContentLoaded event is a meaningful INP improvement with no visible impact on the user experience. For websites with heavy JavaScript — particularly those built on frameworks with large client-side bundles — consider breaking up long tasks into smaller chunks using the browser's Scheduler API or simply splitting components so the main thread isn't locked for more than 50 milliseconds at a stretch. What platforms handle automatically One of the practical advantages of building on a platform optimized for performance is that many of these fixes are applied by default. Duda, for example, automatically serves WebP images, lazy loads below-the-fold content, minifies CSS, and uses efficient cache policies for static assets. As of May 2025, 82% of sites built on Duda pass all three Core Web Vitals metrics — the highest recorded pass rate among major website platforms. That baseline matters when you're managing dozens or hundreds of client sites. It means you're starting each project close to or at a passing score, rather than diagnosing and patching a broken foundation. How much do Core Web Vitals actually affect rankings? Honestly, they're a tiebreaker — not a primary signal. Google has been clear that content quality and relevance still dominate ranking decisions. A well-optimized site with thin, irrelevant content won't outrank a content-rich competitor just because its CLS is 0.05. What Core Web Vitals do affect is the user experience that supports those rankings. Pages with poor LCP scores have measurably higher bounce rates. Sites with high CLS lose users mid-session. Those behavioral signals — time on page, return visits, conversions — are things search engines can observe and incorporate. The practical argument for fixing Core Web Vitals isn't just "because Google said so." It's that faster, more stable pages convert better. Every second of LCP improvement can reduce bounce rates by 15–20% depending on the industry and device mix. For client sites that monetize through leads or eCommerce, that's a revenue argument, not just an SEO argument. A repeatable process for agencies Audit every new site before launch. Run PageSpeed Insights and record LCP, INP, and CLS scores for both mobile and desktop. Flag anything in the "needs improvement" or "poor" range before the client sees the live site. Check Search Console monthly for existing clients. The Core Web Vitals report surfaces issues as they appear in field data. Catching a regression early — before it compounds — is significantly easier than explaining a traffic drop after the fact. Document what you've improved. Clients rarely see Core Web Vitals scores on their own. A monthly one-page performance summary showing before/after scores builds credibility and makes your technical work visible. Prioritize mobile. Google uses mobile-first indexing, and field data shows that mobile CWV scores are almost always worse than desktop. If you only have time to optimize one version, do mobile first. Core Web Vitals aren't a one-time fix. Platforms change, new scripts get added, campaigns bring in new widgets. Build the audit into your workflow and treat it like any other ongoing deliverable, and you'll stay ahead of the issues before they affect your clients' rankings. Duda's platform is built with Core Web Vitals performance in mind. Explore how it handles image optimization, script management, and site speed automatically — so your team spends less time debugging and more time building.
By Ilana Brudo March 31, 2026
Vertical SaaS must transition from tools to an AI-powered Vertical Operating System (vOS). Learn to leverage context, end tech sprawl, and maximize retention.
By Shawn Davis March 27, 2026
Automate client management, instant site generation, and data synchronization with an API-driven website builder to create a scalable growth engine for your SaaS platform.
Show More

Latest posts