Think about @content in mixins #226

Closed
HugoGiraudel opened this Issue Sep 26, 2014 · 12 comments

Comments

Projects
None yet
4 participants
@HugoGiraudel
Member

HugoGiraudel commented Sep 26, 2014

According to you, what would be the best way to indicate that a mixin allows content to be passed in like so:

@mixin dummy {
  @content;
}

Description? @output? New annotation?

@FWeinb

This comment has been minimized.

Show comment
Hide comment
@FWeinb

FWeinb Sep 26, 2014

Member

I think the usage of @content should be explained because its usage is just to versatile. So my vote is for Description.

Member

FWeinb commented Sep 26, 2014

I think the usage of @content should be explained because its usage is just to versatile. So my vote is for Description.

@pascalduez

This comment has been minimized.

Show comment
Hide comment
@pascalduez

pascalduez Sep 26, 2014

Member

I was tempted to say, let's had yet another annotation, but as Fabrice said, this is really generic stuff, so what would you want to pass to such an annotation ? That would always kind of be the same thing "You can wrap some declarations in"...

This makes me think of a new kind of annotation, with pre-defined value:
@content true or @content enabled

Member

pascalduez commented Sep 26, 2014

I was tempted to say, let's had yet another annotation, but as Fabrice said, this is really generic stuff, so what would you want to pass to such an annotation ? That would always kind of be the same thing "You can wrap some declarations in"...

This makes me think of a new kind of annotation, with pre-defined value:
@content true or @content enabled

@valeriangalliat

This comment has been minimized.

Show comment
Hide comment
@valeriangalliat

valeriangalliat Sep 26, 2014

Member

Or @content.

Or we can even look the mixin source to see if @content is used and automatically add the annotation.

Member

valeriangalliat commented Sep 26, 2014

Or @content.

Or we can even look the mixin source to see if @content is used and automatically add the annotation.

@HugoGiraudel

This comment has been minimized.

Show comment
Hide comment
@HugoGiraudel

HugoGiraudel Sep 26, 2014

Member

Now we're talking.

Member

HugoGiraudel commented Sep 26, 2014

Now we're talking.

@FWeinb

This comment has been minimized.

Show comment
Hide comment
@FWeinb

FWeinb Sep 27, 2014

Member

Searching for @content can be done in the resolve function of a new @content annotation. That would be awesome.

Member

FWeinb commented Sep 27, 2014

Searching for @content can be done in the resolve function of a new @content annotation. That would be awesome.

@HugoGiraudel

This comment has been minimized.

Show comment
Hide comment
@HugoGiraudel

HugoGiraudel Sep 27, 2014

Member

Would be pretty neat. So do we all agree on adding a new @content annotation?

Member

HugoGiraudel commented Sep 27, 2014

Would be pretty neat. So do we all agree on adding a new @content annotation?

@FWeinb

This comment has been minimized.

Show comment
Hide comment
@FWeinb

FWeinb Sep 27, 2014

Member

I think so. Basically we will have @content [Description] with the whole tag being optional.

Member

FWeinb commented Sep 27, 2014

I think so. Basically we will have @content [Description] with the whole tag being optional.

@HugoGiraudel

This comment has been minimized.

Show comment
Hide comment
@HugoGiraudel

HugoGiraudel Sep 27, 2014

Member

Alright. 1.9? 1.10?

Member

HugoGiraudel commented Sep 27, 2014

Alright. 1.9? 1.10?

@FWeinb FWeinb self-assigned this Sep 27, 2014

@FWeinb FWeinb added this to the 1.9 milestone Sep 27, 2014

@FWeinb

This comment has been minimized.

Show comment
Hide comment
@FWeinb

FWeinb Sep 27, 2014

Member

I created a PR #229. Please review.

Member

FWeinb commented Sep 27, 2014

I created a PR #229. Please review.

FWeinb added a commit that referenced this issue Sep 27, 2014

@FWeinb FWeinb closed this Sep 27, 2014

@HugoGiraudel

This comment has been minimized.

Show comment
Hide comment
@HugoGiraudel

HugoGiraudel Sep 28, 2014

Member

Think of updating the docs. ;)

Member

HugoGiraudel commented Sep 28, 2014

Think of updating the docs. ;)

@FWeinb FWeinb reopened this Sep 28, 2014

@FWeinb

This comment has been minimized.

Show comment
Hide comment
@FWeinb

FWeinb Sep 28, 2014

Member
  • Documentation
  • We need to add this to the markdown-filter See: SassDoc/sassdoc-filter#5
Member

FWeinb commented Sep 28, 2014

  • Documentation
  • We need to add this to the markdown-filter See: SassDoc/sassdoc-filter#5
@HugoGiraudel

This comment has been minimized.

Show comment
Hide comment
@HugoGiraudel

HugoGiraudel Sep 29, 2014

Member

Feel free to close.

Member

HugoGiraudel commented Sep 29, 2014

Feel free to close.

@FWeinb FWeinb closed this Sep 29, 2014

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