Commit 8498adcc authored by alexpott's avatar alexpott

Issue #1971108 by Wim Leers, jessebeach, nod_: Convert contextual.js to use...

Issue #1971108 by Wim Leers, jessebeach, nod_: Convert contextual.js to use Backbone (and support dynamic contextual links).
parent a65536ad
/**
* @file
* Generic base styles for contextual module.
......@@ -7,33 +6,13 @@
.contextual-region {
position: relative;
}
.touch .contextual .trigger {
display: block;
.contextual .trigger:focus {
/* Override the .element-focusable position: static */
position: relative !important;
}
.contextual .contextual-links {
.contextual-links {
display: none;
}
.contextual-links-active .contextual-links {
.contextual.open .contextual-links {
display: block;
}
/**
* The .element-focusable class extends the .element-invisible class to allow
* the element to be focusable when navigated to via the keyboard.
*
* Add support for hover.
*/
.touch .contextual-region .element-invisible.element-focusable,
.contextual-region:hover .element-invisible.element-focusable {
clip: auto;
overflow: visible;
height: auto;
}
/* Override the position for contextual links. */
.contextual-region .element-invisible.element-focusable:active,
.contextual-region .element-invisible.element-focusable:focus,
.contextual-region:hover .element-invisible.element-focusable,
.contextual-region-active .element-invisible.element-focusable,
.touch .contextual-region .element-invisible.element-focusable {
position: relative !important;
}
This diff is collapsed.
......@@ -91,6 +91,9 @@ function contextual_library_info() {
'dependencies' => array(
array('system', 'jquery'),
array('system', 'drupal'),
array('system', 'drupalSettings'),
array('system', 'backbone'),
array('system', 'modernizr'),
array('system', 'jquery.once'),
),
);
......@@ -107,8 +110,9 @@ function contextual_library_info() {
),
'dependencies' => array(
array('system', 'jquery'),
array('system', 'jquery.once'),
array('system', 'drupal'),
array('system', 'backbone'),
array('system', 'jquery.once'),
array('system', 'drupal.tabbingmanager'),
array('system', 'drupal.announce'),
),
......
......@@ -16,15 +16,17 @@
*/
.contextual .trigger {
float: left;
right: 0;
right: auto;
left: 2px;
}
/**
* Contextual links.
*/
.contextual .contextual-links {
.contextual-region .contextual .contextual-links {
border-radius: 0 4px 4px 4px;
float: left;
left: 2px;
right: auto;
text-align: right;
}
......@@ -13,6 +13,14 @@
z-index: 500;
}
/**
* Contextual region.
*/
.contextual-region.focus {
outline: 1px dashed #d6d6d6;
outline-offset: 1px;
}
/**
* Contextual trigger.
*/
......@@ -34,15 +42,16 @@
padding: 0 2px;
position: relative;
right: 2px; /* LTR */
width: 28px;
/* Override the .element-focusable height: auto */
width: 28px !important;
text-indent: -9999px;
z-index: 2;
cursor: pointer;
}
.contextual-links-active .trigger {
.contextual.open .trigger {
border-bottom-color: transparent;
border-radius: 13px 13px 0 0;
box-shadow: none;
z-index: 2;
}
/**
......@@ -59,10 +68,10 @@
margin: 0;
padding: 0.25em 0;
position: relative;
right: 2px; /* LTR */
text-align: left; /* LTR */
top: -1px;
white-space: nowrap;
z-index: 1;
}
.contextual-region .contextual .contextual-links li {
background-color: #fff;
......
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