Commit 2f139937 authored by webchick's avatar webchick

Issue #2208731 by LewisNyman, larowlan: Tour tab increases the height of the toolbar.

parent bd2cfd02
...@@ -10,19 +10,16 @@ ...@@ -10,19 +10,16 @@
[dir="rtl"] .toolbar .toolbar-bar .contextual-toolbar-tab.toolbar-tab { [dir="rtl"] .toolbar .toolbar-bar .contextual-toolbar-tab.toolbar-tab {
float: left; float: left;
} }
.toolbar .toolbar-bar .contextual-toolbar-tab button { .toolbar .toolbar-bar .contextual-toolbar-tab .toolbar-item {
margin: 0; margin: 0;
padding-bottom: 1em;
padding-top: 1em;
/* Hide tab text. */ /* Hide tab text. */
padding-left: 1.3333em; /* LTR */ padding-left: 1.3333em; /* LTR */
text-indent: -9999px; text-indent: -9999px;
line-height: 1em;
} }
[dir="rtl"] .toolbar .toolbar-bar .contextual-toolbar-tab button { [dir="rtl"] .toolbar .toolbar-bar .contextual-toolbar-tab .toolbar-item {
padding-right: 1.3333em; padding-right: 1.3333em;
} }
.toolbar .toolbar-bar .contextual-toolbar-tab button.active { .toolbar .toolbar-bar .contextual-toolbar-tab .toolbar-item.active {
background-image:-moz-linear-gradient(rgb(78,159,234) 0%,rgb(69,132,221) 100%); background-image:-moz-linear-gradient(rgb(78,159,234) 0%,rgb(69,132,221) 100%);
background-image:-webkit-gradient(linear,color-stop(0, rgb(78,159,234)),color-stop(1, rgb(69,132,221))); background-image:-webkit-gradient(linear,color-stop(0, rgb(78,159,234)),color-stop(1, rgb(69,132,221)));
background-image: -webkit-linear-gradient(top, rgb(78,159,234) 0%, rgb(69,132,221) 100%); background-image: -webkit-linear-gradient(top, rgb(78,159,234) 0%, rgb(69,132,221) 100%);
......
...@@ -441,11 +441,9 @@ function shortcut_toolbar() { ...@@ -441,11 +441,9 @@ function shortcut_toolbar() {
'#type' => 'link', '#type' => 'link',
'#title' => t('Shortcuts'), '#title' => t('Shortcuts'),
'#href' => 'admin/config/user-interface/shortcut', '#href' => 'admin/config/user-interface/shortcut',
'#options' => array( '#attributes' => array(
'attributes' => array( 'title' => t('Shortcuts'),
'title' => t('Shortcuts'), 'class' => array('toolbar-icon', 'toolbar-icon-shortcut'),
'class' => array('toolbar-icon', 'toolbar-icon-shortcut'),
),
), ),
), ),
'tray' => array( 'tray' => array(
......
...@@ -14,12 +14,13 @@ ...@@ -14,12 +14,13 @@
-webkit-touch-callout: none; -webkit-touch-callout: none;
touch-callout: none; touch-callout: none;
} }
.toolbar a { .toolbar .toolbar-item {
cursor: pointer; cursor: pointer;
padding: 1em 1.3333em; padding: 1em 1.3333em;
line-height: 1em;
text-decoration: none; text-decoration: none;
} }
.toolbar a:hover { .toolbar .toolbar-item:hover {
text-decoration: underline; text-decoration: underline;
} }
...@@ -34,18 +35,18 @@ ...@@ -34,18 +35,18 @@
[dir="rtl"] .toolbar .toolbar-bar { [dir="rtl"] .toolbar .toolbar-bar {
box-shadow: 1px 0 3px 1px rgba(0, 0, 0, 0.3333); box-shadow: 1px 0 3px 1px rgba(0, 0, 0, 0.3333);
} }
.toolbar .toolbar-bar a { .toolbar .toolbar-bar .toolbar-item {
color: #ffffff; color: #ffffff;
} }
.toolbar .toolbar-bar .toolbar-tab > a { .toolbar .toolbar-bar .toolbar-tab > .toolbar-item {
font-weight: bold; font-weight: bold;
} }
.toolbar .toolbar-bar .toolbar-tab > a:hover { .toolbar .toolbar-bar .toolbar-tab > .toolbar-item:hover {
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.125) 20%, transparent 200%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.125) 20%, transparent 200%);
background-image: linear-gradient(rgba(255, 255, 255, 0.125) 20%, transparent 200%); background-image: linear-gradient(rgba(255, 255, 255, 0.125) 20%, transparent 200%);
text-decoration: none; text-decoration: none;
} }
.toolbar .toolbar-bar .toolbar-tab > a.active { .toolbar .toolbar-bar .toolbar-tab > .toolbar-item.active {
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.25) 20%, transparent 200%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.25) 20%, transparent 200%);
background-image: linear-gradient(rgba(255, 255, 255, 0.25) 20%, transparent 200%); background-image: linear-gradient(rgba(255, 255, 255, 0.25) 20%, transparent 200%);
} }
...@@ -83,13 +84,17 @@ ...@@ -83,13 +84,17 @@
.toolbar .toolbar-tray-horizontal .toolbar-tray { .toolbar .toolbar-tray-horizontal .toolbar-tray {
background-color: #f5f5f5; background-color: #f5f5f5;
} }
.toolbar .toolbar-tray a { .toolbar-tray a {
color: #565656; color: #565656;
cursor: pointer;
padding: 1em 1.3333em;
text-decoration: none;
} }
.toolbar .toolbar-tray a:hover, .toolbar-tray a:hover,
.toolbar .toolbar-tray a:active, .toolbar-tray a:active,
.toolbar .toolbar-tray a.active { .toolbar-tray a.active {
color: #000; color: #000;
text-decoration: underline;
} }
.toolbar .menu { .toolbar .menu {
background-color: #ffffff; background-color: #ffffff;
......
...@@ -317,6 +317,8 @@ function toolbar_pre_render_item($element) { ...@@ -317,6 +317,8 @@ function toolbar_pre_render_item($element) {
$element['tray']['#wrapper_attributes']['class'][] = 'toolbar-tray'; $element['tray']['#wrapper_attributes']['class'][] = 'toolbar-tray';
} }
$element['tab']['#attributes']['class'][] = 'toolbar-item';
return $element; return $element;
} }
...@@ -333,12 +335,10 @@ function toolbar_toolbar() { ...@@ -333,12 +335,10 @@ function toolbar_toolbar() {
'#type' => 'link', '#type' => 'link',
'#title' => t('Back to site'), '#title' => t('Back to site'),
'#href' => '<front>', '#href' => '<front>',
'#options' => array( '#attributes' => array(
'attributes' => array( 'title' => t('Return to site content'),
'title' => t('Return to site content'), 'class' => array('toolbar-icon', 'toolbar-icon-escape-admin'),
'class' => array('toolbar-icon', 'toolbar-icon-escape-admin'), 'data-toolbar-escape-admin' => TRUE,
'data-toolbar-escape-admin' => TRUE,
),
), ),
), ),
'#wrapper_attributes' => array( '#wrapper_attributes' => array(
...@@ -389,17 +389,15 @@ function toolbar_toolbar() { ...@@ -389,17 +389,15 @@ function toolbar_toolbar() {
'#type' => 'link', '#type' => 'link',
'#title' => t('Manage'), '#title' => t('Manage'),
'#href' => 'admin', '#href' => 'admin',
'#options' => array( '#attributes' => array(
'attributes' => array( 'title' => t('Admin menu'),
'title' => t('Admin menu'), 'class' => array('toolbar-icon', 'toolbar-icon-menu'),
'class' => array('toolbar-icon', 'toolbar-icon-menu'), // A data attribute that indicates to the client to defer loading of
// A data attribute that indicates to the client to defer loading of // the admin menu subtrees until this tab is activated. Admin menu
// the admin menu subtrees until this tab is activated. Admin menu // subtrees will not render to the DOM if this attribute is removed.
// subtrees will not render to the DOM if this attribute is removed. // The value of the attribute is intentionally left blank. Only the
// The value of the attribute is intentionally left blank. Only the // presence of the attribute is necessary.
// presence of the attribute is necessary. 'data-drupal-subtrees' => '',
'data-drupal-subtrees' => '',
),
), ),
), ),
'tray' => $menu, 'tray' => $menu,
......
...@@ -1689,11 +1689,9 @@ function user_toolbar() { ...@@ -1689,11 +1689,9 @@ function user_toolbar() {
'#type' => 'link', '#type' => 'link',
'#title' => $user->getUsername(), '#title' => $user->getUsername(),
'#href' => 'user', '#href' => 'user',
'#options' => array( '#attributes' => array(
'attributes' => array( 'title' => t('My account'),
'title' => t('My account'), 'class' => array('toolbar-icon', 'toolbar-icon-user'),
'class' => array('toolbar-icon', 'toolbar-icon-user'),
),
), ),
), ),
'tray' => array( 'tray' => array(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment