app/styles/main_styles.rb in teacup-1.3.4 vs app/styles/main_styles.rb in teacup-2.0.0
- old
+ new
@@ -1,17 +1,17 @@
-Teacup::Stylesheet.new(:first) do
+Teacup::Stylesheet.new(:main) do
# enable orientations on the root view
style :root,
left: 0,
top: 0,
width: 320,
height: 480,
backgroundColor: UIColor.yellowColor,
- portrait: true,
- upside_down: false,
+ portrait: true,
+ upside_down: false,
layer: {
cornerRadius: 10.0,
},
@@ -19,17 +19,17 @@
backgroundColor: UIColor.redColor,
},
landscape_left: {
layer: {
- transform: spin(identity, -pi / 2),
+ transform: transform_layer.spin(-pi / 2),
},
},
landscape_right: {
layer: {
- transform: spin(identity, pi / 2),
+ transform: transform_layer.spin(pi / 2),
},
}
style(UILabel, {
textColor: UIColor.blueColor,
@@ -48,10 +48,11 @@
style(:background, {
alpha: 0.5,
left: 10,
top: 30,
backgroundColor: UIColor.blackColor,
+ custom_attr: :custom_value,
portrait: {
width: 300,
height: 440,
backgroundColor: UIColor.darkGrayColor,
@@ -88,24 +89,25 @@
},
})
style :next_message,
- width: 130,
height: 20,
portrait: nil,
title: "Next Message..."
# deliberately declaring this twice for testing purposes
# (declaring twice extends it)
style :next_message,
portrait: {
left: 150,
top: 370,
+ width: 140, # this should get overridden
},
landscape: {
left: 20,
top: 200,
+ width: 140, # this should get overridden
}
end