Skip to content

Remove fallback style

This merge request is based on !294 (merged) and can only be merged afterwards.

AttributeFallbackStyle is a mechanism that pulls style information from three sources: the inline style, presentation attributes and stylesheets that select the ID of the document.

In !294 (merged), true CSS support is added, which is a superset of that functionality.

However, the specified_style() has no idea about where a specific value comes from after it has been constructed. The best way to set a style to a given value still is the inline style attribute.

Therefore, the color replacement test now has slightly different output. Instead of touching CSS styles, everything is now written in the inline style element, giving the same visual output.

The argument "move=True" is never used in the entire code base except for unit tests.

As per the discussion below, the code has been removed instead of deprecated, for the following reasons:

  • the only use in the codebase (GIMP palette export) can be equivalently replaced by style.specified_style()
  • In the codebase, extensions that heavily use styles are surprisingly few in number
  • the code has not been shipped in 1.0
  • Together, it's considered unlikely that there are extensions based on this particular code out in the wild.
Edited by Jonathan Neuhauser

Merge request reports