Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<html>
<head>
<title>margin-trim: grid-inline-end</title>
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<meta name="assert" content="inline-end should trim inline-end margins of items on last column">
<style>
grid {
display: inline-grid;
border: 1px solid black;
grid-template-columns: auto auto;
margin-trim: inline-end;
}
item {
display: block;
background-color: green;
width: 50px;
height: 50px;
}
</style>
</head>
<body>
<grid>
<item style="grid-column: span 2; width: auto;"></item>
<item style="margin-inline-end: 10px;"></item>
<item></item>
</grid>
</body>
</html>