When printing out a page, the navbar module is also printed out expanded together with all the action links. I suspect only a very few people needs the navbar, action links and tabs printed out?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lsolesen’s picture

Status: Active » Needs review
FileSize
1.2 KB
saltednut’s picture

Project: Ember » Navbar
Version: 7.x-2.x-dev » 7.x-1.x-dev

This seems more like a problem with Navbar itself. If we commit this in Ember we are only fixing it for Ember and not everyone that uses the navbar.

is this also a problem in Drupal 8? If so, this should be a D8 issue for the Toolbar that gets backported to Navbar.

I am moving it to the Navbar issue queue for now.

Grayside’s picture

#1892006: Include a print styling for Seven. has been a discussion of a basic print stylesheet for Seven with an emphasis on removing the toolbar.

hass’s picture

Status: Needs review » Needs work

The attached patch is not for Navbar. CNW. We should remove the navbar in print view for sure.

hass’s picture

Title: Make pages printable » Remove navbar from print view
hass’s picture

This should do the trick. Need to create a patch for it and for RTL and check out D8 again. The second rule is not 100% verified yet.

@media print {
  body {
    padding-top: 0;
  }
  body.navbar-tray-open.navbar-vertical.navbar-fixed {
    margin-left: 0; /* LTR */
  }
  #navbar-administration {
    display: none !important;
  }
}
hass’s picture

Vertical print view is broken in core, too. At least in seven and should be a module style and not theme style.

hass’s picture

Status: Needs work » Needs review
FileSize
1.1 KB

Tested this in LTR and RTL and it works. I'm not sure about the intention of some of the CSS classes. Maybe a few less are sufficient.

eshta’s picture

@hass I've submitted a patch to d8 based on your work here. Once that one is put to bed we can add it in here.

hass’s picture

The D8 patch has been commited now.

  • eshta committed f090974 on 7.x-1.x authored by hass
    Issue #2227293 by hass, lsolesen: Remove navbar from print view
    
eshta’s picture

Yes - it is :-)

Thanks all - it has been committed.

eshta’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.