Skip to content

Supported Properties

Steve Hannah edited this page Mar 10, 2017 · 27 revisions

Standard CSS Properties

  1. padding (and variants)

  2. margin (and variants)

  3. border (and variants)

  4. border-radius

  5. background

  6. background-color

  7. background-repeat

  8. background-image

  9. font

  10. font-family

  11. font-style

  12. font-size

  13. @font-face

  14. color

  15. text-align

  16. text-decoration(Usage below)

  17. opacity

  18. box-shadow

  19. width (only used for generating background-images and borders)

  20. height (only used for generating background-images and borders)

Custom Properties

  1. cn1-source-dpi - Used to specify source DPI for multi-image generation of background images.

  2. cn1-background-type - Used to explicitly specify the background-type that should be used for the class.

  3. cn1-9patch - Used to explicitly specify the slices used when generating 9-piece borders.

  4. cn1-derive - Used to specify that this UIID should derive from an existing UIID.

CSS Property Reference

This section will contain more in-depth coverage of supported CSS properties and available values. It is not currently comprehensive as I need time to populate it.

text-decoration

Available Values

underline

Underlines text. E.g. text-decoration: underline;

overline

Overlines text. E.g. text-decoration: overline;

line-through

Strikes through text. E.g. text-decoration: line-through;

none

No text decoration. E.g. text-decoration: none;

cn1-3d

3D text. E.g. text-decoraton: cn1-3d;

cn1-3d-lowered

3D lowered text. E.g. text-decoration: cn1-3d-lowered;

cn1-3d-shadow-north

3D text with north shadow. E.g. text-decoration: cn1-3d-shadow-north;

background

The background property supports most standard CSS values for setting the background color, or background image. It also supports some special Codename One values, which are identifiers with a "cn1-" prefix. The following special values are available:

cn1-image-scaled

TODO

cn1-image-scaled-fill

TODO

cn1-image-scalled-fit

TODO

cn1-image-tile-both

TODO

cn1-image-tile-valign-left

TODO

cn1-image-tile-valign-center

TODO

cn1-image-tile-valign-right

TODO

cn1-image-tile-halign-top

TODO

cn1-image-tile-halign-center

TODO

cn1-image-tile-halign-bottom

TODO

cn1-image-align-bottom

TODO

cn1-image-align-left

TODO

cn1-image-align-right

TODO

cn1-image-align-center

TODO

cn1-image-align-top-left

TODO

cn1-image-align-top-right

TODO

cn1-image-align-bottom-left

TODO

cn1-image-align-bottom-right

TODO

cn1-image-border

TODO

cn1-none

TODO

cn1-round-border

TODO

cn1-pill-border

TODO

Clone this wiki locally