Re: [css-variables] Referencing all properties (Issue 4, !important)

>Trying to reference the value of other properties on the current
element is a non-starter, right off the bat.

In preprocessors there is some use to this, even if a bit dumb as it's not
a computed value just in context of the code block as written. The oddest
aspect is preventing the circular references, which in reality makes the
feature slightly farcical [1]


> Property references to the element's parent
*might* be possible, and there's nothing messing with that right now.

Quite useful in preprocessors, though, obviously not in the [css-variables]
way [2]

.foo {
    width: 40em;
    height: 100em;
}

.bar {
    width: query( .foo ); /* 40em */
    margin-top: query( .foo, height ); /* 100em */
    margin-right: query( .foo, top, auto ); /* auto */
    margin-bottom: query( .foo, default, 3em ); /* 3em */
}



[1] https://github.com/peteboere/css-crush/wiki/Functions#wiki-this
[2] https://github.com/peteboere/css-crush/wiki/Functions#wiki-query

Received on Friday, 14 September 2012 08:45:00 UTC