mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 00:13:36 +00:00
Drop IE11 support
The following are now available in all browsers we support: * mix-blend-mode in CSS * Node#contains Change-Id: I324948f0bceac6d86999300e2b2c8756613e56d2
This commit is contained in:
parent
79c8d3784f
commit
fed7f9482f
|
@ -113,17 +113,11 @@ h1, h2, h3, h4, h5, h6 {
|
|||
position: absolute;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
||||
@supports ( mix-blend-mode: darken ) {
|
||||
.ext-discussiontools-init-highlight {
|
||||
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
||||
mix-blend-mode: darken;
|
||||
// Support: Safari
|
||||
// Safari doesn't blend this overlay with the text unless GPU rendering is forced.
|
||||
transform: translateZ( 0 );
|
||||
}
|
||||
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
||||
mix-blend-mode: darken;
|
||||
// Support: Safari
|
||||
// Safari doesn't blend this overlay with the text unless GPU rendering is forced.
|
||||
transform: translateZ( 0 );
|
||||
}
|
||||
|
||||
.ext-discussiontools-init-highlight-fadein {
|
||||
|
@ -136,31 +130,13 @@ h1, h2, h3, h4, h5, h6 {
|
|||
}
|
||||
|
||||
.ext-discussiontools-init-publishedcomment {
|
||||
// Support: IE11
|
||||
// On supporting browsers, we instead use non-transparent color with mix-blend-mode.
|
||||
// Identical to #ffe29e on white background.
|
||||
background-color: rgba( 255, 198, 60, 0.5 );
|
||||
}
|
||||
|
||||
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
||||
@supports ( mix-blend-mode: darken ) {
|
||||
.ext-discussiontools-init-publishedcomment {
|
||||
background-color: #ffe29e;
|
||||
}
|
||||
background-color: #ffe29e;
|
||||
}
|
||||
|
||||
.ext-discussiontools-init-targetcomment {
|
||||
// Support: IE11, see above
|
||||
background-color: rgba( 216, 235, 255, 0.5 );
|
||||
}
|
||||
|
||||
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
||||
@supports ( mix-blend-mode: darken ) {
|
||||
.ext-discussiontools-init-targetcomment {
|
||||
// Same color as the :target selector for references (from Cite).
|
||||
// Not sure if that's a good idea, but it should be different from -publishedcomment.
|
||||
background-color: #eaf3ff;
|
||||
}
|
||||
// Same color as the :target selector for references (from Cite).
|
||||
// Not sure if that's a good idea, but it should be different from -publishedcomment.
|
||||
background-color: #eaf3ff;
|
||||
}
|
||||
|
||||
// Topic subscriptions (both kinds)
|
||||
|
|
|
@ -164,22 +164,6 @@ function childIndexOf( child ) {
|
|||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether a Node contains (is an ancestor of) another Node (or is the same node)
|
||||
*
|
||||
* @param {Node} ancestor
|
||||
* @param {Node} descendant
|
||||
* @return {boolean}
|
||||
*/
|
||||
function contains( ancestor, descendant ) {
|
||||
// Support: IE 11
|
||||
// Node#contains is only supported on HTMLElement nodes. Otherwise we could just use
|
||||
// `ancestor.contains( descendant )`.
|
||||
return ancestor === descendant ||
|
||||
// eslint-disable-next-line no-bitwise
|
||||
ancestor.compareDocumentPosition( descendant ) & Node.DOCUMENT_POSITION_CONTAINED_BY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find closest ancestor element using one of the given tag names.
|
||||
*
|
||||
|
@ -327,7 +311,7 @@ function getCoveredSiblings( range ) {
|
|||
if ( ancestor === range.startContainer ) {
|
||||
start = range.startOffset;
|
||||
} else {
|
||||
while ( !contains( siblings[ start ], range.startContainer ) ) {
|
||||
while ( !siblings[ start ].contains( range.startContainer ) ) {
|
||||
start++;
|
||||
}
|
||||
}
|
||||
|
@ -336,7 +320,7 @@ function getCoveredSiblings( range ) {
|
|||
if ( ancestor === range.endContainer ) {
|
||||
end = range.endOffset - 1;
|
||||
} else {
|
||||
while ( !contains( siblings[ end ], range.endContainer ) ) {
|
||||
while ( !siblings[ end ].contains( range.endContainer ) ) {
|
||||
end--;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue