treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Mixin within Mixin

  • I know this may be a stupid question but is there a way to reference one Mixin within another.

    Here is an example of what I am trying. I'm trying to use the first mix within the second as the line height.

    .lineHeight(@sizeValue){
    @remValue: @sizeValue;
    @pxValue: (@sizeValue * 10);
    line-height: ~"@{pxValue}px";
    line-height: ~"@{remValue}rem";
    }


    	.baseFont(@weight: normal, @size: 14px, @lineHeight: (.lineHeight(2.1)) {
    font-family: @fontFamily;
    font-size: @size;
    font-weight: @weight;
    line-height: @lineHeight;
    }