rubymotion/teacup — pull request #119 by alexrothenberg (2013-09-17 15:05:29+00:00)
Title: Added the ability to "inherit" constraints when extending a style

If you define these styles
```ruby
Teacup::Stylesheet.new(:ipad) do
style :button,
constraints: [
constrain_height(22),
constrain_top(0)
]

style :tall_button, extends: :button,
constraints: [
constrain_height(44),
]
end
```

`:tall_button` will be `constrain_height(44)` and `constrain_top(0)`

The logic ensures that only one constraint for an attribute will be applied in the new style

It is not perfect: if you use a symbol in the base style such as `:top_left` and `constraints_top(8)` in the extended style both will exist incompatibly.

To get this working I had to make the Teacup merge_defaults module aware of constraints, but I could not think of any other way to do this.