Last active
December 26, 2015 12:08
-
-
Save mikkoh/7148421 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//POSSIBLE CONDITIONAL SYNTAX | |
node1.matchesWidthOf( layout ) | |
.ifWidthGreaterThan( layout, 600 ).widthIsAPercentageOf( layout, 0.5 ) | |
.ifWidthSmallerThan( layout, 200 ).widthIsAPercentageOf( layout, 0.2 ); | |
//OTHER POSSIBLE CONDITIONAL SYNTAX | |
node1.matchesWidthOf( layout ) | |
.is( layout ).widthGreaterThan( 600 ).widthIsAPercentageOf( layout, 0.5 ) | |
.is( layout ).widthGreaterThan( 200 ).widthIsAPercentageOf( layout, 0.2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I know flexibility comes at a cost of straightforwardness, but what about:
That way, you could control "y" by another's "height" and so on.