shouldiprefix icon indicating copy to clipboard operation
shouldiprefix copied to clipboard

Background-image-options

Open KerryRuddock opened this issue 8 years ago • 8 comments
trafficstars

KerryRuddock avatar Feb 06 '17 23:02 KerryRuddock

Hi David,

Unfortunately, a vendor prefix is still requred when using a linear-gradient for the background-image under Chrome Browser Version 56.0.2924.76 Your site is invaluable for me.

.grad1 { background: gray; background: -webkit-linear-gradient( left top, #808080, #ffffff ); background: linear-gradient( left top, #808080, #ffffff ); }

KerryRuddock avatar Feb 07 '17 00:02 KerryRuddock

Hi @KerryRuddock — thanks for the kinds words. However: I don't think you need the -webkit- prefix for Chrome 56.

You can check a test-page here Both my test Chrome 49 and Mobile Chrome 55 picked up the green gradient.

It should be supported prefixless from 26+

However, I believe there are some issues with Android's UC browser (which has a lot of market share), so I'll look into it.

davidhund avatar Feb 07 '17 08:02 davidhund

David,

I see that your codepen is using background-image which does indeed work.

I am saying that using the shorthand background property is where the -webkit- prefix is still needed. Running on chrome browser on windows 7.

You can check my codepen here

KerryRuddock avatar Feb 07 '17 23:02 KerryRuddock

You are using a deprecated syntax e.g. 'left top' and 'bottom right'. Replacing this with e.g. 300deg should work… Keywords such as left and top need the to prefix: to left, etc.

davidhund avatar Feb 08 '17 06:02 davidhund

background-clip needs prefix on Chrome (-webkit-background-clip) otherwise it'll be ignored as invalid property.

ramtinsoltani avatar Oct 30 '17 15:10 ramtinsoltani

Check this codepen on Chrome (I've tested it on Chrome 62, Windows 10 64-bit). When the -webkit-background-clip is removed in favor of the unprefixed background-clip, the text will turn into a gradient block.

ramtinsoltani avatar Oct 31 '17 06:10 ramtinsoltani

@ramtinsoltani — you are correct that background-clip needs a -webkit- prefix in WebKit browsers (and Edge).

However: This only goes for the not-yet-standard text value.

I agree we should probably mention it in background-image-options.md

Would you care to open a PR?

davidhund avatar Oct 31 '17 09:10 davidhund

@davidhund — I just opened a pull request with the background-clip prefix mentioned in the CSS example.

ramtinsoltani avatar Oct 31 '17 09:10 ramtinsoltani