Skip to content

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Sep 9, 2025

This PR fixes an issue where configuring a custom --grid-column-start or --grid-column-end also generated a grid-column utility due to the overlapping namespace.

@theme {
  --grid-column-start-custom: custom-start;
  --grid-column-end-custom: custom-end;
}

Would then generate:

.col-end-custom {
  grid-column: var(--grid-column-end-custom);
}
.col-start-custom {
  grid-column: var(--grid-column-start-custom);
}
.col-start-custom {
  grid-column-start: var(--grid-column-start-custom);
}
.col-end-custom {
  grid-column-end: var(--grid-column-end-custom);
}

Instead of the expected:

.col-start-custom {
  grid-column-start: var(--grid-column-start-custom);
}
.col-end-custom {
  grid-column-end: var(--grid-column-end-custom);
}

This fix is also applied to grid-row when configuring --grid-row-start and --grid-row-end

Fixes: #18906

@RobinMalfait RobinMalfait requested a review from a team as a code owner September 9, 2025 17:28
@RobinMalfait RobinMalfait enabled auto-merge (squash) September 9, 2025 19:31
Copy link
Member

@philipp-spiess philipp-spiess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the same issue exists for --grid-row?

From my WIP PR:

Image

@RobinMalfait RobinMalfait changed the title Do not generate grid-column when configuring grid-column-start or grid-column-end Do not generate grid-column when configuring grid-column-start or grid-column-end; Similar for grid-row Sep 10, 2025
@RobinMalfait
Copy link
Member Author

@philipp-spiess ah yep; I'm sure there are more cases but I still want to fix this in a more generic way somehow.

For now, updated the PR to handle both --grid-column and --grid-row

@RobinMalfait RobinMalfait merged commit 340b59d into main Sep 10, 2025
7 checks passed
@RobinMalfait RobinMalfait deleted the fix/issue-18906 branch September 10, 2025 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Grid column start and end generating grid-column: css properties
2 participants