Background-size: auto; vs. not setting a background size

My question is, When do you set it to auto, and when is it fine not to put a background-size at all?

In what circumstance would you use, or not use each?

background-size: auto;
Default value.

vs.

not setting a background size.
This is also Default value.

2 Likes

When you always want to use the default value there is no need to define it at all.

In some cases you may want to define a different size to the default, but later in the style sheet (in a media query for example) you may wish to revert to the default size, then you may set it to auto.

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.