removeProperty method

void removeProperty(
  1. String propertyName, [
  2. bool? isImportant
])

Removes a property from the CSS declaration.

Implementation

void removeProperty(String propertyName, [bool? isImportant]) {
  propertyName = normalizePropertyName(propertyName);
  switch (propertyName) {
    case PADDING:
      return CSSStyleProperty.removeShorthandPadding(this, isImportant);
    case MARGIN:
      return CSSStyleProperty.removeShorthandMargin(this, isImportant);
    case INSET:
      return CSSStyleProperty.removeShorthandInset(this, isImportant);
    case BACKGROUND:
      return CSSStyleProperty.removeShorthandBackground(this, isImportant);
    case BACKGROUND_POSITION:
      return CSSStyleProperty.removeShorthandBackgroundPosition(this, isImportant);
    case BORDER_RADIUS:
      return CSSStyleProperty.removeShorthandBorderRadius(this, isImportant);
    case GRID_TEMPLATE:
      return CSSStyleProperty.removeShorthandGridTemplate(this, isImportant);
    case GRID:
      return CSSStyleProperty.removeShorthandGrid(this, isImportant);
    case PLACE_CONTENT:
      return CSSStyleProperty.removeShorthandPlaceContent(this, isImportant);
    case PLACE_ITEMS:
      return CSSStyleProperty.removeShorthandPlaceItems(this, isImportant);
    case PLACE_SELF:
      return CSSStyleProperty.removeShorthandPlaceSelf(this, isImportant);
    case OVERFLOW:
      return CSSStyleProperty.removeShorthandOverflow(this, isImportant);
    case FONT:
      return CSSStyleProperty.removeShorthandFont(this, isImportant);
    case FLEX:
      return CSSStyleProperty.removeShorthandFlex(this, isImportant);
    case FLEX_FLOW:
      return CSSStyleProperty.removeShorthandFlexFlow(this, isImportant);
    case GAP:
      return CSSStyleProperty.removeShorthandGap(this, isImportant);
    case GRID_ROW:
      return CSSStyleProperty.removeShorthandGridRow(this, isImportant);
    case GRID_COLUMN:
      return CSSStyleProperty.removeShorthandGridColumn(this, isImportant);
    case GRID_AREA:
      return CSSStyleProperty.removeShorthandGridArea(this, isImportant);
    case BORDER:
    case BORDER_TOP:
    case BORDER_RIGHT:
    case BORDER_BOTTOM:
    case BORDER_LEFT:
    case BORDER_INLINE_START:
    case BORDER_INLINE_END:
    case BORDER_BLOCK_START:
    case BORDER_BLOCK_END:
    case BORDER_COLOR:
    case BORDER_STYLE:
    case BORDER_WIDTH:
      return CSSStyleProperty.removeShorthandBorder(this, propertyName, isImportant);
    case TRANSITION:
      return CSSStyleProperty.removeShorthandTransition(this, isImportant);
    case TEXT_DECORATION:
      return CSSStyleProperty.removeShorthandTextDecoration(this, isImportant);
    case ANIMATION:
      return CSSStyleProperty.removeShorthandAnimation(this, isImportant);
  }
  _properties.remove(propertyName);
}