Heydon Pickering wrote an article about mimicking container queries. He writes that the container's CSS should be as follows:
.container {
display: flex;
flex-wrap: wrap;
--margin: 1rem;
--multiplier: calc(40rem - 100%);
margin: calc(var(--margin) * -1); /* excess margin removed */
}
and the container's children's CSS should be:
.container > * {
min-width: calc(33% - (var(--margin) * 2)); /* remove from both sides */
max-width: 100%;
flex-grow: 1;
flex-basis: calc(var(--multiplier) * 999);
margin: var(--margin);
}
I'm just trying to understand how the --multiplier custom property works ie where 40rem - 100% what is 100% of?
Hope that makes sense.