• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 xenforo -webkit- -moz- -ms-

TsinJu

Well-known member
#1
I just would like to know if i have to add every of the CSS Code below to xenforo, to make it compatible for every Browser, or is one of them enough?
I think I read somewhere that XenForo adapts this kind of code for other browsers itself?
-webkit-transform:
-moz-transform:
-ms-transform:
transform:
 

Arty

Well-known member
#2
If you use it in style property, XF will clone some rules and add prefix to it. It depends on rule. Check CSS in browser after adding rule to see if it worked.

If you use it in template file, you need to make all copies yourself.
 

Arty

Well-known member
#4
No. It is done by style properties parser.

You shouldn't really need it. Only few rules need extensive copying: transition, transform and animation
 

TsinJu

Well-known member
#5
well i am working on a new kind of FAQ and it needs a lot of them ;)
But well, it is as it is.
Thanks a lot for your Help
 

Arty

Well-known member
#6
If many of them are the same and used within same templates, you can use <xen:set> to clone it:
Code:
<xen:set var="$myTransform">
-webkit-transform: scale(0.5);
transform: scale(0.5);
</xen:set>

#foo
{
    {$myTransform}
}

#bar
{
    {$myTransform}
}
or
Code:
<xen:set var="$myTransform">scale(0.5)</xen:set>
#foo
{
   -moz-transform: {$myTransform};
   -webkit-transform: {$myTransform};
   transform: {$myTransform};
}
 

Arty

Well-known member
#8
What effect are you trying to do?

If its transformation, try using 3d transformations. Most phones have hardware acceleration for that and WebKit browsers support it.