IE Specific transformations fail with less css

Chris's Avatar

Chris

30 Apr, 2010 01:11 PM

Any chance of getting a fix for this? Not a huge problem but stops me fully supporting IE with less.

Try this:

.gradient(@from: #FFF, @to: #000) { background: @from; background: -webkit-gradient(linear, left top, left bottom, from(@from), to(@to)); background: -moz-linear-gradient(top, @from, @to); background: filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='@from', EndColorStr='@to'); }

Get this:

! Syntax Error: on line 6: expected one of , ; } got ' after:

.gradient(@from: #FFF, @to: #000) { background: @from; background: -webkit-gradient(linear, left top, left bottom, from(@from), to(@to)); background: -moz-linear-gradient(top, @from, @to); background: filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=

Showing page 2 out of 2. View the first page

  1. 31 Posted by Ivan Pidov on 18 Oct, 2011 11:12 PM

    Ivan Pidov's Avatar

    @Chris Here's the syntax that works:

    filter: ~"progid:DXImageTransform.Microsoft.gradient(startColorStr="@start~", EndColorStr="@stop~")";

  2. 32 Posted by Raphael Boos on 29 Feb, 2012 09:49 PM

    Raphael Boos's Avatar

    mkoistinen,

    as far as a know, your statement is not correct: "one can ONLY use 6-digit HEX notation".
    DXImageTransform.Microsoft.gradient accepts 8-digit HEX Values. The first 2 hex numbers are for opacity. E.g. 90% are hex(255*0,9). So you can build gradients with opacity.

    I am trying to get 8-digit HEX values to work with LESS mixins, but passing these values in mixins does not work.

  3. 33 Posted by Julia Sifers on 01 Mar, 2012 04:31 AM

    Julia Sifers's Avatar

    --
    Julia Sifers
    303.638.8751 mobile
    Sent from my iPhone

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac