vendor-prefix

IE10/11 uses transition:-webkit-transform?

怎甘沉沦 提交于 2019-11-26 21:54:59
问题 See this JSBin in IE10 or 11. If you inspect the #test element, you'll see that it shows the transition property as -webkit-transform (and the transition does not happen). If you comment out the transition: -webkit-transform; declaration, as shown here, then the transition works. Why is IE not dropping the vendor-prefixed value as an invalid property value? Incidentally, if I do something similar on Chrome--put, say, -ms-transition after -webkit-transition --it drops it as it should, and uses

Setting vendor-prefixed CSS using javascript

元气小坏坏 提交于 2019-11-26 19:04:15
...is a huge pain. var transform = 'translate3d(0,0,0)'; elem.style.webkitTransform = transform; elem.style.mozTransform = transform; elem.style.msTransform = transform; elem.style.oTransform = transform; Is there a library/framework/better way to do this? Preferably with just one line of JS? I don't know of any library that does this, but if they are all just prefixes --that is, there is no difference in name or syntax--writing a function yourself would be trivial. function setVendor(element, property, value) { element.style["webkit" + property] = value; element.style["moz" + property] =

Using variables in property names in LESS (dynamic properties / property name interpolation)

倖福魔咒の 提交于 2019-11-26 16:32:39
I noticed that inuit.css, which was written in SASS, has a .vendor mix-in: @mixin vendor($property, $value...){ -webkit-#{$property}:$value; -moz-#{$property}:$value; -ms-#{$property}:$value; -o-#{$property}:$value; #{$property}:$value; } Is there a way to replicate this in LESS with some of the odd features like e() and @{ } ? Martin Turjak Update: LESS >= 1.6 As of version 1.6 (see changelog ) property name interpolation is implemented in LESS. So you don't need any magic anymore. (For older versions, see my original answer.) Your mixin would work basically as is: LESS: .vendor(@property;

List of CSS vendor prefixes?

百般思念 提交于 2019-11-26 15:44:53
Besides the following list, are there other CSS vendor prefixes that are important for web development ? Are my definitions correct? Should I be more specific about mobile browsers (mobile Webkit, e.g.) -khtml- (Konqueror, really old Safari) -moz- (Firefox) -o- (Opera) -ms- (Internet Explorer) -webkit- (Safari, Chrome) Does this list (which also contains mso- , -wap- , and -atsc- ) add anything of value? Greg These are the ones I'm aware of: -ms- Microsoft mso- Microsoft Office -moz- Mozilla Foundation (Gecko-based browsers) -o- , -xv- Opera Software -atsc- Advanced Television Standards

Does .css() automatically add vendor prefixes?

萝らか妹 提交于 2019-11-26 15:26:49
I have some code: $("#" + this.id).css("border-radius",this.radius + "px"); $("#" + this.id).css("-moz-border-radius",this.radius + "px"); $("#" + this.id).css("-webkit-border-radius",this.radius + "px"); I am trying to improve lines like this by using JSON to apply them (as shown in jQuery's docs) or by removing the vendor prefix versions completely. Does jQuery's .css() method automatically apply any required vendor prefixes when changing CSS properties on an element? As @zeroflagL wrote it appears that since jQuery 1.8.0 .css() does add browser specific prefixes ( see this ). In earlier

Ordering of vendor-specific CSS declarations

空扰寡人 提交于 2019-11-26 15:23:47
I think I've written something like the following a thousand times now: .foo { border-radius: 10px; /* W3C */ -moz-border-radius: 10px; /* Mozilla */ -webkit-border-radius: 10px; /* Webkit */ } But only now have I thought about whether the ordering of those is important? I know that between -moz-* and -webkit-* it doesn't matter, since at most 1 of those will be read, but is it better (in terms of future-proofing, etc) to do the W3C standard first or last? thirtydot The best practise is undisputedly to have the unprefixed property last: .foo { -moz-border-radius: 10px; /* Mozilla */ -webkit

How to validate vendor prefixes in CSS like -webkit- and -moz-?

空扰寡人 提交于 2019-11-26 13:45:18
I use the webkit/mozilla border radius and box shadow CSS properties, but I want the CSS to validate (which it currently does not). Is there a way to get it to validate? http://jigsaw.w3.org/css-validator/ No, they are browser specific properties, and not defined in the standard CSS specification. That being said, they correctly follow the rules for vendor specific extension of CSS. It's just not in the W3C official CSS specification. Although the syntax for vendor extensions is mentioned in the CSS3 Syntax module and introduced into the grammar to allow vendors to implement their own prefixes

Do we have to use non-standard/browser specific CSS vendor prefixes anymore?

戏子无情 提交于 2019-11-26 11:39:39
问题 Given that I\'m not really bothered about backwards compatibility (I\'m exploring CSS3 and HTML5 based design, rather than relying on on graphics and such) what are the benefits of using css like: -moz-box-shadow: 3px 3px 5px 6px #ccc; -webkit-box-shadow: 3px 3px 5px 6px #ccc; Over just using: box-shadow: 3px 3px 5px 6px #ccc; The latter appears to work fine in most modern browsers (except the obvious! :p looking at you IE! Although I\'ll assume it probably works in IE9, but I can\'t test as

Why doesn't [CSS feature] work in [browser] but works in others?

隐身守侯 提交于 2019-11-26 08:19:50
问题 I tried using transition on Firefox 15 and it didn\'t work even though it worked on other versions of Firefox and other browsers like Chrome and Safari. When I view the properties using Firefox\'s inspector the transition is struck through and gives an error of \"Invalid property value\". MDN and caniuse say it\'s supported on Firefox 4 and above! #mydiv { transition: width 1s; /* Did I do this wrong? */ background: #f00; width: 100px; height: 100px; } #mydiv:hover { width: 200px } How come

Setting vendor-prefixed CSS using javascript

不羁岁月 提交于 2019-11-26 06:46:55
问题 ...is a huge pain. var transform = \'translate3d(0,0,0)\'; elem.style.webkitTransform = transform; elem.style.mozTransform = transform; elem.style.msTransform = transform; elem.style.oTransform = transform; Is there a library/framework/better way to do this? Preferably with just one line of JS? 回答1: I don't know of any library that does this, but if they are all just prefixes --that is, there is no difference in name or syntax--writing a function yourself would be trivial. function setVendor