Is it possible to refer to a property previously defined in a selector without introducing an intermediate variable?
I\'d like to say something like:
If its an option to use an other preprocessor then scss, I really recommend using Stylus. There is a feature called Property lookup which is exactly what you want.
No, you can't, and it would be great.
I haven't tested, but as far as I know the only css pre-processor that can do that is stylus. Look at the variable section in its documentation, where it says Property Lookup. It works that way:
.foo {
padding: 15px;
width: 300px - @padding * 2;
}
But no, in Sass you can't, as far as I'm concerned.