0

Is grid-area used with grid-template-areas, like the example below

               grid-template-areas: "head head"
                   "nav  main"
                   "nav  foot";


   
             #page > header {
             grid-area: head;
             background-color: #8ca0ff;
                }

And also as a shorthand for grid-row-start, grid-column-start, grid-row-end, grid-column-end?

Nima
  • 1
  • 2
    It’s fundamentally the same meaning - where to put the item. See https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area – A Haworth May 13 '22 at 19:01

1 Answers1

0

If you inspect the element you can better understand

enter image description here

It's always the shorthand of the properties you mentioned. Now if you check the syntax of such properties you will notice that it can take different values.

The named areas belong to <cutom-indent>

Related questions for more detail:

CSS grid and specifying multiple areas

CSS Grid: grid-row/column-start/end VS grid-area + grid-template-area

Temani Afif
  • 245,468
  • 26
  • 309
  • 415