changeset 2774:bf6fcb963d32

fix #428 change modernized reset.css to normalize.css bundled with bootstrap
author RogerHaase <haaserd@gmail.com>
date Mon, 01 Sep 2014 21:08:39 -0700
parents c860300a60c9
children 9c036e6c2265
files MoinMoin/themes/modernized/static/css/stylus/reset.css MoinMoin/themes/modernized/static/css/stylus/theme.styl MoinMoin/themes/modernized/static/css/theme.css make.py
diffstat 4 files changed, 197 insertions(+), 70 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/themes/modernized/static/css/stylus/reset.css	Mon Sep 01 20:47:58 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-Copied from:  http://code.google.com/p/html5resetcss/
-
-html5doctor.com Reset Stylesheet
-v1.6.1
-Last Updated: 2010-09-17
-Author: Richard Clark - http: //richclarkdesign.com
-Twitter: @rich_clark
-*/
-html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p,
-blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins,
-kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, canvas, details, figcaption, figure, footer, header, hgroup,
-menu, nav, section, summary, time, mark, audio,
-video { margin: 0; padding: 0; border: 0; outline: 0;
-            font-size: 100%; vertical-align: baseline; background: transparent; }
-body { line-height: 1; }
-article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav,
-section { display: block; }
-nav ul { list-style: none; }
-blockquote { quotes: none; }
-blockquote:before, blockquote:after { content: none; }
-a { margin: 0; padding: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
-ins { background-color: #ff9; color: #000; text-decoration: none; }
-mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; }
-del { text-decoration: line-through; }
-abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; }
-table { border-collapse: collapse; border-spacing: 0; }
-hr { display: block; height: 1px; border: 0; border-top: 1px solid #cccccc; margin: 1em 0; padding: 0; }
-input, select { vertical-align: middle; }
-/* end HTML5 reset */
--- a/MoinMoin/themes/modernized/static/css/stylus/theme.styl	Mon Sep 01 20:47:58 2014 -0700
+++ b/MoinMoin/themes/modernized/static/css/stylus/theme.styl	Mon Sep 01 21:08:39 2014 -0700
@@ -5,8 +5,8 @@
 // includes comments with notice regarding automatically generated css and licensing
 @import "notice.css"
 
-// reset all browser-specific default to have common defaults everywhere
-@import "reset.css"
+// normalize.css is compiled by make.py (./m css) from the normalize.less file bundled with bootstrap
+@import "normalize.css"
 
 // smileys used by moin wiki parser (and maybe others)
 @import "smileys.css"
--- a/MoinMoin/themes/modernized/static/css/theme.css	Mon Sep 01 20:47:58 2014 -0700
+++ b/MoinMoin/themes/modernized/static/css/theme.css	Mon Sep 01 21:08:39 2014 -0700
@@ -12,38 +12,186 @@
     Copyright: 2010 MoinMoin:RogerHaase
     License: GNU GPL v2 or later, see COPYING for details.
 */
-/*
-Copied from:  http://code.google.com/p/html5resetcss/
-
-html5doctor.com Reset Stylesheet
-v1.6.1
-Last Updated: 2010-09-17
-Author: Richard Clark - http: //richclarkdesign.com
-Twitter: @rich_clark
-*/
-html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p,
-blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins,
-kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, canvas, details, figcaption, figure, footer, header, hgroup,
-menu, nav, section, summary, time, mark, audio,
-video { margin: 0; padding: 0; border: 0; outline: 0;
-            font-size: 100%; vertical-align: baseline; background: transparent; }
-body { line-height: 1; }
-article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav,
-section { display: block; }
-nav ul { list-style: none; }
-blockquote { quotes: none; }
-blockquote:before, blockquote:after { content: none; }
-a { margin: 0; padding: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
-ins { background-color: #ff9; color: #000; text-decoration: none; }
-mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; }
-del { text-decoration: line-through; }
-abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; }
-table { border-collapse: collapse; border-spacing: 0; }
-hr { display: block; height: 1px; border: 0; border-top: 1px solid #cccccc; margin: 1em 0; padding: 0; }
-input, select { vertical-align: middle; }
-/* end HTML5 reset */
+/*! normalize.css v3.0.0 | MIT License | git.io/normalize */
+html {
+  font-family: sans-serif;
+  -ms-text-size-adjust: 100%;
+  -webkit-text-size-adjust: 100%;
+}
+body {
+  margin: 0;
+}
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+nav,
+section,
+summary {
+  display: block;
+}
+audio,
+canvas,
+progress,
+video {
+  display: inline-block;
+  vertical-align: baseline;
+}
+audio:not([controls]) {
+  display: none;
+  height: 0;
+}
+[hidden],
+template {
+  display: none;
+}
+a {
+  background: transparent;
+}
+a:active,
+a:hover {
+  outline: 0;
+}
+abbr[title] {
+  border-bottom: 1px dotted;
+}
+b,
+strong {
+  font-weight: bold;
+}
+dfn {
+  font-style: italic;
+}
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+mark {
+  background: #ff0;
+  color: #000;
+}
+small {
+  font-size: 80%;
+}
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+sup {
+  top: -0.5em;
+}
+sub {
+  bottom: -0.25em;
+}
+img {
+  border: 0;
+}
+svg:not(:root) {
+  overflow: hidden;
+}
+figure {
+  margin: 1em 40px;
+}
+hr {
+  -moz-box-sizing: content-box;
+  box-sizing: content-box;
+  height: 0;
+}
+pre {
+  overflow: auto;
+}
+code,
+kbd,
+pre,
+samp {
+  font-family: monospace, monospace;
+  font-size: 1em;
+}
+button,
+input,
+optgroup,
+select,
+textarea {
+  color: inherit;
+  font: inherit;
+  margin: 0;
+}
+button {
+  overflow: visible;
+}
+button,
+select {
+  text-transform: none;
+}
+button,
+html input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+  -webkit-appearance: button;
+  cursor: pointer;
+}
+button[disabled],
+html input[disabled] {
+  cursor: default;
+}
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+  border: 0;
+  padding: 0;
+}
+input {
+  line-height: normal;
+}
+input[type="checkbox"],
+input[type="radio"] {
+  box-sizing: border-box;
+  padding: 0;
+}
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+input[type="search"] {
+  -webkit-appearance: textfield;
+  -moz-box-sizing: content-box;
+  -webkit-box-sizing: content-box;
+  box-sizing: content-box;
+}
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+fieldset {
+  border: 1px solid #c0c0c0;
+  margin: 0 2px;
+  padding: 0.35em 0.625em 0.75em;
+}
+legend {
+  border: 0;
+  padding: 0;
+}
+textarea {
+  overflow: auto;
+}
+optgroup {
+  font-weight: bold;
+}
+table {
+  border-collapse: collapse;
+  border-spacing: 0;
+}
+td,
+th {
+  padding: 0;
+}
 /* smileys -- <span class="moin-text-icon moin-smile">:-)</span> */
 .moin-text-icon { font-size: 0; color: transparent; }
 .moin-alert:before { content: url('../img/smileys/alert.png'); }
--- a/make.py	Mon Sep 01 20:47:58 2014 -0700
+++ b/make.py	Mon Sep 01 21:08:39 2014 -0700
@@ -354,11 +354,22 @@
 
     def cmd_css(self, *args):
         """run Stylus and lessc to update CSS files"""
-        print 'Running Stylus to update Modernized theme CSS files...'
-        # Note: we use / here to specify directory offsets; this works as used below in Windows XP, 2000, 7, 8
+        # Note: we use / below within file paths; this works in Windows XP, 2000, 7, 8
         bootstrap_loc = get_bootstrap_data_location().strip() + '/less'
         pygments_loc = get_pygments_data_location().strip() + '/css'
-        command = 'cd {0}{1}stylus --include {2} --include-css --compress < theme.styl > ../theme.css'.format('MoinMoin/themes/modernized/static/css/stylus', SEP, pygments_loc)
+        modernized_loc = 'MoinMoin/themes/modernized/static/css/stylus'
+        basic_loc = 'MoinMoin/themes/basic/static/custom-less'
+
+        print 'Running lessc to create normalize.css for modernized theme...'
+        command = 'lessc {0}/normalize.less > {1}/normalize.css'.format(bootstrap_loc, modernized_loc)
+        result = subprocess.call(command, shell=True)
+        if result == 0:
+            print 'Success: normalize.css created for modernized theme.'
+        else:
+            print 'Error: creation of normalize.css failed, see error messages above.'
+
+        print 'Running Stylus to update Modernized theme CSS files...'
+        command = 'cd {0}{1}stylus --include {2} --include-css --compress < theme.styl > ../theme.css'.format(modernized_loc, SEP, pygments_loc)
         result = subprocess.call(command, shell=True)
         if result == 0:
             print 'Success: Modernized CSS files updated.'
@@ -376,7 +387,7 @@
         else:
             data_loc = '{0}:{1}'.format(bootstrap_loc, pygments_loc)
         include = '--include-path=' + data_loc
-        command = 'cd MoinMoin/themes/basic/static/custom-less{0}lessc {1} theme.less ../css/theme.css'.format(SEP, include)
+        command = 'cd {0}{1}lessc {2} theme.less ../css/theme.css'.format(basic_loc, SEP, include)
         result = subprocess.call(command, shell=True)
         if result == 0:
             print 'Success: Basic theme CSS files updated.'