Skip to content

Property reference ​

Every CSS property MasonKit elements understand, in alphabetical order. Shorthands share a row with their longhands. "Inherited" means a value set on a Mason element reaches its Mason descendants, as in CSS; inheritance does not cross into or out of plain NativeScript views (see Mixing with NativeScript views).

Values are summarized; follow the link in the last column for details and examples. Unless a note says otherwise, a property works on iOS, Android and Windows.

Lengths accept a bare number (CSS px), px, dip, dppx (device pixel), pt, em, rem, %, vw, vh, vmin, vmax and calc()/min()/max()/clamp(), unless noted. See Units.

PropertyValuesInheritedNotesSee
align-contentnormal, start, end, flex-start, flex-end, center, stretch, space-between, space-around, space-evenlynoFlexbox, Grid
align-itemsnormal, start, end, flex-start, flex-end, center, baseline, stretchnoFlexbox
align-selfas align-itemsnoFlexbox
aspect-ratioa number or <w> / <h>noBox model
backdrop-filterfilter functions, as filternodrop-shadow() has no effectEffects
background, background-color, background-image, background-position (-x, -y), background-size, background-repeatCSS background syntax, multiple layers; background-repeat includes space and roundnoBackgrounds
background-origin, background-clip, background-attachment, background-blend-modebox keywords, plus text for the clip; scroll/fixed/local; blend modesnoBlend modes need Android 10 (API 29)Backgrounds
block-size, min-block-size, max-block-sizeas height, min-height, max-heightnoLogical: the height in horizontal text, the width in vertical textBox model
border, border-top, border-right, border-bottom, border-left<width> <style> <color>noBorders
border-block, border-inline, border-block-start, border-block-end, border-inline-start, border-inline-end (and -width, -style, -color)as the physical formsnoLogical, mapped by writing mode and directionBorders
border-color, border-top-color, border-right-color, border-bottom-color, border-left-colorcolors, 1 to 4 valuesnoBorders
border-imagesource, slice, width, outset, repeatnoBorders
border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radiuslengths, percentages, / for elliptical cornersnoBorders
border-start-start-radius, border-start-end-radius, border-end-end-radius, border-end-start-radiusas the physical cornersnoLogical corners, mapped by writing mode and directionBorders
border-style, border-top-style, border-right-style, border-bottom-style, border-left-stylenone, hidden, dotted, dashed, solid, double, groove, ridge, inset, outsetnoBorders
border-width, border-top-width, border-right-width, border-bottom-width, border-left-widthlengths, thin, medium, thicknoBorders
bottom, left, right, toplength, percentage, autonoPositioning
box-shadow[inset] <x> <y> [blur] [spread] [color], comma separatednoBox shadows
box-sizingborder-box, content-boxnoDefaults to border-box, unlike browsersBox model
caret-colorauto, a coloryesInputsTypography
clearnone, left, right, bothnoFlow
clip-pathbasic shapes, reference boxes, nonenoEffects
colora coloryesTypography
column-gap, row-gap, gaplengths, percentages; gap takes 1 or 2 valuesnogrid-gap, grid-row-gap and grid-column-gap are accepted as legacy aliasesFlexbox, Grid
corner-shape, corner-shape-top-left, corner-shape-top-right, corner-shape-bottom-right, corner-shape-bottom-leftround, squircle, square, bevel, scoop, notch, superellipse(<number>)noBorders
directionltr, rtlyesTypography
displaynone, block, inline, inline-block, flex, inline-flex, grid, inline-gridnoFlow
filterblur(), brightness(), contrast(), drop-shadow(), grayscale(), hue-rotate(), invert(), opacity(), saturate(), sepia()noEffects
flexnone, auto, <grow> [<shrink>] [<basis>]noShorthand for flex-grow, flex-shrink, flex-basisFlexbox
flex-basisauto, length, percentage, content, min-content, max-content, fit-contentnoFlexbox
flex-directionrow, row-reverse, column, column-reversenoFlexbox
flex-flow<direction> <wrap>noShorthandFlexbox
flex-grow, flex-shrinknumbersnoFlexbox
flex-wrapnowrap, wrap, wrap-reversenoFlexbox
floatnone, left, rightnoFlow
font-familya family listyesTypography
font-feature-settingsnormal, OpenType feature tagsnoSet it on the text element itselfTypography
font-sizelength, percentage, em, remyesTypography
font-stretchkeywords, percentageyesAndroid 12 (API 31) with a variable font; iOS needs a condensed or expanded faceTypography
font-stylenormal, italic, obliqueyesTypography
font-weightnormal, bold, 100 to 900yesTypography
grid-area, grid-row, grid-row-start, grid-row-end, grid-column, grid-column-start, grid-column-endline numbers, line names, span <n>, area names, autonoGrid
grid-auto-columns, grid-auto-rowstrack size listnoGrid
grid-auto-flowrow, column, dense, row dense, column densenoGrid
grid-template-areasquoted area stringsnoGrid
grid-template-columns, grid-template-rowstrack lists, repeat(), minmax(), fr, auto-fill, auto-fitnoGrid
height, widthauto, length, percentage, min-content, max-content, fit-content, fit-content(<length>), stretchnoBox model
hyphensnone, manual, autoyesTypography
inline-size, min-inline-size, max-inline-sizeas width, min-width, max-widthnoLogical: the width in horizontal text, the height in vertical textBox model
inset1 to 4 values of top, right, bottom, leftnoShorthandPositioning
inset-block, inset-inline, inset-block-start, inset-block-end, inset-inline-start, inset-inline-endas insetnoLogical, follows the writing mode and directionBox model
justify-contentas align-contentnoFlexbox
justify-itemsas align-itemsnoGrid
justify-selfas align-selfnoGrid
letter-spacingnormal, lengthyesTypography
line-clamp, -webkit-line-clampnone, a number of linesnoTypography
line-heightnormal, number (multiplier), lengthyesA bare number set from code below 4 is a multiplier, otherwise CSS pxTypography
list-style, list-style-type, list-style-positionnone, disc, circle, square, decimal; inside, outsideyesLists
margin, margin-top, margin-right, margin-bottom, margin-leftlength, percentage, autonoBox model
margin-block, margin-inline, margin-block-start, margin-block-end, margin-inline-start, margin-inline-endas marginnoLogicalBox model
mask, mask-image, mask-mode, mask-position, mask-size, mask-repeat, mask-origin, mask-clip, mask-compositeCSS masking syntaxno-webkit-mask* forms acceptedEffects
mask-border, mask-border-source, mask-border-slice, mask-border-width, mask-border-outset, mask-border-repeat, mask-border-mode9-slice mask syntaxno-webkit-mask-box-image acceptedEffects
max-height, max-width, min-height, min-widthlength, percentage, autonoSizing keywords (min-content, ...) are not acceptedBox model
object-fitfill, contain, cover, none, scale-downnoImagesEffects
object-positionkeywords, lengths, percentagesnoImagesEffects
opacity0 to 1noEffects
overflow, overflow-x, overflow-yvisible, hidden, clip, scroll, autonooverflow-inline and overflow-block map by writing modeScrolling
padding, padding-top, padding-right, padding-bottom, padding-leftlength, percentagenoBox model
padding-block, padding-inline, padding-block-start, padding-block-end, padding-inline-start, padding-inline-endas paddingnoLogicalBox model
place-content, place-items, place-self<align> [<justify>]noShorthandsGrid
positionstatic, relative, absolute, fixed, stickynoPositioning
scrollbar-widtha numbernoA width, not the CSS auto/thin/none keywordsScrolling
text-alignleft, right, center, justify, start, endyesTypography
text-decoration, text-decoration-line, text-decoration-style, text-decoration-color, text-decoration-thicknessfull CSS values, including overline and wavynoTypography
text-indentlength, percentageyesTypography
text-justifyauto, none, inter-word, inter-character, distributeyesWindows honours none onlyTypography
text-orientationmixed, upright, sidewaysyesFlow
text-combine-uprightnone, all, digits (2-4)yesVertical textFlow
text-spacing-trimnormal, space-all, space-first, trim-start, trim-both, trim-all, autoyesLine-start and line-end trims on iOS and AndroidTypography
text-overflowclip, ellipsisnoTypography
text-shadow<x> <y> [blur] [color], comma separatedyesTypography
text-transformnone, capitalize, uppercase, lowercaseyesTypography
text-wrapwrap, nowrap, balance, pretty, stableyesbalance, pretty and stable lay out as wrapTypography
touch-actionauto, none, manipulation, pan-x, pan-y, pinch-zoomnoEvents
transformtransform functionsno3D functions are flattened to 2D; platform differences in the linked tableEffects
transform-originkeywords, lengths, percentagesnoEffects
unicode-bidinormal, embed, bidi-override, isolate, isolate-override, plaintextnoTypography
vertical-alignbaseline, sub, super, text-top, text-bottom, middle, top, bottom, length, percentagenoInline contentTypography
visibilityvisible, hiddennoHandled by NativeScript core; keeps the element's spaceEffects
white-spacenormal, pre, pre-wrap, pre-line, nowrap, break-spacesyesTypography
word-spacingnormal, length, percentageyesAndroid needs Android 10 (API 29)Typography
writing-modehorizontal-tb, vertical-rl, vertical-lryesVertical containers lay out their children verticallyFlow
z-indexan integernoPositioning

Not supported ​

These have no effect on MasonKit elements today:

  • order
  • outline and its longhands (use a spread box-shadow for focus rings)
  • font-weight: bolder / lighter, font-style: oblique <angle>
  • perspective and 3D rendering (3D transform functions are flattened to 2D, and iOS ignores most of them)
  • display: contents, grid-template and grid shorthands
  • transition
  • url() references to SVG filters, masks and paint servers

Stylesheet features ​

Selectors, classes, @media, @keyframes, var() custom properties, specificity and pseudo-classes come from NativeScript's CSS engine; MasonKit registers its properties into it, so all of the above work in .css and .scss files and in inline style attributes. See How CSS applies.

Released under the Apache 2.0 License.