Skip to content

Shouldn't exported CSS use hierarchical styles? #44

@uliska

Description

@uliska

I'm not really sure how the proper CSS term is. But when working on #42 and frescobaldi/frescobaldi#697 I realized that the generated CSS might not be completely appropriate.

We produce a #document style (after the PR this might also be .lilypond or something else) and then "flat" styles like e.g. .comment. However, this might interfere with a page's CSS if the designer decided to have .comment styles for something else on the page. The styles with prefixes in their names (e.g. span.lilypond-beam) are safer but still are "flat".

I think the styles should be generated like

#document {
  background: #f3f3f3;
  color: #212121;
}

#document .comment {
  color: #808080;
  font-style: italic;
}

or respectively if the user decides to use something else instead of #document.

I may give that a try myself but wanted to have it discussed first.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions