Bug 149271 - Support composition of multiple styles of the same kind
Summary: Support composition of multiple styles of the same kind
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected) alpha0+
Hardware: All All
: medium enhancement
Assignee: Not Assigned
Depends on:
Blocks: ODF-import Styles
  Show dependency treegraph
Reported: 2022-05-24 20:38 UTC by Eyal Rozenberg
Modified: 2022-05-24 21:09 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2022-05-24 20:38:28 UTC
If we think of styling/formatting in HTML documents, we'll notice that, like in LO, you have direct formatting - setting the style="..." attribute of a single element; and we also LO-like "styles" in the form of CSS classes.

One interesting difference between CSS classes and LO styles is, that a single element can have _multiple_ styles applied to it at once.

LO should also support this.

In writer, an obvious example would be "Internet Link" and "Emphasis". Why can't I have a segment of text (within some paragraph) which is emphasized, and also contains an "Internet Link"?

But this is also relevant for paragraph styles. Say, "Footer" and "Blockquote". I can put a blockquote in a footer if I want to, right?

Same goes for page styles: There's an "RTL page" style; and you could have a page style with decorated margins. Surely it makes sense to combine them.

Proper support for combinations of styles is important for encouraging the use of styles over direct formatting - as the unattainable combinations tend to make people use DF rather than generate the 2^n combinations they may be interested in.

Related bugs:

* Bug 115311 - UI missing for nesting character styles. Nesting is similar to just combining styles, but perhaps not exactly the same thing; also, I'm generalizing to other styles as well
* Bug 149230 - Create sketches for ajlittoz's vision of a UI promoting the use of styles
* Bug 127702 - Support setting quantitative font features relatively to underlying paragraph style. There would need to be an ever more expansive support for making style specs relative and partial.
* Bug 108498 - Character styles not working against the underlying paragraph style. See discussion there regarding whether (character) styles need to be relative/differential and to what.
Comment 1 Regina Henschel 2022-05-24 21:02:32 UTC
What you are looking for is near to the ODF attribute text:class-names.

That is not implemented in LO.

Currently you can only make a hierarchical tree of styles using inheritance.

So I take this as enhancement request to implement the attribute "text:class-names".