The CSS spec is full of gems that sneak their way past most of us web designers and developers. Stuff like :focus-within, prefers-reduced-motion, and prefers-color-scheme suddenly make their way into CSS without us really finding out for months or years. One such example is background-repeat: round.
background-repeat: round repeats a background image without clipping!
.my-element {
background-image: url(logo.png);
background-repeat: round;
}
Addy Osmani’s tweet beautifully depicts the effect of round:
TIL CSS “background-repeat: round” https://t.co/sS9H9HmqQ6 ~ repeats background images without clipping
pic.twitter.
from Proven Ways https://ift.tt/2B1VPQI
pic.twitter.
Comments
Post a Comment