Skip to content

Commit

Permalink
Hide empty content areas.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaspar Naaber committed Mar 2, 2017
1 parent 4553678 commit 03b5e2c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions sources/stylesheets/_content-formatted.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// NB! Each editable content-area - {% content %} - should be wrapped in the element that has the "content-formatted" class.
// NB! Contact forms and image galleries are located in the separate partials: "_forms.scss" and "_gallery.scss".
.content-formatted {
&:empty {
display: none;
}

@extend %clearfix;
@include hyphenate(true);

Expand Down
3 changes: 3 additions & 0 deletions stylesheets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ body.dark-background {
-ms-hyphens: auto;
hyphens: auto;
}
.content-formatted:empty {
display: none;
}
.dark-background .content-formatted {
color: white;
}
Expand Down
Loading

0 comments on commit 03b5e2c

Please sign in to comment.