Skip to main content

Bug Tracker

Side navigation

#12967 closed feature (plugin)

Opened November 27, 2012 08:26AM UTC

Closed December 27, 2012 11:54PM UTC

Automatically prefix CSS values

Reported by: m_gol Owned by: m_gol
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.3
Keywords: Cc:
Blocked by: Blocking:
Description

Now that jQuery automatically prefixes CSS properties, auto-prefixing values would be useful, too. I'm talking about things like transition, transform, calc etc.

Attachments (0)
Change History (3)

Changed December 27, 2012 11:25PM UTC by dmethvin comment:1

owner: → m_gol
status: newpending

Can you provide some examples of what you are looking for?

Changed December 27, 2012 11:34PM UTC by m_gol comment:2

status: pendingnew

For example so that using:

$('#id').css('width', 'calc(50% - 30px)');

would cause the following in Chrome:

document.getElementById('id').style.width === '-webkit-calc(50% - 30px)'

Actually, I made a mistake mentioning transitions and transforms, they are obviously values, not properties.

Another useful value waiting to be handled this way is linear-gradient to be interpreted as -webkit-linear-gradient in WebKit browsers.

Obviously it can't be done so 'pretty' as auto-prefixing values, you'd have to keep a white-list of accepted properties; there aren't a lot of them, though. Lea Verou keeps four of them in -prefix-free; apart from mentioned they're 'element' and 'cross-fade'.

Changed December 27, 2012 11:54PM UTC by dmethvin comment:3

resolution: → plugin
status: newclosed

I think this is beyond what core would do, especially since it couldn't be implemented economically in all our supported browsers.