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

Access properties from other selectors #19

Open
silentmatt opened this issue Feb 9, 2010 · 0 comments
Open

Access properties from other selectors #19

silentmatt opened this issue Feb 9, 2010 · 0 comments
Labels

Comments

@silentmatt
Copy link
Owner

Using prop(name), you can reference existing properties. It should be possible to access properties from other selectors too.

Syntax ideas:

.floated-left {
    float: left;
    width: 100px;
}

.something-else {
    margin-left: prop({.floated-left}.width);
    margin-left: prop(.floated-left, width);
}

The first syntax opens the possibility of using {selector} as a generic "pseudo class". For example, you could do this:

.floated-left-bordered {
    apply: {.floated-left};  // Copy declarations from any rule with .floated-left as a selector
    apply: centered<100px>;
}
@ghost ghost assigned silentmatt May 26, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant