Skip to content

Latest commit

 

History

History
64 lines (35 loc) · 1.57 KB

_getcssstyles_.md

File metadata and controls

64 lines (35 loc) · 1.57 KB

Module: "getCSSStyles"

Index

Functions

Functions

Const getTextNodeCSS

getTextNodeCSS(node: TextNode): object

Defined in getCSSStyles.ts:60

get CSS styles of TextNode

Parameters:

Name Type
node TextNode

Returns: object

  • align-items: string = getStyleValue(node, 'textAlignVertical')

  • display: string = "flex"

  • font-family: string = ${getStyleValue(node, 'fontName.family', true)} ${getStyleValue( node, 'fontName.style', true )}

  • font-size: string = getStyleValue(node, 'fontSize')

  • font-style: string = getStyleValue(node, 'fontName.style', true)

  • font-weight: string = getStyleValue(node, 'fontName.style', true)

  • height: string = getStyleValue(node, 'height')

  • justify-content: string = getStyleValue(node, 'textAlignHorizontal')

  • left: string = getStyleValue(node, 'x')

  • letter-spacing: string = getStyleValue(node, 'letterSpacing')

  • line-height: string = getStyleValue(node, 'lineHeight')

  • position: string = "absolute"

  • text-decoration: string = getStyleValue(node, 'textDecoration', true)

  • text-indent: string = getStyleValue(node, 'paragraphIndent')

  • text-transform: string = getStyleValue(node, 'textCase')

  • top: string = getStyleValue(node, 'y')

  • width: string = getStyleValue(node, 'width')