docs: def _style_to_basic_html_attributes(self, element, style_content, force=False):
          """given an element and styles like
          'background-color:red; font-family:Arial' turn some of that into HTML
          attributes. like 'bgcolor', etc.
  
          Note, the style_content can contain pseudoclasses like:
          '{color:red; border:1px solid green} :visited{border:1px solid green}'
          """
          if style_content.count("}") and style_content.count("{") == style_content.count(
              "}"
          ):
              style_content = style_content.split("}")[0][1:]
  
          attributes = OrderedDict()
          for key, value in [
              x.split(":") for x in style_content.split(";") if len(x.split(":")) == 2
          ]:
              key = key.strip()
  
              if key == "text-align":
                  attributes["align"] = value.strip()
              elif key == "vertical-align":
                  attributes["valign"] = value.strip()
              elif key == "background-color" and "transparent" not in value.lower():
                  # Only add the 'bgcolor' attribute if the value does not
                  # contain the word "transparent"; before we add it possibly
                  # correct the 3-digit color code to its 6-digit equivalent
                  # ("abc" to "aabbcc") so IBM Notes copes.
                  attributes["bgcolor"] = self.six_color(value.strip())
              elif key == "width" or key == "height":
                  value = value.strip()
                  if value.endswith("px"):
                      value = value[:-2]
                  attributes[key] = value
  
          for key, value in attributes.items():
              if (
                  key in element.attrib
                  and not force
                  or key in self.disable_basic_attributes
              ):
                  # already set, don't dare to overwrite
                  continue
              element.attrib[key] = value