Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[css] more documentation of supported properties

  • Loading branch information...
commit aaad832748b642917f97b73a437dd5ebb2528b3e 1 parent 077786e
Max Metral authored
Showing with 35 additions and 1 deletion.
  1. +35 −1 src/css/src/NimbusCSS.h
View
36 src/css/src/NimbusCSS.h
@@ -143,9 +143,31 @@ UIView {
border: <dimension> <ignored> <color> {view.layer.borderWidth view.layer.borderColor}
border-color: <color> {view.layer.borderColor}
border-width: <dimension> {view.layer.borderWidth}
- background-color: <color> {view.backgroundColor}
+ background-color: <color|image_name> {view.backgroundColor}
border-radius: <dimension> {view.layer.cornerRadius}
opacity: xx.xx {view.alpha}
+ -ios-autoresizing: [left|top|right|bottom|width|height|all|margins|dimensions] {view.autoresizingMask}
+ visibility: [hidden|visible] {view.hidden}
+ width: [x%,xpx,auto] {view.frameWidth}
+ height: [x%,xpx,auto] {view.frameHeight}
+ padding: <vertical unit> <horizontal unit> {used in auto height and width calculations}
+ -mobile-hpadding: <horizontal unit> {used in auto width}
+ -mobile-vpadding: <vertical unit> {used in auto height}
+ max-width: [x%,xpx] {view.frameWidth}
+ max-height: [x%,xps] {view.frameHeight}
+ min-width: [x%,xpx] {view.frameWidth}
+ min-height: [x%,xps] {view.frameHeight}
+ top: [x%,xpx] {view.frameMinY}
+ left: [x%,xpx] {view.frameMinX}
+ bottom: [x%,xpx] {view.frameMaxY}
+ right: [x%,xpx] {view.frameMaxX}
+ -mobile-halign: [left|right|center] {view.frameX}
+ -mobile-valign: [top|bottom|middle] {view.frameY}
+ -mobile-relative: [#id|.prev|.next|.first|.last] {controls the position of the view relative to another view}
+ margin-top: [x%,xpx,auto] {distance from view.frameMinY to relative.frameMaxY - % is relative to size of relative element, px is absolute, auto aligns the vertical centers}
+ margin-bottom: [x%,xpx,auto] {distance from view.frameMaxY to relative.frameMinY - % is relative to size of relative element, px is absolute, auto aligns the vertical centers}
+ margin-left: [x%,xpx,auto] {distance from view.frameMinX to relative.frameMaxX - % is relative to size of relative element, px is absolute, auto aligns the horizontal centers}
+ margin-right: [x%,xpx,auto] {distance from view.frameMaxX to relative.frameMinX - % is relative to size of relative element, px is absolute, auto aligns the horizontal centers}
}
UILabel {
@@ -170,11 +192,23 @@ UILabel {
-ios-minimum-font-size: <font-size> {label.minimumFontSize}
-ios-adjusts-font-size: [true|false] {label.adjustsFontSizeToFitWidth}
-ios-baseline-adjustment: [align-baselines|align-centers|none] {label.baselineAdjustment}
+ -mobile-text-key: "Key Name" {attaches a localized string (or the key name if not found) to this label}
}
UIButton {
+ -mobile-title-insets
+ -mobile-content-insets
+ -mobile-image-insets
+ font: <font-size> <font-name> {button.font}
+
+ Buttons also support pseudo selectors: :selected,:highlighted,:disabled with the following rules:
color: <color> {[button titleColorForState:]}
text-shadow: <color> {[button titleShadowColorForState:]}
+ -mobile-image: url(image_name)
+ -mobile-text-key: "Key Name" {attaches a localized string (or the key name if not found) to this button}
+ background-image: url(image_name)
+ -mobile-background-stretch: top left bottom right
+ -ios-button-adjust
}
UINavigationBar {
Please sign in to comment.
Something went wrong with that request. Please try again.