dwww Home | Show directory contents | Find package

# add/remove/list themes [plain]

    Code
      cli_par(class = "green")
      cli_text(lorem_ipsum())
    Message
      Non incididunt mollit ullamco duis officia proident. Laborum esse mollit mollit
      eiusmod tempor cupidatat. In commodo anim irure nostrud. Deserunt nisi amet
      laborum magna aliqua. Do esse consectetur ut deserunt nulla Lorem non. Fugiat
      est dolore deserunt aliqua amet et esse dolore elit exercitation sint
      exercitation non ipsum.
    Code
      cli_end()
    Message
      

# add/remove/list themes [ansi]

    Code
      cli_par(class = "green")
      cli_text(lorem_ipsum())
    Message
      Non incididunt mollit ullamco duis officia proident. Laborum esse mollit mollit
      eiusmod tempor cupidatat. In commodo anim irure nostrud. Deserunt nisi amet
      laborum magna aliqua. Do esse consectetur ut deserunt nulla Lorem non. Fugiat
      est dolore deserunt aliqua amet et esse dolore elit exercitation sint
      exercitation non ipsum.
    Code
      cli_end()
    Message
      

# add/remove/list themes [unicode]

    Code
      cli_par(class = "green")
      cli_text(lorem_ipsum())
    Message
      Non incididunt mollit ullamco duis officia proident. Laborum esse mollit mollit
      eiusmod tempor cupidatat. In commodo anim irure nostrud. Deserunt nisi amet
      laborum magna aliqua. Do esse consectetur ut deserunt nulla Lorem non. Fugiat
      est dolore deserunt aliqua amet et esse dolore elit exercitation sint
      exercitation non ipsum.
    Code
      cli_end()
    Message
      

# add/remove/list themes [fancy]

    Code
      cli_par(class = "green")
      cli_text(lorem_ipsum())
    Message
      Non incididunt mollit ullamco duis officia proident. Laborum esse mollit mollit
      eiusmod tempor cupidatat. In commodo anim irure nostrud. Deserunt nisi amet
      laborum magna aliqua. Do esse consectetur ut deserunt nulla Lorem non. Fugiat
      est dolore deserunt aliqua amet et esse dolore elit exercitation sint
      exercitation non ipsum.
    Code
      cli_end()
    Message
      

# explicit formatter is used, and combined

    Code
      cli_text("this is {.emph it}, really")
    Message
      this is (((<<it>>))), really

# user's override

    Code
      local({
        start_app(theme = custom, .auto_close = FALSE)
        cli_alert("Alert!")
        stop_app()
        withr::local_options(cli.user_theme = override)
        start_app(theme = custom, .auto_close = FALSE)
        cli_alert("Alert!")
        stop_app()
      })
    Message
      custom:Alert!
      custom:Alert!override:

# NULL will undo a style property

    Code
      local({
        cli_alert("this has an arrow")
        cli_div(theme = list(.alert = list(before = NULL)))
        cli_alert("this does not")
      })
    Message
      > this has an arrow
      this does not

# NULL will undo color [ansi]

    Code
      local({
        cli_alert("{.emph {.val this is blue}}")
        cli_div(theme = list(span.val = list(color = NULL)))
        cli_alert("{.emph {.val this is not}}")
      })
    Message
      > "this is blue"
      > "this is not"

---

    Code
      local({
        cli_alert("{.emph {.val this is blue}}")
        cli_div(theme = list(span.val = list(color = "none")))
        cli_alert("{.emph {.val this is not}}")
      })
    Message
      > "this is blue"
      > "this is not"

# NULL will undo background color [ansi]

    Code
      local({
        cli_alert("{.emph {.code this has bg color}}")
        cli_div(theme = list(span = list(`background-color` = NULL)))
        cli_alert("{.emph {.code this does not}}")
      })
    Message
      > `this has bg color`
      > `this does not`

---

    Code
      local({
        cli_alert("{.emph {.code this has bg color}}")
        cli_div(theme = list(span = list(`background-color` = "none")))
        cli_alert("{.emph {.code this does not}}")
      })
    Message
      > `this has bg color`
      > `this does not`

Generated by dwww version 1.15 on Thu May 23 11:19:54 CEST 2024.