That's right, CSS inside HTML 😁
This element is not limited to just dimension based media queries, but rather any media query! So you could do things like
💭 Different images for different orientaations
💭 Different image if user prefers high contrast
💭 Different images for different color schemes (light, dark)
The possibilities are endless 🚀
At first, it might throw you off that we are writing CSS media queries inside HTML, but it is a necessity for this setup to work properly. Think about it 🤔 the browser has to choose an image to render, even before any CSS is loaded into the page!
This element is not limited to just dimension based media queries, but rather any media query! So you could do things like
💭 Different images for different orientaations
💭 Different image if user prefers high contrast
💭 Different images for different color schemes (light, dark)
The possibilities are endless 🚀
❤2
Have you seen those websites which shows a list of brands or images with a marquee effect, that seem to go on forever? Here is a tutorial on how to implement exactly that 🤩 in CSS
❤3
Media is too big
VIEW IN TELEGRAM
🔅 The Joy of CSS Grid - Build 3 Beautifully Simple Responsive Layouts
❤1
🔅 CSS Clamp
clamp(minimum, preferred, maximum);
In this example, the preferred value is 50%.
On the left 50% of the 400px viewport is 200px, which is less than the 300px minimum value that gets used instead.
On the right, 50% of the 1400px viewport equals 700px, which is greater than the minimum value and lower than the 800px maximum value, so it equates to 700px.
❤2