JGonera has uploaded a new change for review.
https://gerrit.wikimedia.org/r/86785
Change subject: Story 1030: Clean up common.less
......................................................................
Story 1030: Clean up common.less
Remove undocumented rules, move hacks to hacks.less, scope all
content-related rules inside .content.
Change-Id: Ia00fc80fc01aa84db197b0f7d3e5ed46c3ce8cd0
---
M less/common/common.less
M less/common/hacks.less
M stylesheets/common/common.css
M stylesheets/common/hacks.css
4 files changed, 75 insertions(+), 244 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/85/86785/1
diff --git a/less/common/common.less b/less/common/common.less
index 76c2a9a..5c7ccd4 100644
--- a/less/common/common.less
+++ b/less/common/common.less
@@ -35,10 +35,6 @@
}
}
-input {
- word-break: normal;
-}
-
textarea {
padding: 5px 0 5px 5px;
}
@@ -55,37 +51,15 @@
padding: 5px;
}
-// For old style forms
-.mw-input [type=submit],
-.mw-submit input,
-.mw-submit[type=submit],
-.mw-submit {
+// For old style forms (Special:RecentChanges)
+.mw-input [type=submit] {
margin-top: 8px;
- display: block;
min-width: 80%;
-}
-
-button.disabled {
- opacity: 0.2;
}
a.external {
background: url(images/external-link-ltr-icon.png) center right
no-repeat;
padding-right: 13px;
-}
-
-.info {
- margin: @infoMargin;
- color: @infoColor;
-
- img {
- width: 100%;
- max-width: 600px;
- }
-
- .button {
- margin: 2em 0 0;
- }
}
/* Galleries */
@@ -126,78 +100,8 @@
}
}
-// FIXME: Review what introduces .mwm-notice
-.mwm-notice {
- padding: 5px;
- background: #dddddd;
- border-radius: 5px;
- margin-top: 5px;
- text-align: center;
- border: 1px solid gray;
-
- &.mwm-message {
- background: #FFFFFF;
- font-size: 1.1em;
- color: #000000;
-
- a {
- text-decoration: underline;
- font-weight: bold;
- color: #000000;
- }
- }
-}
-
#content {
position: relative; // allow absolute positioned children e.g. edit link
-
- table {
- /* following 5 rules are needed for scrolling */
- overflow: auto; /* for browsers that don't support overflow-y */
- overflow-y: hidden;
- overflow-x: auto;
- word-break: normal;
- display: block;
- }
-
- // Hide the image magnification icon normally displayed in image
captions
- div.magnify {
- display: none;
- }
-}
-
-table {
- .box-sizing( border-box );
-
- tbody {
- display: inline-block;
- }
-
- td,
- th {
- padding: 3px;
- }
-
- th {
- word-break: normal;
- }
-
- &.wikitable {
- th {
- background: #f3f3f3;
- }
- }
-
- table {
- border: 0;
- margin-bottom: 0;
-
- td,
- th {
- border: 0;
- padding: 0;
- }
- }
}
p,
@@ -237,38 +141,10 @@
border: 1px solid #cccccc;
}
-/* @noflip */div.floatright, table.floatright {
- float: right;
-}
-
-/* @noflip */div.floatleft, table.floatright {
- float: left;
-}
-
-.sibling-page,
-// FIXME: Remove styling on id in 1 month
-#mw-mf-last-modified {
+.sibling-page {
display: block;
font-size: .9em;
margin-top: 1.5em;
-}
-
-.mwm-message.mwm-notice {
- font-size: 1.1em;
-}
-
-@media all and (max-width: 500px) {
- .mobile div.tleft,
- .mobile div.floatleft,
- .mobile table.floatleft,
- .mobile div.tright,
- .mobile div.floatright,
- .mobile table.floatright {
- float: none;
- clear: none;
- margin: auto;
- width: auto !important;
- }
}
/* Plainlinks - this can be used to switch
@@ -283,6 +159,11 @@
font-weight: bold;
}
+em,
+i {
+ font-style: italic;
+}
+
.hlist > ul, // FIXME: to support hlists on enwiki projects - this should be
deprecated
ul.hlist {
li {
@@ -291,18 +172,32 @@
}
}
-.content_block {
+.content {
ul {
list-style: square inside;
}
+
ol {
list-style: decimal inside;
}
-}
-em,
-i {
- font-style: italic;
+ table {
+ /* following 4 rules are needed for scrolling */
+ overflow: auto; /* for browsers that don't support overflow-y */
+ overflow-y: hidden;
+ overflow-x: auto;
+ display: block;
+
+ td,
+ th {
+ padding: 3px;
+ }
+ }
+
+ // Hide the image magnification icon normally displayed in image
captions
+ div.magnify {
+ display: none;
+ }
}
.jsonly {
diff --git a/less/common/hacks.less b/less/common/hacks.less
index fd8a4ba..771bc61 100644
--- a/less/common/hacks.less
+++ b/less/common/hacks.less
@@ -95,3 +95,17 @@
.mw-editsection {
display: none;
}
+
+@media all and (min-width: 500px) {
+ .content {
+ .tleft,
+ .floatleft {
+ float: left;
+ }
+
+ .tright,
+ .floatright {
+ float: right;
+ }
+ }
+}
diff --git a/stylesheets/common/common.css b/stylesheets/common/common.css
index b3859ef..53d3b4d 100644
--- a/stylesheets/common/common.css
+++ b/stylesheets/common/common.css
@@ -39,9 +39,6 @@
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
-input {
- word-break: normal;
-}
textarea {
padding: 5px 0 5px 5px;
}
@@ -56,31 +53,13 @@
border-radius: 3px;
padding: 5px;
}
-.mw-input [type=submit],
-.mw-submit input,
-.mw-submit[type=submit],
-.mw-submit {
+.mw-input [type=submit] {
margin-top: 8px;
- display: block;
min-width: 80%;
-}
-button.disabled {
- opacity: 0.2;
}
a.external {
background: url(images/external-link-ltr-icon.png) center right no-repeat;
padding-right: 13px;
-}
-.info {
- margin: 4em;
- color: #707070;
-}
-.info img {
- width: 100%;
- max-width: 600px;
-}
-.info .button {
- margin: 2em 0 0;
}
/* Galleries */
/* See
https://www.mediawiki.org/wiki/Help:Images#Rendering_a_gallery_of_images */
@@ -114,67 +93,8 @@
padding: 2px 4px;
word-wrap: break-word;
}
-.mwm-notice {
- padding: 5px;
- background: #dddddd;
- border-radius: 5px;
- margin-top: 5px;
- text-align: center;
- border: 1px solid gray;
-}
-.mwm-notice.mwm-message {
- background: #FFFFFF;
- font-size: 1.1em;
- color: #000000;
-}
-.mwm-notice.mwm-message a {
- text-decoration: underline;
- font-weight: bold;
- color: #000000;
-}
#content {
position: relative;
-}
-#content table {
- /* following 5 rules are needed for scrolling */
-
- overflow: auto;
- /* for browsers that don't support overflow-y */
-
- overflow-y: hidden;
- overflow-x: auto;
- word-break: normal;
- display: block;
-}
-#content div.magnify {
- display: none;
-}
-table {
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
-}
-table tbody {
- display: inline-block;
-}
-table td,
-table th {
- padding: 3px;
-}
-table th {
- word-break: normal;
-}
-table.wikitable th {
- background: #f3f3f3;
-}
-table table {
- border: 0;
- margin-bottom: 0;
-}
-table table td,
-table table th {
- border: 0;
- padding: 0;
}
p,
li,
@@ -205,35 +125,10 @@
img.thumbborder {
border: 1px solid #cccccc;
}
-/* @noflip */div.floatright,
-table.floatright {
- float: right;
-}
-/* @noflip */div.floatleft,
-table.floatright {
- float: left;
-}
-.sibling-page,
-#mw-mf-last-modified {
+.sibling-page {
display: block;
font-size: .9em;
margin-top: 1.5em;
-}
-.mwm-message.mwm-notice {
- font-size: 1.1em;
-}
-@media all and (max-width: 500px) {
- .mobile div.tleft,
- .mobile div.floatleft,
- .mobile table.floatleft,
- .mobile div.tright,
- .mobile div.floatright,
- .mobile table.floatright {
- float: none;
- clear: none;
- margin: auto;
- width: auto !important;
- }
}
/* Plainlinks - this can be used to switch
* off special external link styling */
@@ -245,20 +140,37 @@
b {
font-weight: bold;
}
+em,
+i {
+ font-style: italic;
+}
.hlist > ul li,
ul.hlist li {
display: inline-block;
margin-right: 8px;
}
-.content_block ul {
+.content ul {
list-style: square inside;
}
-.content_block ol {
+.content ol {
list-style: decimal inside;
}
-em,
-i {
- font-style: italic;
+.content table {
+ /* following 4 rules are needed for scrolling */
+
+ overflow: auto;
+ /* for browsers that don't support overflow-y */
+
+ overflow-y: hidden;
+ overflow-x: auto;
+ display: block;
+}
+.content table td,
+.content table th {
+ padding: 3px;
+}
+.content div.magnify {
+ display: none;
}
.jsonly {
display: none;
diff --git a/stylesheets/common/hacks.css b/stylesheets/common/hacks.css
index e476df8..a447147 100644
--- a/stylesheets/common/hacks.css
+++ b/stylesheets/common/hacks.css
@@ -77,3 +77,13 @@
.mw-editsection {
display: none;
}
+@media all and (min-width: 500px) {
+ .content .tleft,
+ .content .floatleft {
+ float: left;
+ }
+ .content .tright,
+ .content .floatright {
+ float: right;
+ }
+}
--
To view, visit https://gerrit.wikimedia.org/r/86785
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia00fc80fc01aa84db197b0f7d3e5ed46c3ce8cd0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits