[Enhancement] overwritable @mixin´s #420

Closed
SunboX opened this Issue Jun 18, 2012 · 5 comments

Projects

None yet

2 participants

@SunboX
SunboX commented Jun 18, 2012

Hi, I´m using large Sass templates from a third party company. Now I want to customise these templates. So I´ve to overwrite some @mixin´s but this doesn´t work by now. :( I also want to call the "parent" mixin so I just can put my changes in there, like this:

third party template:

@mixin large-text {
    font-family: Arial;
    color: #FF0000;
}

my customization:

@mixin large-text {
    @callParent;

    // overwrite color of original mixin:
    color: #0000FF;
}

I can´t add these changes directly to the original template, cause it gets updated time by time and I´ve to re-apply all custom changes again. That´s really frustrating ...

@SunboX
SunboX commented Jun 18, 2012

Same will apply to @function´s

third party template:

@function grid-width($n) {
    @return $n * 10;
}

my customization:

@function grid-width($n) {
    $ret = callParent($n);

    @return $ret * 1.5;
}
@chriseppstein
Member

Something like this is needed. perhaps this might tie into a module system, @nex3?

@chriseppstein
Member

duplicate of #240

@SunboX
SunboX commented Aug 8, 2012

No, it's not (!) a duplicate of #240 !

@chriseppstein
Member

It is from our perspective :) We'll consider both of these concepts and address them with a single solution.

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