<!DOCTYPE HTML>
<html>
<head>
     <meta charset="utf-8">
    <title>Masonry columns subgrid line names 001</title>
    <link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
    <link rel="help" href="https://drafts.csswg.org/css-grid-3/#subgrids">
    <meta name="assert" content="Subgrid with definite grid axis position should inherit line names">
<style>
grid {
    display: inline-grid;
    grid-template-rows: [one] 50px [two] 50px [three] 50px;
    grid-template-columns: masonry;
    gap: 4px 2px;
    padding: 1px 3px 5px 7px;
    border: solid;
    border-width: 3px 5px 1px 1px;
    background: lightgrey;
}
item {
    background: grey;
    width: 3ch;
    position: relative;
}
subgrid {
    display: grid;
    grid: subgrid / subgrid;
    grid-row: 1 / span 3;
    background: yellow;
}
.row-one {
    grid-row-start: one;
}
.row-two {
    grid-row-start: two;
}
.row-three {
    grid-row-start: three;
}
</style>
</head>
<body>
<grid>
<item>1</item>
<item>2</item>
<item>3</item>
<subgrid>
    <item class="row-two"> 4a </item>
    <item class="row-three"> 4b </item>
    <item class="row-one"> 4c </item>
</subgrid>
</grid>
</body>
</html>