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

Add mixins by new proposal #203

Closed
ai opened this Issue Aug 25, 2015 · 13 comments

Comments

7 participants
@ai

ai commented Aug 25, 2015

New proposal by @tabatkins with mixins by @apply rule http://tabatkins.github.io/specs/css-apply-rule/

@MoOx

This comment has been minimized.

Show comment
Hide comment
@MoOx

MoOx Sep 13, 2015

Owner

This one require postcss v5, will add that after #202

https://github.com/pascalduez/postcss-apply

Owner

MoOx commented Sep 13, 2015

This one require postcss v5, will add that after #202

https://github.com/pascalduez/postcss-apply

@keithamus

This comment has been minimized.

Show comment
Hide comment
@keithamus

keithamus Oct 13, 2015

For any who land here, it looks as though #208 is the new issue that needs to be resolved before this lands.

keithamus commented Oct 13, 2015

For any who land here, it looks as though #208 is the new issue that needs to be resolved before this lands.

@MoOx MoOx removed the status: blocked label Jan 4, 2016

@Jcan

This comment has been minimized.

Show comment
Hide comment
@Jcan

Jcan Jan 11, 2016

Hey MoOx - we are very excited about the function. do you have a timeline for it? Thanks ;-)

Jcan commented Jan 11, 2016

Hey MoOx - we are very excited about the function. do you have a timeline for it? Thanks ;-)

@Jcan

This comment has been minimized.

Show comment
Hide comment
@Jcan

Jcan Jan 14, 2016

I think Mixin is very useful. This is a simple example:

:root {
    --clearfix: {
        content: '';
        display: table;
        clear: both;
    }
}

#header {
    ......
    &::after {
        @apply --clearfix;
    }
}

Look forward for the new feature!

Jcan commented Jan 14, 2016

I think Mixin is very useful. This is a simple example:

:root {
    --clearfix: {
        content: '';
        display: table;
        clear: both;
    }
}

#header {
    ......
    &::after {
        @apply --clearfix;
    }
}

Look forward for the new feature!

@MoOx

This comment has been minimized.

Show comment
Hide comment
@MoOx

MoOx Jan 17, 2016

Owner

If someone can double check that a plugin exists and follow the spec, this should be easy to add (PR welcome, and btw, here is the way to add a feature (maybe outdated a little, but should help, it's very easy to add a new plugin) https://github.com/MoOx/postcss-cssnext/blob/master/CONTRIBUTING.md#add-a-feature)

Owner

MoOx commented Jan 17, 2016

If someone can double check that a plugin exists and follow the spec, this should be easy to add (PR welcome, and btw, here is the way to add a feature (maybe outdated a little, but should help, it's very easy to add a new plugin) https://github.com/MoOx/postcss-cssnext/blob/master/CONTRIBUTING.md#add-a-feature)

@zeke

This comment has been minimized.

Show comment
Hide comment
@zeke

zeke Apr 8, 2016

Not sure I have the time or the chops to take this on, but would love to see it supported in cssnext!

zeke commented Apr 8, 2016

Not sure I have the time or the chops to take this on, but would love to see it supported in cssnext!

@pascalduez

This comment has been minimized.

Show comment
Hide comment
@pascalduez

pascalduez Apr 11, 2016

Contributor

The aim of postcss-apply is to follow the "spec" as close as possible, but I feel it's a bit early to name it a "spec"?
Also it's suffering the same limitations as for custom properties, no cascading or inheritance so far.
I get to make it more clear on the readme.

Anyhow, I would be happy to see it used in CSSnext.

Contributor

pascalduez commented Apr 11, 2016

The aim of postcss-apply is to follow the "spec" as close as possible, but I feel it's a bit early to name it a "spec"?
Also it's suffering the same limitations as for custom properties, no cascading or inheritance so far.
I get to make it more clear on the readme.

Anyhow, I would be happy to see it used in CSSnext.

@MoOx

This comment has been minimized.

Show comment
Hide comment
@MoOx

MoOx Apr 11, 2016

Owner

As far as the limitation does not produce any change with or without the transformation, it's not an issue. postcss-custom-properties supported code will works in modern browsers without any different behavior.

I didn't read the spec at all so I can't say anything for now (and to be honest, I am not personally interested yet by this feature, and may never be - that don't mean it does not have its place to this project).

Owner

MoOx commented Apr 11, 2016

As far as the limitation does not produce any change with or without the transformation, it's not an issue. postcss-custom-properties supported code will works in modern browsers without any different behavior.

I didn't read the spec at all so I can't say anything for now (and to be honest, I am not personally interested yet by this feature, and may never be - that don't mean it does not have its place to this project).

@pascalduez

This comment has been minimized.

Show comment
Hide comment
@pascalduez

pascalduez Apr 12, 2016

Contributor

Just wanted to show good willing after the last days "social highlight".
I guess it should live alongside postcss-custom-properties and follow the same guidelines, since they are pretty close.
But postcss-apply is just a handfull LOC after all, no big deal.

Open to move it to the PostCSS org if you feel it's needed.

Collaboration over fragmentation.

Contributor

pascalduez commented Apr 12, 2016

Just wanted to show good willing after the last days "social highlight".
I guess it should live alongside postcss-custom-properties and follow the same guidelines, since they are pretty close.
But postcss-apply is just a handfull LOC after all, no big deal.

Open to move it to the PostCSS org if you feel it's needed.

Collaboration over fragmentation.

@MoOx

This comment has been minimized.

Show comment
Hide comment
@MoOx

MoOx Apr 21, 2016

Owner

@pascalduez feel free to make a PR with proper doc about limitation (like custom props).

Owner

MoOx commented Apr 21, 2016

@pascalduez feel free to make a PR with proper doc about limitation (like custom props).

@keithjgrant

This comment has been minimized.

Show comment
Hide comment
@keithjgrant

keithjgrant Jun 7, 2016

FYI: This has landed in Chrome 51 behind the experimental features flag.

https://www.chromestatus.com/feature/5753701012602880

keithjgrant commented Jun 7, 2016

FYI: This has landed in Chrome 51 behind the experimental features flag.

https://www.chromestatus.com/feature/5753701012602880

@MoOx

This comment has been minimized.

Show comment
Hide comment
@MoOx

MoOx Jun 7, 2016

Owner

If anyone want to handle this, it should take a minute if the corresponding postcss plugin is ready.
See the doc to add a feature https://github.com/MoOx/postcss-cssnext/blob/master/CONTRIBUTING.md#add-a-feature

Owner

MoOx commented Jun 7, 2016

If anyone want to handle this, it should take a minute if the corresponding postcss plugin is ready.
See the doc to add a feature https://github.com/MoOx/postcss-cssnext/blob/master/CONTRIBUTING.md#add-a-feature

@pascalduez

This comment has been minimized.

Show comment
Hide comment
@pascalduez

pascalduez Jun 7, 2016

Contributor

@MoOx I'll give it a spin, sorry for the delay.
I tried using the plugins together, there might be a few tweaks needed up the pipeline.

Contributor

pascalduez commented Jun 7, 2016

@MoOx I'll give it a spin, sorry for the delay.
I tried using the plugins together, there might be a few tweaks needed up the pipeline.

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