Session 8
https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries
Logical Operators:
https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries
Logical Operators:
Sidenote: @media is a CSS At-rule. You will only need to know a few of them, e.g. @font-face, @keyframes and @supports
.product-list {
display: flex;
flex-direction: column;
}
.product {
padding: 0.8em;
}
@media (min-width: 600px) { /* applies from 600px upwards */
.product-list {
flex-direction: row;
}
.product {
padding: 1em;
width: 50%;
}
}
@media (min-width: 1200px) { /* applies from 1200px upwards */
.product {
width: 33.33%;
}
}
IF something matches the query then the CSS rules in the block are used
Breakpoints are the widths we agree on as being worthy of a layout change
We can say that:
Phone is < 600px
desktop > 1200px
for example