Skip to content

Lander-WebOS/vendor-prefix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Vendor Prefix

A simple plugin for easy access to the host browser's CSS vendor prefix.

Here's a function that moves inSender to the right 5px each time it gets called.

  shiftRight: function(inSender) {
    inSender.applyStyle('transform', 'translate(5px,0)');
    inSender.applyStyle('webkit-transform', 'translate(5px,0)');
    inSender.applyStyle('moz-transform', 'translate(5px,0)');
    inSender.applyStyle('o-transform', 'translate(5px,0)');
    inSender.applyStyle('ms-transform', 'translate(5px,0)');
  }

Nasty. As you can see, a separate call is required for each browser's vendor prefix.

Here's the same function, only simplified using Vendor Prefix:

  shiftRight: function(inSender) {
    inSender.applyStyle(enyo.vendor + 'transform', 'translate(5px,0)');
  }

Much nicer. Enjoy easier cross-platform CSS manipulation!

About

EnyoJS plugin for easily obtaining the host browser's CSS vendor prefix.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors