jenkins-bot has submitted this change and it was merged.
Change subject: MT Card: Avoid having a dedicated element for clearfix
......................................................................
MT Card: Avoid having a dedicated element for clearfix
All tools cards have clearfix now.
Also some css cleanup, removing !important and all.
Bug: T70925
Change-Id: I9636e6af82901ad2ef2fce37c510701fb684d44c
---
M modules/tools/ext.cx.tools.mt.js
M modules/tools/styles/ext.cx.tools.card.less
M modules/tools/styles/ext.cx.tools.mt.less
3 files changed, 18 insertions(+), 22 deletions(-)
Approvals:
Nikerabbit: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/tools/ext.cx.tools.mt.js b/modules/tools/ext.cx.tools.mt.js
index 86737dd..97772a9 100644
--- a/modules/tools/ext.cx.tools.mt.js
+++ b/modules/tools/ext.cx.tools.mt.js
@@ -278,7 +278,7 @@
}
MTControlCard.prototype.getCard = function () {
- var $titleRow, $title, $controlButtonsBlock, $bottom;
+ var $titleRow, $title, $controlButtonsBlock;
this.$card = $( '<div>' )
.addClass( 'card mt' );
@@ -314,14 +314,10 @@
this.actions.$clear
);
- $bottom = $( '<div>' )
- .addClass( 'card__bottom' );
-
this.$card.append(
$titleRow,
this.$providerSelectorTrigger,
- $controlButtonsBlock,
- $bottom
+ $controlButtonsBlock
);
this.buildProvidersMenu();
diff --git a/modules/tools/styles/ext.cx.tools.card.less
b/modules/tools/styles/ext.cx.tools.card.less
index 2281b85..3af02db 100644
--- a/modules/tools/styles/ext.cx.tools.card.less
+++ b/modules/tools/styles/ext.cx.tools.card.less
@@ -11,6 +11,18 @@
border-color: #BBBBBB;
box-shadow: 0 1px 0 #BBBBBB;
}
+
+ /* Clearfix */
+ &:after {
+ // Non empty content value aoids an Opera bug that creates
space around
+ // clearfixed elements if the contenteditable attribute is also
present
+ // somewhere in the HTML.
+ content: " ";
+ visibility: hidden;
+ display: block;
+ height: 0;
+ clear: both;
+ }
}
.card__title,
diff --git a/modules/tools/styles/ext.cx.tools.mt.less
b/modules/tools/styles/ext.cx.tools.mt.less
index 72af107..010b208 100644
--- a/modules/tools/styles/ext.cx.tools.mt.less
+++ b/modules/tools/styles/ext.cx.tools.mt.less
@@ -93,16 +93,15 @@
.card__button-block {
.mw-ui-item;
.mw-ui-one-whole;
- float: none; // XXX why would it be needed?
line-height: 1.5em;
color: @gray;
- padding: 10px 0;
+ padding: 0;
.card__control-button {
- line-height: 1.5em;
+ .mw-ui-one-half;
color: @gray-dark;
cursor: pointer;
- padding: 5px 10px 0px 25px !important; /* grid override
*/
+ padding: 10px 10px 10px 25px; /* grid override */
border-top: 1px solid #dddddd;
border-left: 1px solid #dddddd;
background-repeat: no-repeat;
@@ -115,28 +114,17 @@
}
.cx-use-source {
- .mw-ui-one-half;
.background-image-svg('../images/pasting.svg',
'../images/pasting.png');
}
.cx-clear-translation {
- .mw-ui-one-half;
.background-image-svg('../images/clear.svg',
'../images/clear.png');
}
.cx-restore-translation {
- .mw-ui-one-whole;
.background-image-svg('../images/arched-arrow-ltr.svg',
'../images/arched-arrow-ltr.png');
border: none;
+ float: none;
}
- }
-
- .card__bottom {
- .mw-ui-item;
- .mw-ui-one-whole;
- float: none; // XXX why would it be needed?
- clear: both;
- padding: 5px;
- text-align: center;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/259638
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9636e6af82901ad2ef2fce37c510701fb684d44c
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Pginer <[email protected]>
Gerrit-Reviewer: Santhosh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits