From the course: CSS: Combining Grid and Flexbox

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Functions and keywords

Functions and keywords

- [Instructor] There are a few things I'd like to explain before I turn you loose building out the CSS grid layouts. Grid has a few really helpful keywords and functions that allow you to really dial in your grid-based layouts. And what else is really awesome is when you use these, you may not even need media queries. I know, it's crazy. Let's begin by talking about the functions. They can really offer helpful methods of writing your code. And in many cases, allow you to pass in conditions and just be more precise. The first one we'll look at is repeat. This function allows reoccurring patterns to be written in a succinct fashion. It's one that you'll use quite a bit. We can define how many rows or columns we desire followed by a constraint, but you can also pass in other functions or keywords as arguments as well. Let me show you what this looks like. Here's an example of a grid that is using the repeat function. I'm…

Contents