From be51923251b8388793770f2e9a2bc7b7e2479c1c Mon Sep 17 00:00:00 2001 From: andrewmbacon Date: Wed, 19 Aug 2015 16:30:29 -0400 Subject: [PATCH] Adding Print Styles support --- css/print.css | 51 ++++++++++++++++++++++++++++++++++++++ inc/scripts-and-styles.php | 3 ++- sass/print.scss | 49 ++++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 css/print.css create mode 100644 sass/print.scss diff --git a/css/print.css b/css/print.css new file mode 100644 index 0000000..3930dc5 --- /dev/null +++ b/css/print.css @@ -0,0 +1,51 @@ +/* + + Cornerstone Print Styles + Andrew Bacon of UITS WEB DEV + Aug 2015 + +*/ +#uc-utility, +#nav-wrapper, +a:after, +#masthead .searchform { + display: none; } + +#site-title.hidden-xs { + display: inline-block !important; } + +#site-title.hidden-xs:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; } + +/* start commented backslash hack \*/ +* html #site-title.hidden-xs { + height: 1% !important; } + +#site-title.hidden-xs { + display: block !important; } + +/* close commented backslash hack */ +#masthead:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; } + +#masthead { + display: inline-block; } + +/* start commented backslash hack \*/ +* html #masthead { + height: 1%; } + +#masthead { + display: block; } + +/* close commented backslash hack */ diff --git a/inc/scripts-and-styles.php b/inc/scripts-and-styles.php index 2bddc3d..71ce205 100644 --- a/inc/scripts-and-styles.php +++ b/inc/scripts-and-styles.php @@ -4,8 +4,9 @@ function cs_scripts() { wp_enqueue_style( 'cs-glyph', site_url().'/wp-content/global/glyphicons_pro/glyphicons/web/html_css/css/glyphicons.css'); wp_enqueue_style( 'cs-glyph-filetypes', site_url().'/wp-content/global/glyphicons_pro/glyphicons_filetypes/web/html_css/css/glyphicons-filetypes.css'); wp_enqueue_style( 'cs-glyph-halflings', site_url().'/wp-content/global/glyphicons_pro/glyphicons_halflings/web/html_css/css/glyphicons-halflings.css'); - wp_enqueue_style( 'cs-glyph-social', site_url().'/wp-content/global/glyphicons_pro/glyphicons_social/web/html_css/css/glyphicons-social.css'); + wp_enqueue_style( 'cs-glyph-social', site_url().'/wp-content/global/glyphicons_pro/glyphicons_social/web/html_css/css/glyphicons-social.css'); wp_enqueue_style( 'cs-style', get_stylesheet_uri(), array( 'cs-glyph' )); + wp_enqueue_style( 'cs-print', get_template_directory_uri() .'/css/print.css', array( 'cs-style' ), false, 'print'); include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); $maxMegaMenuActive = is_plugin_active('megamenu/megamenu.php'); diff --git a/sass/print.scss b/sass/print.scss new file mode 100644 index 0000000..7bfbe7d --- /dev/null +++ b/sass/print.scss @@ -0,0 +1,49 @@ +/* + + Cornerstone Print Styles + Andrew Bacon of UITS WEB DEV + Aug 2015 + +*/ +#uc-utility, +#nav-wrapper, +a:after, +#masthead .searchform { + display:none; +} +#site-title.hidden-xs { + display: inline-block!important; +} + + +#site-title.hidden-xs:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; + } +.clearfix { } +/* start commented backslash hack \*/ +* html #site-title.hidden-xs { height: 1%!important; } +#site-title.hidden-xs { display: block!important; } +/* close commented backslash hack */ + + + + + +#masthead:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; + } +#masthead { display: inline-block; } +/* start commented backslash hack \*/ +* html #masthead { height: 1%; } +#masthead { display: block; } +/* close commented backslash hack */ \ No newline at end of file