Skip to content
Commits on Source (13)
......@@ -6,4 +6,5 @@ group :frontend do
gem 'oily_png', '~> 1.1'
gem 'sass', '~> 3.2.0'
gem 'sass-globbing', '~> 1.1'
gem 'zen-grids', '~> 1.5'
end
......@@ -63,21 +63,6 @@ effect of: 'view original sources' or 'Enable CSS source maps'.
* IE: http://msdn.microsoft.com/en-US/library/ie/dn255007%28v=vs.85%29#source_maps
Browser Plug-ins
An alternative method is to install a browser plug-in, such as FireCompass or
the older FireSass plug-in into Firefox. Then you'll need to edit your
sub-theme's config.rb file to uncomment and set either:
firesass = true
firecompass = true
Finally, you'll need to install the appropriate plug-in:
Firesass: https://addons.mozilla.org/en-US/firefox/addon/firesass-for-firebug
FireCompass: https://addons.mozilla.org/en-US/firefox/addon/firecompass-for-firebug
MOVING YOUR CSS TO PRODUCTION
-----------------------------
......
......@@ -353,8 +353,10 @@ img {
max-width: 100%;
height: auto;
@if $legacy-support-for-ie8 {
/* Correct IE 8 not scaling image height when resized. */
width: auto;
.lt-ie9 & {
/* Correct IE 8 not scaling image height when resized. */
width: auto;
}
}
}
......
......@@ -521,6 +521,7 @@ span.field-label {
/* The word "Unpublished" displayed underneath the content. */
.unpublished {
display: block;
height: 0;
overflow: visible;
/* Remove background highlighting from <mark> in normalize. */
......
......@@ -21,7 +21,8 @@ $zen-gutter-width: 20px;
$zen-auto-include-item-base: false;
// $zen-auto-include-flow-item-base: false;
// Suppress this section of CSS for RTL layouts since it contains no LTR-specific styles.
// Suppress this section of CSS for RTL layouts since it contains no CSS that
// needs RTL-specific overrides.
@if $zen-reverse-all-floats == false {
/**
......@@ -71,7 +72,7 @@ $zen-auto-include-item-base: false;
}
}
} // End of @if $zen-reverse-all-floats == true
} // End of @if $zen-reverse-all-floats == false
/**
* Use 3 grid columns for smaller screens.
......
......@@ -24,7 +24,7 @@ if (theme_get_setting('zen_rebuild_registry') && !defined('MAINTENANCE_MODE')) {
* Implements HOOK_theme().
*/
function zen_theme(&$existing, $type, $theme, $path) {
include_once './' . drupal_get_path('theme', 'zen') . '/zen-internals/template.theme-registry.inc';
include_once DRUPAL_ROOT . '/' . drupal_get_path('theme', 'zen') . '/zen-internals/template.theme-registry.inc';
return _zen_theme($existing, $type, $theme, $path);
}
......@@ -127,11 +127,11 @@ function zen_preprocess_html(&$variables, $hook) {
);
// Send X-UA-Compatible HTTP header to force IE to use the most recent
// rendering engine or use Chrome's frame rendering engine if available.
// rendering engine.
// This also prevents the IE compatibility mode button to appear when using
// conditional classes on the html tag.
if (is_null(drupal_get_http_header('X-UA-Compatible'))) {
drupal_add_http_header('X-UA-Compatible', 'IE=edge,chrome=1');
drupal_add_http_header('X-UA-Compatible', 'IE=edge');
}
$variables['skip_link_anchor'] = check_plain(theme_get_setting('zen_skip_link_anchor'));
......@@ -221,8 +221,13 @@ function zen_process_html_tag(&$variables) {
$tag = &$variables['element'];
if ($tag['#tag'] == 'style' || $tag['#tag'] == 'script') {
// Remove redundant type attribute and CDATA comments.
unset($tag['#attributes']['type'], $tag['#value_prefix'], $tag['#value_suffix']);
// Remove redundant CDATA comments.
unset($tag['#value_prefix'], $tag['#value_suffix']);
// Remove redundant type attribute.
if (isset($tag['#attributes']['type']) && $tag['#attributes']['type'] !== 'text/ng-template') {
unset($tag['#attributes']['type']);
}
// Remove media="all" but leave others unaffected.
if (isset($tag['#attributes']['media']) && $tag['#attributes']['media'] === 'all') {
......@@ -254,7 +259,7 @@ function zen_preprocess_page(&$variables, $hook) {
$secondary_links = variable_get('menu_secondary_links_source', 'user-menu');
if ($secondary_links) {
$menus = function_exists('menu_get_menus') ? menu_get_menus() : menu_list_system_menus();
$variables['secondary_menu_heading'] = $menus[$secondary_links];
$variables['secondary_menu_heading'] = isset($menus[$secondary_links]) ? $menus[$secondary_links] : '';
}
else {
$variables['secondary_menu_heading'] = '';
......@@ -621,8 +626,23 @@ function zen_menu_local_task($variables) {
* Implements hook_preprocess_menu_link().
*/
function zen_preprocess_menu_link(&$variables, $hook) {
// Normalize menu item classes to be an array.
if (empty($variables['element']['#attributes']['class'])) {
$variables['element']['#attributes']['class'] = array();
}
$menu_item_classes =& $variables['element']['#attributes']['class'];
if (!is_array($menu_item_classes)) {
$menu_item_classes = array($menu_item_classes);
}
// Normalize menu link classes to be an array.
if (empty($variables['element']['#localized_options']['attributes']['class'])) {
$variables['element']['#localized_options']['attributes']['class'] = array();
}
$menu_link_classes =& $variables['element']['#localized_options']['attributes']['class'];
if (!is_array($menu_link_classes)) {
$menu_link_classes = array($menu_link_classes);
}
// Add BEM-style classes to the menu item classes.
$extra_classes = array('menu__item');
......@@ -687,7 +707,7 @@ function zen_status_messages($variables) {
$output .= " </ul>\n";
}
else {
$output .= $messages[0];
$output .= reset($messages);
}
$output .= "</div>\n";
}
......
......@@ -22,7 +22,7 @@
<meta name="HandheldFriendly" content="true">
<meta name="viewport" content="width=device-width">
<?php endif; ?>
<meta http-equiv="cleartype" content="on">
<!--[if IEMobile]><meta http-equiv="cleartype" content="on"><![endif]-->
<?php print $styles; ?>
<?php print $scripts; ?>
......
......@@ -22,7 +22,7 @@
<meta name="HandheldFriendly" content="true">
<meta name="viewport" content="width=device-width">
<?php endif; ?>
<meta http-equiv="cleartype" content="on">
<!--[if IEMobile]><meta http-equiv="cleartype" content="on"><![endif]-->
<?php print $styles; ?>
<?php print $scripts; ?>
......
......@@ -8,12 +8,14 @@
*/
?>
<?php print $pane_prefix; ?>
<div class="<?php print $classes; ?>" <?php print $id; ?>>
<div class="<?php print $classes; ?>" <?php print $id; ?> <?php print $attributes; ?>>
<?php print $admin_links; ?>
<?php print render($title_prefix); ?>
<?php if ($title): ?>
<h2<?php print $title_attributes; ?>><?php print $title; ?></h2>
<<?php print $title_heading; ?><?php print $title_attributes; ?>>
<?php print $title; ?>
</<?php print $title_heading; ?>>
<?php endif; ?>
<?php print render($title_suffix); ?>
......