Resources: Convert mediawiki.content.json.css to less file
authorjdlrobson <jdlrobson@gmail.com>
Tue, 19 Jul 2016 18:47:59 +0000 (11:47 -0700)
committerLegoktm <legoktm.wikipedia@gmail.com>
Tue, 19 Jul 2016 20:01:49 +0000 (20:01 +0000)
Using a LESS file gives us access to variables. In a following patchset
I will need access to the deviceTabletWidth variable to apply some responsive
styles.

Change-Id: I2acffa71fc4fce89c6803c921ea44ae2f908bd77

resources/Resources.php
resources/src/mediawiki/mediawiki.content.json.css [deleted file]
resources/src/mediawiki/mediawiki.content.json.less [new file with mode: 0644]

index e35c3d7..e838a53 100644 (file)
@@ -948,7 +948,7 @@ return [
        ],
        'mediawiki.content.json' => [
                'position' => 'top',
-               'styles' => 'resources/src/mediawiki/mediawiki.content.json.css',
+               'styles' => 'resources/src/mediawiki/mediawiki.content.json.less',
        ],
        'mediawiki.confirmCloseWindow' => [
                'scripts' => [
diff --git a/resources/src/mediawiki/mediawiki.content.json.css b/resources/src/mediawiki/mediawiki.content.json.css
deleted file mode 100644 (file)
index 91fa02a..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*!
- * CSS for styling HTML-formatted JSON Schema objects
- *
- * @file
- * @author Munaf Assaf <massaf@wikimedia.org>
- */
-
-.mw-json {
-       border-collapse: collapse;
-       border-spacing: 0;
-       font-style: normal;
-}
-
-.mw-json th,
-.mw-json td {
-       border: 1px solid #808080;
-       font-size: 16px;
-       padding: 0.5em 1em;
-}
-
-.mw-json .value,
-.mw-json-single-value {
-       background-color: #dcfae3;
-       font-family: monospace, monospace;
-       white-space: pre-wrap;
-}
-
-.mw-json-single-value {
-       background-color: #eee;
-}
-
-.mw-json-empty {
-       background-color: #fff;
-       font-style: italic;
-}
-
-.mw-json tr {
-       margin-bottom: 0.5em;
-       background-color: #eee;
-}
-
-.mw-json th {
-       background-color: #fff;
-       font-weight: normal;
-}
-
-.mw-json caption {
-       /* For stylistic reasons, suppress the caption of the outermost table */
-       display: none;
-}
-
-.mw-json table caption {
-       color: #808080;
-       display: inline-block;
-       font-size: 10px;
-       font-style: italic;
-       margin-bottom: 0.5em;
-       text-align: left;
-}
diff --git a/resources/src/mediawiki/mediawiki.content.json.less b/resources/src/mediawiki/mediawiki.content.json.less
new file mode 100644 (file)
index 0000000..91fa02a
--- /dev/null
@@ -0,0 +1,59 @@
+/*!
+ * CSS for styling HTML-formatted JSON Schema objects
+ *
+ * @file
+ * @author Munaf Assaf <massaf@wikimedia.org>
+ */
+
+.mw-json {
+       border-collapse: collapse;
+       border-spacing: 0;
+       font-style: normal;
+}
+
+.mw-json th,
+.mw-json td {
+       border: 1px solid #808080;
+       font-size: 16px;
+       padding: 0.5em 1em;
+}
+
+.mw-json .value,
+.mw-json-single-value {
+       background-color: #dcfae3;
+       font-family: monospace, monospace;
+       white-space: pre-wrap;
+}
+
+.mw-json-single-value {
+       background-color: #eee;
+}
+
+.mw-json-empty {
+       background-color: #fff;
+       font-style: italic;
+}
+
+.mw-json tr {
+       margin-bottom: 0.5em;
+       background-color: #eee;
+}
+
+.mw-json th {
+       background-color: #fff;
+       font-weight: normal;
+}
+
+.mw-json caption {
+       /* For stylistic reasons, suppress the caption of the outermost table */
+       display: none;
+}
+
+.mw-json table caption {
+       color: #808080;
+       display: inline-block;
+       font-size: 10px;
+       font-style: italic;
+       margin-bottom: 0.5em;
+       text-align: left;
+}