Day 62: the container shorthand

On day 56 you’ve learned that you have to define a container-type when working with size containers and on day 59 you’ve learned that you can name containers using the container-name property.

The container shorthand allows you to define both properties in a single property, [name] / [type].

section {  
container: wrapper / inline-size;

/*
Same as:
container-name: wrapper;
container-type: inline-size;
*/

}

If you only define a single value (the name), the type is normal by default.

section {  
container: wrapper;

/*
Same as:
container-name: wrapper;
container-type: normal;
*/

}

<hr>

<p>My blog doesn’t support comments yet, but you can reply via <a href=’mailto:blog@matuzo.at?subject=Comment%20on%20%E2%80%9CDay%2062%3A%20the%20container%20shorthand%E2%80%9D’>e-mail</a>.</p>


This content originally appeared on Manuel Matuzović - Web development blog and was authored by Manuel Matuzović

On day 56 you've learned that you have to define a container-type when working with size containers and on day 59 you've learned that you can name containers using the container-name property.

The container shorthand allows you to define both properties in a single property, [name] / [type].

section {  
container: wrapper / inline-size;

/*
Same as:
container-name: wrapper;
container-type: inline-size;
*/

}

If you only define a single value (the name), the type is normal by default.

section {  
container: wrapper;

/*
Same as:
container-name: wrapper;
container-type: normal;
*/

}
<hr> <p>My blog doesn't support comments yet, but you can reply via <a href='mailto:blog@matuzo.at?subject=Comment%20on%20%E2%80%9CDay%2062%3A%20the%20container%20shorthand%E2%80%9D'>e-mail</a>.</p>


This content originally appeared on Manuel Matuzović - Web development blog and was authored by Manuel Matuzović


Print Share Comment Cite Upload Translate Updates
APA

Manuel Matuzović | Sciencx (2022-12-20T09:38:54+00:00) Day 62: the container shorthand. Retrieved from https://www.scien.cx/2022/12/20/day-62-the-container-shorthand/

MLA
" » Day 62: the container shorthand." Manuel Matuzović | Sciencx - Tuesday December 20, 2022, https://www.scien.cx/2022/12/20/day-62-the-container-shorthand/
HARVARD
Manuel Matuzović | Sciencx Tuesday December 20, 2022 » Day 62: the container shorthand., viewed ,<https://www.scien.cx/2022/12/20/day-62-the-container-shorthand/>
VANCOUVER
Manuel Matuzović | Sciencx - » Day 62: the container shorthand. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/12/20/day-62-the-container-shorthand/
CHICAGO
" » Day 62: the container shorthand." Manuel Matuzović | Sciencx - Accessed . https://www.scien.cx/2022/12/20/day-62-the-container-shorthand/
IEEE
" » Day 62: the container shorthand." Manuel Matuzović | Sciencx [Online]. Available: https://www.scien.cx/2022/12/20/day-62-the-container-shorthand/. [Accessed: ]
rf:citation
» Day 62: the container shorthand | Manuel Matuzović | Sciencx | https://www.scien.cx/2022/12/20/day-62-the-container-shorthand/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.