Skip to content

Allow nested span with inherited styles #24

Description

@killercup

It's not possible to have nested spans that inherit the parent's styles. One migth expect this however:

  • span!(bg="red", [span!(fg="white", ["Error"]),]); shows the word "Error" as white text on red background.

What do you think? Is this a good idea or not?


This is because of this reset call:

https://github.com/killercup/output-rs/blob/abbe3f145954358457bf542af207784324e39290/src/components/span.rs#L110

It might make sense to call this here instead/additionally:

https://github.com/killercup/output-rs/blob/abbe3f145954358457bf542af207784324e39290/src/lib.rs#L75-L78

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    design decision requiredIt's not yet decided how best to implement this.help wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions