Sylwek Sylwek - 3 years ago 227
Less Question

background: transparent; vs background: 0 0; differences and threats

I've noticed that

background: transparent
is changed into
background: 0 0;
. I'm using
version that uses
"less": "~2.7.1"
to transform less to css. What these
0 0
in background are responsible for? Are there any treats resulting from using
background: 0 0
instead of
background: transparent
? I tried to google this but i couldn't find anything that will explain me that

Answer Source

Practically you will not get any treats by using the property background: 0 0; rather background: transparent
what exactly this background: 0 0 is short hand notation of

background-image: initial;
background-position-x: 0;
background-position-y: 0;
background-size: initial;
background-repeat-x: initial;
background-repeat-y: initial;
background-attachment: initial;
background-origin: initial;
background-clip: initial;
background-color: initial;

Where every background property is set to initial and background position is set to 0 0 and answer for your another question why Less is changing background:transparent to background: 0 0 is IE7 or below doesnt support transparent property so Less is changing it into another shorthand notation which gives the same output

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download