瀏覽代碼

Addressing Multiple Issues in Tracker (#314)

* Address issue #88 #172 and #196 for milestone 2.0

* VE Fixes for issue Integration with VisualEditor #313

* Update the changelog
Tom Hutchison 7 年之前
父節點
當前提交
f3f2e077eb
共有 3 個文件被更改,包括 106 次插入6 次删除
  1. 2 1
      CHANGELOG.md
  2. 65 2
      assets/stylesheets/foreground-print.css
  3. 39 3
      assets/stylesheets/foreground.css

+ 2 - 1
CHANGELOG.md

@@ -1,6 +1,7 @@
 ## Version 2.1
 
-* [compatibility] Remove IE 8 support entirely
+* [bug fix] Fixes for VisualEditor changes in editor layout #313
+* [code] CSS fixes for Issues #88, #172 and #196 (Print.css, firstHeading and Wikitable override by Foundation)
 * [code] Moved icon appending for Visual Editor to `(window).load` function
 * [code] Improved styling of TOC
 * [code] [b/c break] Switch to MW 1.25+ extension registration mechanism

+ 65 - 2
assets/stylesheets/foreground-print.css

@@ -1,3 +1,66 @@
+/* Show what will print */
+
+@media screen {
+	/* stop double border at bottom with print */
+	footer.row {
+		border: none;
+	}
+	/*make namespace labels stand out */
+	h4.namespace.label {
+    padding: 0.25em;
+    font-size: 1.4em !important;
+    font-weight: normal;
+    background-color: #777777 !important;
+	color: #fff !important;
+	}
+	/* hide actions button as it is not needed */
+	#p-cactions a.button.dropdown.small.secondary.radius {
+    display: none !important;
+	}
+	/* if addThis share is used, make sure to hide mobile content from js */
+	#at4m-dock, .at4-show,
+	#atstbx	{
+	display: none !important;
+	}
+	/* hide Echo if being used */
+	#echo-notifications {
+	display: none !important;
+	}
+	nav {
+    display: none !important;
+	}
+}
+
+/* Print what is shown */
+
 @media print {
-  nav, footer { display:none; }
-}
+	/* stop double border at bottom with print */
+	footer.row {
+		border: none;
+	}
+	/*make namespace labels stand out */
+	h4.namespace.label {
+    padding: 0.25em;
+    font-size: 1.4em !important;
+    font-weight: normal;
+    background-color: #777777 !important;
+	color: #fff !important;
+	}
+	/* hide actions button as it is not needed */
+	#p-cactions a.button.dropdown.small.secondary.radius {
+    display: none !important;
+	}
+	/* if addThis share is used, make sure to hide mobile content from js */
+	#at4m-dock, .at4-show,
+	#atstbx	{
+	display: none !important;
+	}
+	/* hide Echo if being used */
+	#echo-notifications {
+	display: none !important;
+	}
+	nav {
+    display: none !important;
+	}
+}
+

+ 39 - 3
assets/stylesheets/foreground.css

@@ -36,6 +36,27 @@ a#actions-button {
 	direction: rtl;
 }
 
+/* Reset all table CSS from Foundation styles back to MediaWiki */
+table { width: 0; }
+td.mw-label { width: 0; }
+td.smwpropname, th.smwpropname, td.smwspecname { text-align: inherit; }
+table tbody tr td, table tr td { line-height: inherit; }
+table { background: transparent; margin-bottom: 1.25em; border: 0; }
+table thead, table tfoot { background: 0; font-weight: normal; }
+table thead tr th, table thead tr td, table tfoot tr th, table tfoot tr td { padding: 0; font-size: 100%; color: inherit; text-align: inherit; }
+table tr th, table tr td { padding: 0; font-size: 100%; color: inherit; }
+table tr.even, table tr.alt, table tr:nth-of-type(even) { background: transparent; } 
+table thead tr th, table tfoot tr th, table tbody tr td, table tr td, table tfoot tr td { display: table-cell; line-height: inherit; text-align: inherit; }
+
+/* wikitable classes reset */
+table.wikitable { 
+  margin: 1em 0;
+}
+table.wikitable > tr > th,
+table.wikitable > * > tr > th {
+  text-align: inherit;
+}
+
 /* Style MW Table of Contents */
 
 .toctoggle, .toctoggle a {
@@ -603,10 +624,15 @@ div.mw-htmlform-field-HTMLCheckField div.mw-label {
 	display: none;
 }
 
-/* Jamie's Header Hider */
+/* firstHeading Fix */
 
-body.page-Main_Page h1.firstHeading, body.page-Main_Page #siteSub, body.page-Extension_Main_Page h1.firstHeading, body.page-Extension_Main_Page #siteSub, body.page-Skin_Main_Page h1.firstHeading, body.page-Skin_Main_Page #siteSub, body.page-Farm_Main_Pageh1.firstHeading, body.page-Farm_Main_Page #siteSub, body.mw-special-Userlogin h2.title {
-	display: none;
+@media only screen and (min-width: 40.0625em) {
+h1#firstHeading {
+    font-size: 2.75rem;
+}
+}
+h1#firstHeading {
+    font-size: 2.125rem;
 }
 
 /* Don't like the black top bar? Copy this into your Foreground.css and change the colors 
@@ -1575,6 +1601,16 @@ ul[class*="block-grid"] {
 .oo-ui-barToolGroup.oo-ui-widget-enabled>.oo-ui-toolGroup-tools>.oo-ui-tool>.oo-ui-tool-link, .oo-ui-barToolGroup>.oo-ui-toolGroup-tools>.oo-ui-tool.oo-ui-widget-disabled>.oo-ui-tool-link {
 	display: inline !important;
 }
+.ve-activated #catlinks {
+    display:none;
+}
+.ve-activated #firstHeading {
+    border-bottom:  1px solid #ccc;
+    padding: 0 0 5px;
+}
+.ve-activated [class*="mw-content-"] {
+    padding: 0;
+}
 
 /* Page indicators */