Skip to content

Commit

Permalink
Fix issue with printed content in Firefox, fixes mrliptontea#50
Browse files Browse the repository at this point in the history
  • Loading branch information
mrliptontea committed Sep 5, 2017
1 parent e4821cf commit dbdcbce
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 95 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Latest (master):
* Introduce project tiles on projects list page (enabled by default, can be switched off by setting `$use-project-tiles` to `false`)
* Fixed #44: adjust width of the label column on the login form
* Merged #49: German translations
* Fixed #50: printed content on second page onwards was missing in Firefox
* Fixed #54: long checkbox lists will be scrollable
* Fixed #62: anchors won't scroll the page

Expand Down
38 changes: 38 additions & 0 deletions src/sass/components/_print.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@
display: none;
}

.pagination {
.pages,
.per-page {
display: none;
}
}

#main {
display: block;
overflow: visible !important; // scss-lint:disable ImportantRule
background: #fff;
}

Expand All @@ -32,10 +41,39 @@
overflow-x: visible;
}

a {
// scss-lint:disable ImportantRule
padding: 0 !important;
background-color: transparent !important;
color: #000 !important;

&::before,
&::after {
display: none !important;
}

&.issue.closed {
text-decoration: line-through;
}
}

table.list {
tr {
background-color: transparent;
}

th,
td {
border: 1px solid #aaa;
background-color: transparent;

&.buttons {
padding: 0;

a {
display: none;
}
}
}
}
}
192 changes: 98 additions & 94 deletions src/sass/javascripts/_sidebar-toggler.scss
Original file line number Diff line number Diff line change
@@ -1,115 +1,119 @@
@if $enable-sidebar-toggler {
$toggler-position-v: 1px;
$toggler-position-h: 1px;
$toggler-position-v: 1px;
$toggler-position-h: 1px;

#main {
position: relative;
#main {
position: relative;
}

#sidebar {
@if $fixed-layout {
will-change: margin, opacity;
transition: margin .5s, opacity .5s;
opacity: 1;
} @else {
will-change: margin;
transition: margin .5s;
}

#sidebar {
@if $fixed-layout {
will-change: margin, opacity;
transition: margin .5s, opacity .5s;
opacity: 1;
} @else {
will-change: margin;
transition: margin .5s;
}
&.sidebar-hiding {
@if $fixed-layout {
opacity: 0;
}
@if $sidebar-position == "left" {
margin-left: -$sidebar-width;
} @else {
margin-right: -$sidebar-width;
}
}

&.sidebar-hiding {
@if $fixed-layout {
opacity: 0;
}
@if $sidebar-position == "left" {
margin-left: -$sidebar-width;
} @else {
margin-right: -$sidebar-width;
}
}
&.sidebar-hidden {
display: none;
}
}

&.sidebar-hidden {
display: none;
}
.sidebar-toggler {
display: block;
position: absolute;
top: $toggler-position-v;
user-select: none;

@media print {
display: none;
}

.sidebar-toggler {
display: block;
position: absolute;
top: $toggler-position-v;
user-select: none;
@if $use-font-awesome {
@extend %fa-icon;
color: $gray-light;
line-height: 1;

@if $use-font-awesome {
@extend %fa-icon;
color: $gray-light;
line-height: 1;
&::before {
margin-right: 0;
}

&::before {
margin-right: 0;
}
&:hover,
&:focus,
&:active {
color: $gray;
}
} @else {
width: 15px;
height: 15px;
border-radius: $border-radius-base;
background-repeat: no-repeat;
background-position: center center;

&:hover,
&:focus,
&:active {
color: $gray;
}
} @else {
width: 15px;
height: 15px;
border-radius: $border-radius-base;
background-repeat: no-repeat;
background-position: center center;
&:hover,
&:focus,
&:active {
background-color: $gray-lighter;
}
}

@if $sidebar-position == "left" {
left: $toggler-position-h;

&:hover,
&:focus,
&:active {
background-color: $gray-lighter;
}
@if $use-font-awesome {
&::before {
content: $fa-var-caret-square-o-left;
}
} @else {
@extend %image-arrow-left;
}
} @else {
right: $toggler-position-h;

@if $sidebar-position == "left" {
left: $toggler-position-h;
@if $use-font-awesome {
&::before {
content: $fa-var-caret-square-o-right;
}
} @else {
@extend %image-arrow-right;
}
}

@if $use-font-awesome {
&::before {
content: $fa-var-caret-square-o-left;
}
} @else {
@extend %image-arrow-left;
}
&.sidebar-hidden {
@if $sidebar-position == "left" {
@if $use-font-awesome {
&::before {
content: $fa-var-caret-square-o-right;
}
} @else {
right: $toggler-position-h;

@if $use-font-awesome {
&::before {
content: $fa-var-caret-square-o-right;
}
} @else {
@extend %image-arrow-right;
}
@extend %image-arrow-right;
}

&.sidebar-hidden {
@if $sidebar-position == "left" {
@if $use-font-awesome {
&::before {
content: $fa-var-caret-square-o-right;
}
} @else {
@extend %image-arrow-right;
}
} @else {
@if $use-font-awesome {
&::before {
content: $fa-var-caret-square-o-left;
}
} @else {
@extend %image-arrow-left;
}
}
} @else {
@if $use-font-awesome {
&::before {
content: $fa-var-caret-square-o-left;
}
} @else {
@extend %image-arrow-left;
}
}
}
}
} @else {
.sidebar-toggler {
display: none;
}
.sidebar-toggler {
display: none;
}
}
2 changes: 1 addition & 1 deletion stylesheets/application.css

Large diffs are not rendered by default.

0 comments on commit dbdcbce

Please sign in to comment.