Last active
October 6, 2015 07:49
-
-
Save tolo/e9850d3d33ef632055b6 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
@font1: Superclarendon-BoldItalic 12; | |
@font2: AvenirNextCondensed-Medium 26; | |
@font3: Futura-CondensedExtraBold 32; | |
@font4: GillSans-BoldItalic 38; | |
@font5: Menlo-Bold 46; | |
#rootView { | |
backgroundColor: gradient(#fafafa, #e0e0e0); | |
} | |
#helloAppleLabel1, #helloAppleLabel2, #helloAppleLabel3, #helloAppleLabel4, #helloAppleLabel5 { | |
adjustsFontSizeToFitWidth: YES; | |
layout: left(parent.leftMargin + 30), right(parent.rightMargin - 30), centerY(parent - 20); | |
minimumScaleFactor: 0.5; | |
text: "Hello Apple"; | |
textAlignment: right; | |
} | |
#helloAppleLabel1 { | |
transform: translate(0, -80); | |
textColor: #7f7f7f; | |
font: @font1; | |
} | |
#helloAppleLabel2 { | |
transform: translate(0, -45); | |
textColor: #6f6f6f; | |
font: @font2; | |
} | |
#helloAppleLabel3 { | |
textColor: #5f5f5f; | |
font: @font3; | |
} | |
#helloAppleLabel4 { | |
transform: translate(0, 50); | |
textColor: #4f4f4f; | |
font: @font4; | |
} | |
#helloAppleLabel5 { | |
transform: translate(0, 105); | |
textColor: #3f3f3f; | |
font: @font5; | |
} | |
/* Adjustments for iPad: */ | |
#helloAppleLabel1:pad { | |
font: bigger(@font1, 3); | |
transform: translate(0, -100); | |
} | |
#helloAppleLabel2:pad { | |
font: bigger(@font2, 5); | |
transform: translate(0, -55); | |
} | |
#helloAppleLabel3:pad { | |
font: bigger(@font3, 7); | |
} | |
#helloAppleLabel4:pad { | |
font: bigger(@font4, 9); | |
transform: translate(0, 60); | |
} | |
#helloAppleLabel5:pad { | |
font: bigger(@font5, 11); | |
transform: translate(0, 130); | |
} | |
/* Adjustments for 4 inch iPhone and below: */ | |
#helloAppleLabel1:screenWidthLessThan(367) { | |
font: smaller(@font1, 3); | |
} | |
#helloAppleLabel2:screenWidthLessThan(367) { | |
font: smaller(@font2, 5); | |
} | |
#helloAppleLabel3:screenWidthLessThan(367) { | |
font: smaller(@font3, 7); | |
} | |
#helloAppleLabel4:screenWidthLessThan(367) { | |
font: smaller(@font4, 9); | |
} | |
#helloAppleLabel5:screenWidthLessThan(367) { | |
font: smaller(@font5, 11); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment