diff --git a/r2/Makefile b/r2/Makefile
index d5a4eca03..377175b78 100644
--- a/r2/Makefile
+++ b/r2/Makefile
@@ -95,7 +95,7 @@ clean_ini:
#################### CSS file lists
SPRITED_STYLESHEETS += reddit.css compact.css
-LESS_STYLESHEETS := goldinfo.less
+LESS_STYLESHEETS := goldinfo.less wiki.less
OTHER_STYLESHEETS := reddit-ie6-hax.css reddit-ie7-hax.css mobile.css highlight.css
#################### Static Files
diff --git a/r2/r2/public/static/css/reddit.css b/r2/r2/public/static/css/reddit.css
index 1ad7c7c2d..e8f23a927 100755
--- a/r2/r2/public/static/css/reddit.css
+++ b/r2/r2/public/static/css/reddit.css
@@ -942,94 +942,6 @@ a.author { margin-right: 0.5em; }
margin: 5px;
}
-.wiki-page-content {
- margin: 15px;
-}
-
-.wiki-page-content .pagelisting {
- font-size: 1.2em;
- font-weight: bold;
- color: black;
- padding-left: 25px;
-}
-
-.wiki-page-content .description h2 {
- color: #222;
-}
-
-.wiki-page-content .description {
- padding-bottom: 5px;
-}
-
-.wikirevisionlisting .generic-table {
- width: 100%;
-}
-
-.wikititle strong {
- font-weight: bold;
-}
-
-.wikititle {
- margin-left: 15px;
- color: #666;
-}
-
-.wiki-page .md {
- word-wrap: break-word;
- max-width: none;
-}
-
-.wiki-page .fancy-settings .toggle {
- display: inline-block;
- padding-right: 15px;
-}
-
-.wiki-page input {
- margin: 5px;
- padding: 2px;
- margin-left: 0;
-}
-
-.wiki-page-content {
- margin-right: 325px;
-}
-.discussionlink {
- display: inline-block;
- margin-left: 15px;
- padding-right: 50px;
- margin-top: 5px;
-}
-
-.discussionlink a {
- padding-left: 15px;
-}
-
-.wikirevisionlisting table tr td {
- padding-right: 15px;
-}
-
-.wiki-page .pagelisting ul {
- list-style: disc;
- padding: 2px;
- padding-left: 10px;
-}
-
-#wiki_revision_reason {
- width: 100%;
-}
-
-.wiki-page .revision {
- transition: opacity 500ms;
- -o-transition: opacity 500ms;
- -ms-transition: opacity 500ms;
- -moz-transition: opacity 500ms;
- -webkit-transition: opacity 500ms;
-}
-
-.wiki-page .revision.hidden {
- opacity: .5;
-}
-
.wikiaction-revisions::before {
background-image: url(../report.png); /* SPRITE */
}
@@ -1038,118 +950,6 @@ a.author { margin-right: 0.5em; }
background-image: url(../page_white_copy.png); /* SPRITE */
}
-.pageactions {
- display: inline-block;
- font-size: larger;
- margin-left: 25px;
- border-radius: 5px;
- border: 1px solid #8D9CAA;
- vertical-align: middle;
-}
-
-.wikiaction {
- display: inline-block;
- margin: 2px;
- padding-top: 2px;
- padding-bottom: 3px;
- border-radius: 3px;
-}
-
-.wikititle {
- display: inline;
- vertical-align: middle;
-}
-
-.pageactions .wikiaction {
- padding-right: 10px;
- padding-left: 10px;
-}
-
-.pageactions .wikiaction:hover {
- background-color: #CEE3F8;
-}
-
-.pageactions .wikiaction-current:hover {
- background-color: #5F99CF;
-}
-
-.pageactions .wikiaction-current {
- color: white;
- background-color: #5F99CF;
-}
-
-/* wiki table of contents */
-
-.md.wiki > .toc > ul {
- float: right;
- padding: 10px 25px;
- margin-right: 0;
- border: 1px solid #8D9CAA;
- list-style: none;
-}
-
-.md.wiki > .toc > ul ul {
- margin: 4px 0;
- padding-left: 25px;
- border-left: 1px dotted #cce;
- list-style: none;
-}
-
-/* wiki content */
-
-.md.wiki p, .md.wiki blockquote {
- margin: .75em 0;
-}
-
-.md.wiki blockquote {
- padding-left: 1em;
-}
-
-.md.wiki h1,
-.md.wiki h2,
-.md.wiki h3,
-.md.wiki h4,
-.md.wiki h5,
-.md.wiki h6 {
- font-weight: bold;
- color: black;
- margin-bottom: .25em;
- margin-top: .5em;
-}
-
-.md.wiki h1 {
- margin-top: .75em;
- font-size: 2.4em;
-}
-
-.md.wiki ul:first-child + h1 {
- margin-top: 0;
-}
-
-.md.wiki h2 {
- margin-top: .75em;
- font-size: 1.8em;
-}
-
-.md.wiki h3 {
- font-size: 1.6em;
-}
-
-.md.wiki h4 {
- font-size: 1.4em;
- color: #333;
-}
-
-.md.wiki h5 {
- font-size: 1.2em;
- color: #444;
-}
-
-.md.wiki h6 {
- font-size: 1.05em;
- color: #666;
-}
-
/* organic listing */
.organic-listing {
border: solid 1px gray;
@@ -1357,7 +1157,6 @@ a.author { margin-right: 0.5em; }
.md em { font-style: italic; }
.md strong em { font-style: italic; font-weight: bold }
.md img { display: none }
-.md.wiki img { display: block }
.md ol, .md ul { margin: 10px 2em; }
.md ul { list-style: disc outside }
.md ol { list-style: decimal outside }
diff --git a/r2/r2/public/static/css/wiki.less b/r2/r2/public/static/css/wiki.less
new file mode 100644
index 000000000..9bc6c821f
--- /dev/null
+++ b/r2/r2/public/static/css/wiki.less
@@ -0,0 +1,203 @@
+.transition (@prop: all, @time: 1s, @ease: linear) {
+ -webkit-transition: @prop @time @ease;
+ -moz-transition: @prop @time @ease;
+ -o-transition: @prop @time @ease;
+ -ms-transition: @prop @time @ease;
+ transition: @prop @time @ease;
+}
+
+.wiki-page {
+ // Main content portion of the wiki pages
+ .wiki-page-content {
+ margin: 15px;
+ margin-right: 325px;
+
+ // Wiki page listing
+ .pagelisting {
+ font-size: 1.2em;
+ font-weight: bold;
+ color: black;
+ padding-left: 25px;
+ ul {
+ list-style: disc;
+ padding: 2px;
+ padding-left: 10px;
+ }
+ }
+
+ // Page action subtitle
+ .description {
+ padding-bottom: 5px;
+ h2 {
+ color: #222;
+ }
+ }
+
+ // Revision listing
+ .wikirevisionlisting {
+ .generic-table {
+ width: 100%;
+ }
+ table tr td {
+ padding-right: 15px;
+ }
+ .revision {
+ .transition(opacity, 500ms);
+ }
+ .revision.hidden {
+ opacity: .5;
+ }
+ }
+
+ // Page content
+ .md {
+ word-wrap: break-word;
+ max-width: none;
+ }
+
+ // Wiki markdown
+ .md.wiki {
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6 {
+ font-weight: bold;
+ color: black;
+ margin-bottom: .25em;
+ margin-top: .5em;
+ }
+
+ h1 {
+ margin-top: .75em;
+ font-size: 2.4em;
+ }
+
+ ul:first-child + h1 {
+ margin-top: 0;
+ }
+
+ h2 {
+ margin-top: .75em;
+ font-size: 1.8em;
+ }
+
+ h3 {
+ font-size: 1.6em;
+ }
+
+ h4 {
+ font-size: 1.4em;
+ color: #333;
+ }
+
+ h5 {
+ font-size: 1.2em;
+ color: #444;
+ }
+
+ h6 {
+ font-size: 1.05em;
+ color: #666;
+ }
+
+ img {
+ display: block;
+ }
+
+ blockquote {
+ padding-left: 1em;
+ }
+
+ p, .md.wiki blockquote {
+ margin: .75em 0;
+ }
+ }
+
+ // Wiki table of contents
+ .md.wiki > .toc > ul {
+ float: right;
+ padding: 10px 25px;
+ margin-right: 0;
+ border: 1px solid #8D9CAA;
+ list-style: none;
+ }
+ .md.wiki > .toc > ul ul {
+ margin: 4px 0;
+ padding-left: 25px;
+ border-left: 1px dotted #cce;
+ list-style: none;
+ }
+
+ // Page settings
+ .fancy-settings .toggle {
+ display: inline-block;
+ padding-right: 15px;
+ }
+
+ // Reason for revision field
+ #wiki_revision_reason {
+ padding: 2px;
+ margin-left: 0;
+ width: 100%;
+ }
+
+ // Save page button, save settings button, etc
+ .wiki_button {
+ padding: 2px;
+ }
+
+ // Submit Discussion button
+ .discussionlink {
+ display: inline-block;
+ margin-left: 15px;
+ padding-right: 50px;
+ margin-top: 5px;
+ a {
+ padding-left: 15px;
+ }
+ }
+
+ }
+
+ // Page title
+ .wikititle {
+ margin-left: 15px;
+ color: #666;
+ display: inline;
+ vertical-align: middle;
+ strong {
+ font-weight: bold;
+ }
+ }
+
+ // Wiki tabs
+ .pageactions {
+ display: inline-block;
+ font-size: larger;
+ margin-left: 25px;
+ border-radius: 5px;
+ border: 1px solid #8D9CAA;
+ vertical-align: middle;
+ .wikiaction {
+ display: inline-block;
+ margin: 2px;
+ padding-top: 2px;
+ padding-bottom: 3px;
+ border-radius: 3px;
+ padding-right: 10px;
+ padding-left: 10px;
+ }
+ .wikiaction:hover {
+ background-color: #CEE3F8;
+ }
+ .wikiaction-current:hover {
+ background-color: #5F99CF;
+ }
+ .wikiaction-current {
+ color: white;
+ background-color: #5F99CF;
+ }
+ }
+}
diff --git a/r2/r2/templates/wikibasepage.html b/r2/r2/templates/wikibasepage.html
index da884b770..625867c3d 100644
--- a/r2/r2/templates/wikibasepage.html
+++ b/r2/r2/templates/wikibasepage.html
@@ -24,6 +24,7 @@
<%def name="stylesheet()">
${parent.stylesheet()}
+ ${less_stylesheet('wiki.less')}
%def>
<%def name="actionsbar(actions)">
diff --git a/r2/r2/templates/wikieditpage.html b/r2/r2/templates/wikieditpage.html
index f167e7f1c..f69c0ff30 100644
--- a/r2/r2/templates/wikieditpage.html
+++ b/r2/r2/templates/wikieditpage.html
@@ -44,5 +44,5 @@
-
+
diff --git a/r2/r2/templates/wikipagesettings.html b/r2/r2/templates/wikipagesettings.html
index f7782b107..a81051c69 100644
--- a/r2/r2/templates/wikipagesettings.html
+++ b/r2/r2/templates/wikipagesettings.html
@@ -72,5 +72,5 @@
%utils:line_field>
%endif
-
+