What is the right or omega way of integrating print styles in omega 4?
I've found no references in the docs.
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityOmega 4 layout styles are loaded last, even after print styles added via the theme's .info file. The only catch-all solution that I'm aware of is to an @media
rule to your styles. If you need to override a layout's styles you'll need to add an @media
rule there too.
If you're not using Omega 4 layouts then adding your print styles via the theme's .info file will work - just be aware that this will add an additional stylesheet request and so isn't the most performant option, especially considering how minimal print styles can often be. The @media
solution wins on all fronts here IMHO.
Like for any css file, add it into the theme's info file, but rather than 'all', just specify it to be only for print.
stylesheets[all][] = css/everytime.css
stylesheets[screen][] = css/screen-only.css
stylesheets[print][] = css/print-only.css