Santhosh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/241586

Change subject: Refactor all column related styles
......................................................................

Refactor all column related styles

* Created ext.cx.column.less to have all common styles for columns
  shared for source or translation columns

Change-Id: I1447b4b3498339599d4983bb9373080c0f0b1eb7
---
M modules/source/styles/ext.cx.source.less
M modules/translationview/styles/ext.cx.translationview.less
A modules/widgets/common/ext.cx.column.less
3 files changed, 85 insertions(+), 89 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/86/241586/1

diff --git a/modules/source/styles/ext.cx.source.less 
b/modules/source/styles/ext.cx.source.less
index 9ffe796..4faa7fc 100644
--- a/modules/source/styles/ext.cx.source.less
+++ b/modules/source/styles/ext.cx.source.less
@@ -1,16 +1,5 @@
-@import "../../widgets/common/ext.cx.common";
+@import "../../widgets/common/ext.cx.column";
 @import "../../widgets/common/ext.cx.highlight";
-
-.cx-column--source {
-       .cx-column__language-label,
-       .cx-column__sub-heading__view-page {
-               .mw-ui-one-half;
-               padding: 0;
-               overflow: hidden;
-               text-overflow: ellipsis;
-               max-height: 3em;
-       }
-}
 
 .cx-column__loading-indicator {
        margin-top: 100px;
@@ -19,5 +8,5 @@
 .cx-column__loading-indicator--text {
        padding-top: 20px;
        text-align: center;
-       color: #565656;
+       color: @gray-dark;
 }
diff --git a/modules/translationview/styles/ext.cx.translationview.less 
b/modules/translationview/styles/ext.cx.translationview.less
index b3df1c9..31a9642 100644
--- a/modules/translationview/styles/ext.cx.translationview.less
+++ b/modules/translationview/styles/ext.cx.translationview.less
@@ -1,43 +1,5 @@
 @import "../../widgets/common/ext.cx.common";
-
-h2 {
-       color: @gray-darker;
-}
-
-.cx-column__title {
-       font-size: 2.2em;
-       font-family: 'Linux Libertine', Georgia, Times, serif;
-       margin-bottom: 10px;
-}
-
-.cx-widget__columns {
-       margin-top: 100px;
-       min-height: 100vh;
-
-       &.disabled {
-               pointer-events: none;
-               opacity: 0.5;
-       }
-}
-
-.cx-column__language-label {
-       text-align: left;
-       color: @gray-dark;
-}
-
-.cx-column {
-       .mw-ui-item;
-       .mw-ui-one-third;
-       .mw-ui-gutter(3%);
-
-       .cx-column__content {
-               table,
-               figure,
-               figure[typeof*='mw:Image'] {
-                       float: none;
-               }
-       }
-}
+@import "../../widgets/common/ext.cx.column";
 
 .cx-column--source,
 .cx-column--translation {
@@ -55,20 +17,6 @@
 
        p {
                margin: 1.5em 0;
-       }
-
-       .cx-column__sub-heading {
-               .mw-ui-item;
-               .mw-ui-one-whole;
-               padding: 5px 0;
-               line-height: 2;
-       }
-
-       .cx-column__content {
-               line-height: 1.5em;
-               clear: both;
-               word-wrap: break-word;
-               position: relative;
        }
 }
 
@@ -101,27 +49,4 @@
        border: 1px solid #cccccc;
        padding: 10px;
        margin: 2px 0;
-}
-
-.stick-to-side() {
-       position: fixed;
-       top: 0;
-       right: 0;
-}
-
-.stick-to-bottom() {
-       position: fixed;
-       top: auto;
-       bottom: 0;
-       left: 0;
-       box-shadow: 0 -3px 0 0 rgba(0, 0, 0, 0.05);
-       max-height: 20%;
-       min-height: 3em;
-       overflow-x: hidden;
-       overflow-y: auto;
-       transition: max-height 0.25s;
-
-       &:hover {
-               max-height: 50%;
-       }
 }
diff --git a/modules/widgets/common/ext.cx.column.less 
b/modules/widgets/common/ext.cx.column.less
new file mode 100644
index 0000000..e6e9460
--- /dev/null
+++ b/modules/widgets/common/ext.cx.column.less
@@ -0,0 +1,82 @@
+// Common styles for source or tanslation columns of translation view
+@import "ext.cx.common";
+
+.cx-widget__columns {
+       margin-top: 100px;
+       min-height: 100vh;
+
+       &.disabled {
+               pointer-events: none;
+               opacity: 0.5;
+       }
+}
+
+.cx-column {
+       .mw-ui-item;
+       .mw-ui-one-third;
+       .mw-ui-gutter(3%);
+}
+
+.cx-column__sub-heading {
+       .mw-ui-item;
+       .mw-ui-one-whole;
+       padding: 5px 0;
+       line-height: 2em;
+}
+
+.cx-column__content {
+       line-height: 1.5em;
+       clear: both;
+       word-wrap: break-word;
+       position: relative;
+
+       table,
+       figure,
+       figure[typeof*='mw:Image'] {
+               float: none;
+       }
+}
+
+.cx-column__language-label,
+.cx-column__sub-heading__view-page {
+       .mw-ui-one-half;
+       padding: 0;
+       overflow: hidden;
+       text-overflow: ellipsis;
+       max-height: 3em;
+}
+
+.cx-column__language-label {
+       text-align: left;
+       color: @gray-dark;
+}
+
+.cx-column__title {
+       font-size: 2.2em;
+       color: @gray-darker;
+       font-family: 'Linux Libertine', Georgia, Times, serif;
+       margin-bottom: 10px;
+}
+
+.stick-to-side() {
+       position: fixed;
+       top: 0;
+       right: 0;
+}
+
+.stick-to-bottom() {
+       position: fixed;
+       top: auto;
+       bottom: 0;
+       left: 0;
+       box-shadow: 0 -3px 0 0 rgba(0, 0, 0, 0.05);
+       max-height: 20%;
+       min-height: 3em;
+       overflow-x: hidden;
+       overflow-y: auto;
+       transition: max-height 0.25s;
+
+       &:hover {
+               max-height: 50%;
+       }
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/241586
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1447b4b3498339599d4983bb9373080c0f0b1eb7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to