Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interpolation shouldn't be allowed in IE filters outside of argument list #1694

Closed
andrew-skybound opened this issue Nov 3, 2015 · 5 comments

Comments

@andrew-skybound
Copy link

andrew-skybound commented Nov 3, 2015

Three parsing discrepancies to report here, all related to parsing of IE filter values. These are probably trivial (especially the last two) but I figured I might as well report them anyway.

First, Ruby SASS does not permit interpolation to be used in progid: values outside of the argument list. For example this is not allowed:

test {
  filter: progid:DXImageTransform.Microsoft.#{Alpha(opacity=20)};
}

Ruby SASS:

Error: Invalid CSS after "  filter: progid": expected ";", was ":DXImageTransfo..."

Libsass:

test {
  filter: progid:DXImageTransform.Microsoft.Alpha(opacity=20);
}

Second, Ruby SASS does not allow CSS escapes in progid: values either:

test {
  filter: progid:DXImageTransform.\Microsoft.Alpha(opacity=20);
}

Ruby SASS:

Error: Invalid CSS after "  filter: progid": expected ";", was ":DXImageTransfo..."

Libsass:

test {
  filter: progid:DXImageTransform.\Microsoft.Alpha(opacity=20);
}

Finally, it looks like Ruby treats escaped braces in the argument list as ordinary braces for the purpose of determining where the progid: value ends; Libsass does not:

test {
  filter: progid:DXImageTransform.Microsoft.Alpha(opacity=20\);
}

Ruby SASS:

test {
  filter: progid:DXImageTransform.Microsoft.Alpha(opacity=20\);
}

Libsass:

Error: unclosed parenthesis

If you add an unescaped brace to the end, Ruby SASS fails, and Libsass works, but it does not output the second brace.

test {
  filter: progid:DXImageTransform.Microsoft.Alpha(opacity=20\));
}

Ruby SASS:

Error: Invalid CSS after "...ha(opacity=20\)": expected ";", was ");"

Libsass:

test {
  filter: progid:DXImageTransform.Microsoft.Alpha(opacity=20\);
}

@xzyfer
Copy link
Contributor

xzyfer commented Nov 4, 2015

Thanks for the @andrew-skybound

@xzyfer xzyfer assigned xzyfer and unassigned xzyfer Nov 4, 2015
@xzyfer xzyfer added this to the 3.4 milestone Nov 4, 2015
@saper
Copy link
Member

saper commented Nov 14, 2015

( Partially related to #1684, #1734 )

saper added a commit to saper/sass-spec that referenced this issue Nov 14, 2015
test {
  filter: progid:DXImageTransform.Microsoft.#{Alpha(opacity=20)};
}

should not be accepted by libsass

sass/libsass#1694
saper added a commit to saper/sass-spec that referenced this issue Nov 14, 2015
Add tests for

test {
  filter: progid:DXImageTransform.Microsoft.Alpha(opacity=20\);
}

and

test {
  filter: progid:DXImageTransform.Microsoft.Alpha(opacity=20\));
}

sass/libsass#1694
@mgreter
Copy link
Contributor

mgreter commented Nov 14, 2015

Is this fixed? I wonder because the spec test seems to be active (I get a fail in #1736). But strange enough CI for master seems ok even if I restart it. I also get this problem locally!?

@mgreter
Copy link
Contributor

mgreter commented Jan 11, 2018

IMO this should be closed since no longer relevant (last IE version to support filters was IE9). IMO there is no merit to support this in future version of libsass. Feel free to re-open if you see it otherwise. //CC @xzyfer.

@mgreter mgreter closed this as completed Jan 11, 2018
@xzyfer
Copy link
Contributor

xzyfer commented Jan 13, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants