For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/css/properties/row-gap.md.
Lynx
  • English
  • row-gap (grid-row-gap)

    Introduction

    The row-gap/grid-row-gap CSS property sets the size of the gap (gutter) between an element's rows in flexible box layout and grid layout.

    For compatibility, row-gap or grid-row-gap can be used both.

    Examples

    Values

    <length>

    <length> is the width of the gutter separating the rows.

    <percentage>

    <percentage> values are relative to the dimension of the element.

    Formal syntax

    row-gap = <length-percentage [0,∞]>
    
    <length-percentage> = <length> | <percentage>

    Syntax

    /* <length> values */
    row-gap: 20px;
    row-gap: 1em;
    
    /* <percentage> value */
    row-gap: 10%;
    
    /* calc() values */
    row-gap: calc(10% + 20px);

    Formal definition

    Initial value0
    Applies toflex containers, grid containers
    Inheritedno
    Animatable
    Percentagesrefer to vertical dimension of its own content area

    Difference with the web

    mdn: row-gap

    1. normal is not supported.

    Compatibility

    LCD tables only load in the browser

    FAQ

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.