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

Using @extend with existing complex structure in parent #22

Closed
jvandijk opened this issue Dec 13, 2014 · 0 comments
Closed

Using @extend with existing complex structure in parent #22

jvandijk opened this issue Dec 13, 2014 · 0 comments
Assignees
Milestone

Comments

@jvandijk
Copy link
Contributor

Hey Ronald,

While using @extend I ran into an issue when extending a class that has a font definition in it.

With the following base STSS setup:

.textField {
    color: $black;
    font: {
        family: $primaryFont;
        size: $secondaryFontSize;
    }
    left: "3%";
    @media ios {
        width: "94%";
    }
    @media android {
        width: "94%";
    }
}

.textfieldWithLabel {
    @extend .textField;
    @media ios {
        width: "88%";
    }
    @media android {
        width: "88%";
    }
}

The TSS output is as follows, take note of the font definition:

".textField": {
    color: "#000000",
    font: {
        fontFamily: "RobotoSlab-Bold",
        fontSize: "20dp"
    },
    left: "3%"
},
".textfieldWithLabel": {
    color: "#000000",
    font: "-stss-ph1",
    left: "3%"
},
".textField[platform=ios]": {
    width: "94%"
},
".textField[platform=android]": {
    width: "94%"
},
".textfieldWithLabel[platform=ios]": {
    width: "88%"
},
".textfieldWithLabel[platform=android]": {
    width: "88%"
}

I really don't what is going on there....

@jvandijk jvandijk changed the title Extending with existing complex structure in parent Using @extend with existing complex structure in parent Dec 13, 2014
@RonaldTreur RonaldTreur added this to the 0.4 milestone May 1, 2015
@RonaldTreur RonaldTreur self-assigned this Jul 31, 2015
@RonaldTreur RonaldTreur modified the milestones: 0.4, v0.4.1 Jul 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants