# NO BUG: Display Grid adds align-items:initial

**URL:** <https://forum.bricksbuilder.io/t/no-bug-display-grid-adds-align-items-initial/14700>\
**Category:** Bugs\
**Tags:** v1-8-6\
**Created:** [August 17, 2023, 9:41pm UTC](https://forum.bricksbuilder.io/t/no-bug-display-grid-adds-align-items-initial/14700 "2023-08-17T21:41:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dan](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@dan](https://forum.bricksbuilder.io/u/dan)\
**Post date:** [August 17, 2023, 9:41pm UTC](https://forum.bricksbuilder.io/t/no-bug-display-grid-adds-align-items-initial/14700/1 "2023-08-17T21:41:51Z")

</div>

Present in 1.8.3 and 1.8.6. Have not got active sites on other versions to test out but could be from when grid was originally added.

When I set a grid layout on an element, Bricks adds `align-items: initial;` also as default.

On a grid layout this _"leads to a behavior similar to the one of `stretch`_" - [MDN - align-items](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items#normal)

If we do not set an `align-items` property to override, then the grid effectively has a default value of stretch. This is not highlighted in the builder (due to `align-items` not explicitly being set) and does break some layouts and functionality and forces users to add CSS unnecessarily to override.

![CleanShot 2023-08-17 at 22.41.02@2x](https://forum.bricksbuilder.io/uploads/default/original/2X/f/f278c79ac8de30d64f52c70988bac1a5c99fbed1.png)

 ![CleanShot 2023-08-17 at 22.41.23@2x](https://forum.bricksbuilder.io/uploads/default/original/2X/1/189c3c098201b342b08ebbc7a3c6cba441cd3c2d.png)

If the `align-items: initial;` was removed, the grid would inherit the `align-items: flex-start;` from the container/block css.

Do we need the `align-items: initial` added by default?

Also this is not mentioned in the academy docs.

 ![CleanShot 2023-08-17 at 22.31.56@2x](https://forum.bricksbuilder.io/uploads/default/original/2X/2/21baee556bf8f52bdd1506a425a35fdfc5661251.png)

![CleanShot 2023-08-17 at 22.31.46@2x](https://forum.bricksbuilder.io/uploads/default/original/2X/6/6d2fc7f0f428d5cabae63169b5a8b9f67ca9ae2e.png)

 ![CleanShot 2023-08-17 at 22.32.32@2x](https://forum.bricksbuilder.io/uploads/default/original/2X/6/6c4f37535b17d8eb01cbd0969a3607d08508fb0b.png)

---

<div class="post-metadata">

**Author:** ![aslotta](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/aslotta/32/5419_2.png) [@aslotta](https://forum.bricksbuilder.io/u/aslotta)\
**Post date:** [August 18, 2023, 6:27am UTC](https://forum.bricksbuilder.io/t/no-bug-display-grid-adds-align-items-initial/14700/2 "2023-08-18T06:27:57Z")

</div>

Hey Daniel,

thanks for your report.

I will get some info about why this was added as a “default value”. Will get back to you.

Best,

André

---

<div class="post-metadata">

**Author:** ![aslotta](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/aslotta/32/5419_2.png) [@aslotta](https://forum.bricksbuilder.io/u/aslotta)\
**Post date:** [August 19, 2023, 7:15am UTC](https://forum.bricksbuilder.io/t/no-bug-display-grid-adds-align-items-initial/14700/3 "2023-08-19T07:15:01Z")

</div>

Hey Daniel,

you actually already mentioned the reasons yourself:

As there are Bricks default values for layout elements like the container or block element we use `align-items: initial` to reset those default values when using `display: grid` (as a grid’s default behavior is stretching the grid items).

> This is not highlighted in the builder

You mean that you would like the `stretch` icon to be highlighted in some way? Actually you could argue like this for many different default settings which are not highlighted (like a section element’s `align-items: center`).

Can you elaborate the actual issues you’re having with the `align-items: initial` setting? If you were creating a grid “manually” you’d also have to explicitly set `align-items` to `start` to override the default `stretch` behavior:

![CleanShot 2023-08-19 at 09.16.46](https://forum.bricksbuilder.io/uploads/default/original/2X/9/949bcbb975dae42a80a2d946e62eeb2e23de4909.gif)

Best,

André

---

<div class="post-metadata">

**Author:** ![dan](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@dan](https://forum.bricksbuilder.io/u/dan)\
**Post date:** [August 19, 2023, 3:37pm UTC](https://forum.bricksbuilder.io/t/no-bug-display-grid-adds-align-items-initial/14700/4 "2023-08-19T15:37:08Z")

</div>

I was trying to copy something I saw on another site and I think the issue I was having was my mistake on the inheritance. As the container was flex and had flex-start, that confused me with the grid inside and the align-items as I wanted it to be align-items start but was getting stretch.

Building it out on Codepen works as expected with zero styles so just need to remember to check a bit more on Bricks’ inherited styles.

So yeah no bug, just my error in what I was trying to do and what happens with Bricks containers.
