removeShorthandFont static method

void removeShorthandFont(
  1. CSSStyleDeclaration style, [
  2. bool? isImportant
])

Implementation

static void removeShorthandFont(CSSStyleDeclaration style, [bool? isImportant]) {
  if (style.contains(FONT_STYLE)) style.removeProperty(FONT_STYLE, isImportant);
  if (style.contains(FONT_WEIGHT)) style.removeProperty(FONT_WEIGHT, isImportant);
  if (style.contains(FONT_SIZE)) style.removeProperty(FONT_SIZE, isImportant);
  if (style.contains(LINE_HEIGHT)) style.removeProperty(LINE_HEIGHT, isImportant);
  if (style.contains(FONT_FAMILY)) style.removeProperty(FONT_FAMILY, isImportant);
}