tidyverse / tidytemplate

A pkgdown template for core tidyverse packages
https://tidytemplate.tidyverse.org
Other
46 stars 22 forks source link

Home page sidebar conflict with navbar #67

Closed cderv closed 2 years ago

cderv commented 2 years ago

This is how it looks image

No issue on other page image

I suppose this is a template issue as it doesn't happen with pkgdown itself

image

We have that in site using tidytemplate image

image

cderv commented 2 years ago

It seems related to a conflict in CSS rules. aside is supposed to be taking account of navbar height https://github.com/tidyverse/tidytemplate/blob/adcdac4a16ccea004763fb54ba1772b92636e24c/inst/pkgdown/BS5/extra.scss#L115-L117

However, two other rules got in the way image

For the other page, it works because it is taken into accound in #toc https://github.com/tidyverse/tidytemplate/blob/adcdac4a16ccea004763fb54ba1772b92636e24c/inst/pkgdown/BS5/extra.scss#L110-L112

Probably the first two rules are Bootstrap rules ?

We may need to add specificity to the current rule, or change the way it applies in aside. (like to as with #TOC for any first child into <aside> ?)

gadenbuie commented 2 years ago

You're right, we should increase the specificity of the aside CSS rule. At the very least the margin-top property needs to be applied to .row > aside.

Personally I'd prefer a rule that specifically targets <aside> elements in the content sidebar.

gadenbuie commented 2 years ago

@cderv Actually the problem can be resolved for quillt by adding

template:
  bslib:
    pkgdown-nav-height: 90px

I still think the tidytemplate aside rule should be made a little more specific. But also the tidytemplate CSS is probably a little out of date with the recent changes to the pkgdown css.

Edit: 90px seems to be a better value

hadley commented 2 years ago

Sorry for missing this; I'll fix first thing next year.