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

keywords($args) does not default to empty map #672

Closed
jakob-e opened this issue Nov 23, 2014 · 6 comments · Fixed by #696
Closed

keywords($args) does not default to empty map #672

jakob-e opened this issue Nov 23, 2014 · 6 comments · Fixed by #696

Comments

@jakob-e
Copy link

jakob-e commented Nov 23, 2014

When passing non-keyword-arguments keyword function trows
Error: basic_string::basic_string rather than creating an empty map

@mixin mixin($arglist...){
    $map: keywords($arglist);
}

.test {
    // As expected 
    // $map: (width: 200px, height: 100px);  
   @include mixin( $width: 200px, $height: 100px);

   // As expected 
   // $map: ();
   @include mixin( );

    // Throws: "Error: basic_string::basic_string"
    // Expected $map: ();  
   @include mixin( not-keyword-format );
}







@xzyfer
Copy link
Contributor

xzyfer commented Nov 24, 2014

Could you please add a spec in https://github.com/sass/sass-spec ?

Here's an example of a good spec PR for reference https://github.com/sass/sass-spec/pull/89/files

@jakob-e
Copy link
Author

jakob-e commented Nov 24, 2014

👍... I think I could have done it in just one pull (tsk-tsk newbies ;-)

sass/sass-spec#147
sass/sass-spec#148

Note I've added it to the maps folder to keep things together
spec/maps/keywords/

@xzyfer
Copy link
Contributor

xzyfer commented Nov 24, 2014

Thanks @jakob-e . I've left some feedback on those PR. Ideally one PR would be best, as well as sticking the existing convention of putting specs for issues in libsass-todo-issues. It's part of the Libsass development workflows and makes our lives easier when fixing these issues.

@jakob-e
Copy link
Author

jakob-e commented Nov 24, 2014

Thanks @xzyfer I've moved the files to issue_672 in libsass-todo-issues and made a new PR
I hope I did close the old ones correctly – sorry in advance – Thanks for teaching me 👍
sass/sass-spec#149

@xzyfer
Copy link
Contributor

xzyfer commented Nov 24, 2014

Looks good! Thanks for your help
On 24 Nov 2014 19:37, "jakob-e" [email protected] wrote:

Thanks @xzyfer https://github.com/xzyfer I've moved the files to
issue_672 in libsass-todo-issues and made a new PR
I hope I did close the old ones correctly – sorry in advance – Thanks for
teaching me [image: 👍]

sass/sass-spec#149 sass/sass-spec#149


Reply to this email directly or view it on GitHub
#672 (comment).

@xzyfer
Copy link
Contributor

xzyfer commented Nov 26, 2014

Spec added in sass/sass-spec@a164ef0

@xzyfer xzyfer modified the milestone: 3.0.3 Dec 2, 2014
@xzyfer xzyfer modified the milestones: 3.0.3, 3.1 Dec 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants