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

Custom at-rules causes LibSass an error but not the Ruby version of Sass #1263

Closed
lozandier opened this issue Jun 8, 2015 · 5 comments
Closed

Comments

@lozandier
Copy link

Problem

Unlike the recent versions of Ruby Sass, LibSass communicates a parsing/syntax error if a custom at-rule is used.

The following syntax demonstrates this (Ignore the CSS Mixin --foo & the incorrect output both LibSass & Sass currently outputs for it, will be addressed by another issue when it's time)

:root {
 --foo: red;
 --bar: {
   color: red;
   background: yellow;
 }
}

x-foo {
  border: 1px solid var(--foo);  
  @apply(--bar); // Breaks in LibSass but not RubySass
}

Screenshots of Correct & Problematic Output

Ruby Sass Output
screen shot 2015-06-08 at 4 44 50 pm
LibSass output
screen shot 2015-06-08 at 4 44 00 pm

@KittyGiraudel
Copy link

Seconded. Sass should allow custom directives for forward-compatibility.

@mgreter
Copy link
Contributor

mgreter commented Jun 12, 2015

Minimized test case:

foo {
  @--bar(--baz);
}

Expected result:

foo {
  @--bar (--baz); }

@mgreter mgreter self-assigned this Jun 12, 2015
@mgreter mgreter added this to the 3.3 milestone Jun 12, 2015
@mgreter
Copy link
Contributor

mgreter commented Jun 13, 2015

The original issue is solved with my latest WIP 3.3 branch, but there seems to be a side issue when the custom at_rule block is not preceded by some other declaration. Need to investigate further!

@lozandier
Copy link
Author

@mgreter Why is the minimal test case not the following (unless it implicitly also allowing the following to be legal):

Minimized test case:

foo {
  @bar(--baz);
}

Expected result:

foo {
  @bar (--baz); }

@mgreter mgreter modified the milestones: 3.3, 3.3.1 Jun 14, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Jun 14, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Jun 23, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Jun 30, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Jun 30, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Jun 30, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Jun 30, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Jun 30, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Jun 30, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Jul 1, 2015
xzyfer pushed a commit to xzyfer/libsass that referenced this issue Jul 8, 2015
xzyfer pushed a commit to xzyfer/libsass that referenced this issue Jul 8, 2015
xzyfer pushed a commit to xzyfer/libsass that referenced this issue Jul 8, 2015
xzyfer pushed a commit to xzyfer/libsass that referenced this issue Jul 8, 2015
xzyfer pushed a commit to xzyfer/libsass that referenced this issue Jul 8, 2015
xzyfer pushed a commit to xzyfer/libsass that referenced this issue Jul 8, 2015
xzyfer pushed a commit to xzyfer/libsass that referenced this issue Jul 8, 2015
xzyfer pushed a commit to xzyfer/libsass that referenced this issue Jul 8, 2015
xzyfer pushed a commit to xzyfer/libsass that referenced this issue Jul 8, 2015
xzyfer pushed a commit to xzyfer/libsass that referenced this issue Jul 8, 2015
xzyfer pushed a commit to xzyfer/libsass that referenced this issue Jul 8, 2015
xzyfer pushed a commit to xzyfer/libsass that referenced this issue Jul 8, 2015
xzyfer pushed a commit to xzyfer/libsass that referenced this issue Jul 8, 2015
xzyfer pushed a commit to xzyfer/libsass that referenced this issue Jul 8, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Jul 8, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Jul 8, 2015
@mgreter
Copy link
Contributor

mgreter commented Jul 13, 2015

We now have a passing spec test since #1249 was merged 🎈

@mgreter mgreter reopened this Jul 13, 2015
@mgreter mgreter closed this as completed Jul 13, 2015
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

3 participants