Chat.element_width — alfred3_interact

Skip to main content
`Ctrl`+`K`

# Chat.element_width

property Chat.element_width: str

  Returns a string of column width definitions.

  Manually setting the width

  The element width list can contain up to 5 width definitions, specified as integers from 1 to 12. The integers refer to the five breakbpoints in Bootstrap 4’s 12-column-grid system, i.e. [xs, sm, md, lg, xl]:

      >>> element = Element()
      >>> element.element_width = [12, 8, 8, 7, 6]
      element.element_width
      "col-12 col-sm-8 col-md-8 col-lg-7 col-xl-6"

  Width resultion order

  If there is no width defined for a certain screen size, the next smaller entry is used. For example, the following definition will lead to full width on extra small screens and 8/12 widths on all larger widths:

      element = Element()
      element.element_width = [12, 8]

  To make an element full-width on extra small and small screens and half-width on medium, large and extra large screens, follow this example:

      element = Element()
      element.element_width = [12, 12, 6]

  Type

    str