Results 1 to 3 of 3

Thread: Does Element.setStyle() automatically add ventor prefixes?

  1. #1
    Sencha User SunboX's Avatar
    Join Date
    Mar 2010
    Posts
    238
    Answers
    5
    Vote Rating
    28
      0  

    Default Does Element.setStyle() automatically add ventor prefixes?

    How should I deal with ventor prefixes using setStyle().
    Does this work? ->

    Code:
    divEl.setStyle('transform', 'scale(1.25, 1)');
    Or should I do this?
    Code:
    divEl.setStyle('Moz-transform', 'scale(1.25, 1)');
    divEl.setStyle('Webkit-transform', 'scale(1.25, 1)');
    divEl.setStyle('Khtml-transform', 'scale(1.25, 1)');
    divEl.setStyle('O-transform', 'scale(1.25, 1)');
    divEl.setStyle('ms-transform', 'scale(1.25, 1)');
    divEl.setStyle('Icab-transform', 'scale(1.25, 1)');
    Or this?
    Code:
    divEl.setStyle('MozTransform', 'scale(1.25, 1)');
    divEl.setStyle('WebkitTansform', 'scale(1.25, 1)');
    divEl.setStyle('KhtmlTransform', 'scale(1.25, 1)');
    divEl.setStyle('OTransform', 'scale(1.25, 1)');
    divEl.setStyle('msTransform', 'scale(1.25, 1)');
    divEl.setStyle('IcabTransform', 'scale(1.25, 1)');
    How to deal with prefixes in ExtJS 4.1?

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,409
    Answers
    716
    Vote Rating
    504
      0  

    Default

    I believe you need to manage these yourself. In reviewing the ext-all-debug.css, the rules make adjustments where needed. It may be better to apply css.

    Scott.

  3. #3
    Sencha User SunboX's Avatar
    Join Date
    Mar 2010
    Posts
    238
    Answers
    5
    Vote Rating
    28
      0  

    Default

    applying css wouldnt do the job. I need to calculate some translation values dynamically. Ok, so whats the best way to set ventor prefixes? With "-" or as camelcased notation?

    Code:
    myDiv.setStyle('webkit-translation', 'scale(1.5, 1)');
    vs.

    Code:
    myDiv.setStyle('WebkitTranslation', 'scale(1.5, 1)');

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •