Skip to content

Specifying grid-template-columns using only percentages overrides box sizing #50

@jaclyntan

Description

@jaclyntan

When using CSS grid and specifying columns as percentages, it ignores box sizing
https://codepen.io/electrifried/pen/MzQPNO

Is this intentional? I couldn't find much on this issue but because I am used to using percentages with margins and padding I thought grid would be similar. I'm not sure if this affects grid-template-rows either.

I know you can write grid-template-columns: 50% 1fr instead of grid-template-columns: repeat(2,50%) but it's just force of habit...plus it feels nicer to me to just write repeat (2, 50%).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions