Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added is-fullheight-with-spaced-navbar modifier for navbars that use is-spaced. #3623

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/documentation/layout/hero.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@
<p>
If you are using a <a href="{{ site.url }}/documentation/components/navbar/#fixed-navbar">fixed navbar</a>, you can use the <code>is-fullheight-with-navbar</code> modifier on the hero for it to occupy the viewport height minus the navbar height.
</p>
<p>
If the navbar contains the <code>is-spaced</code> modifier, you should use <code>is-fullheight-with-spaced-navbar</code> instead as this will account for the extra vertical spacing.
</p>
</div>


Expand Down
8 changes: 7 additions & 1 deletion sass/components/navbar.sass
Original file line number Diff line number Diff line change
Expand Up @@ -442,5 +442,11 @@ a.navbar-item,
// Combination

.hero
&.is-fullheight-with-navbar
&.is-fullheight-with-navbar,
&.is-fullheight-with-spaced-navbar
min-height: calc(100vh - #{$navbar-height})
.hero
&.is-fullheight-with-spaced-navbar
+desktop
min-height: calc(100vh - #{$navbar-height} - #{$navbar-padding-vertical*2})

3 changes: 2 additions & 1 deletion sass/layout/hero.sass
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ $hero-colors: $colors !default
padding: $hero-body-padding-large
&.is-halfheight,
&.is-fullheight,
&.is-fullheight-with-navbar
&.is-fullheight-with-navbar,
&.is-fullheight-with-spaced-navbar
.hero-body
align-items: center
display: flex
Expand Down