rstudio / distill

Distill for R Markdown
https://rstudio.github.io/distill/
Apache License 2.0
423 stars 57 forks source link

navbar icon and text not working together #49

Open uhlitz opened 5 years ago

uhlitz commented 5 years ago

In navbars, one can only use text or icon to create an item, but not both. depending on the context, either the icon or the text will "win".

YAML example:

navbar:
  left:
    - text: "info"                           # text is disregarded
      icon: fa-list-alt                      # icon is considered
      href: index.html
    - text: "Preprocessing"                  # text is considered
      icon: fa-hourglass-half                # icon is disregarded
      menu:
        - text: "Preprocessing pipeline"     # text is disregarded
          icon: fa-hourglass-half            # icon is considered
          href: pre_pipeline.html
jjallaire commented 5 years ago

Yes, that's by design (menu icons and text are mutually exclusive)

dakvid commented 5 years ago

Is it a distill or radix design decision, and could it be changed? It would be nice to have both, as in "vanilla" RMarkdown https://rmarkdown.rstudio.com/rmarkdown_websites.htm#site_navigation

jjallaire commented 5 years ago

That's a radix design decision. The idea was that menus should be visually minimalistic and icons are there just for cases like a GitHub link. It certainly could be changed but that would require some CSS work that I don't have time for just now.

dakvid commented 5 years ago

OK, thanks for the explanation. It's good to understand the situation.