summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2012-03-10 05:28:27 +0100
committerJonas Smedegaard <dr@jones.dk>2021-03-24 21:41:34 +0100
commit24b4df063d752c645dcc5fe9333b969a19ceff7d (patch)
treef46859e2fbbc9bc71724b1754335df9a7623303a
parenteba5c91523535ba0391b148ae351e7d2c6471d7d (diff)
provide mixins for fine-grained subsets of default style
-rw-r--r--default/_ikiwiki.scss186
1 files changed, 185 insertions, 1 deletions
diff --git a/default/_ikiwiki.scss b/default/_ikiwiki.scss
index 4d73124..53e3895 100644
--- a/default/_ikiwiki.scss
+++ b/default/_ikiwiki.scss
@@ -13,7 +13,7 @@ footer, header, hgroup, menu, nav, section {
}
}
-@mixin ikiwiki-style-legacy {
+@mixin ikiwiki-header {
div.header, header.header {
margin: 0;
font-size: 140%;
@@ -21,14 +21,18 @@ div.header, header.header {
line-height: 1em;
display: block;
}
+}
+@mixin ikiwiki-inlineheader {
.inlineheader .author {
margin: 0;
font-size: 112%;
font-weight: bold;
display: block;
}
+}
+@mixin ikiwiki-actions {
.actions ul {
margin: 0;
padding: 6px .4em;
@@ -48,7 +52,9 @@ div.header, header.header {
.inlinepage .actions ul {
border-bottom: 0;
}
+}
+@mixin ikiwiki-plugin-po {
#otherlanguages ul {
margin: 0;
padding: 6px;
@@ -63,23 +69,31 @@ div.header, header.header {
.pageheader #otherlanguages {
border-bottom: 1px solid #000;
}
+}
+@mixin ikiwiki-inlinecontent {
.inlinecontent,
.inlineenclosure {
margin-top: .4em;
}
+}
+@mixin ikiwiki-footer {
.pagefooter,
.inlinefooter,
.comments {
clear: both;
}
+}
+@mixin ikiwiki-pageinfo {
#pageinfo {
margin: 1em 0;
border-top: 1px solid #000;
}
+}
+@mixin ikiwiki-tags {
.tags {
margin-top: 1em;
}
@@ -87,11 +101,15 @@ div.header, header.header {
.inlinepage .tags {
display: inline;
}
+}
+@mixin ikiwiki-plugin-map {
.mapparent {
text-decoration: none;
}
+}
+@mixin ikiwiki-plugin-img {
.img caption {
font-size: 80%;
caption-side: bottom;
@@ -101,7 +119,9 @@ div.header, header.header {
img.img {
margin: 0.5ex;
}
+}
+@mixin ikiwiki-alignment {
.align-left {
float: left;
}
@@ -109,16 +129,22 @@ img.img {
.align-right {
float: right;
}
+}
+@mixin ikiwiki-backlinks {
#backlinks {
margin-top: 1em;
}
+}
+@mixin ikiwiki-plugin-search {
#searchform {
display: inline;
float: right;
}
+}
+@mixin ikiwiki-plugin-editpage {
#editcontent {
width: 98%;
}
@@ -127,15 +153,21 @@ img.img {
width: auto;
overflow: auto;
}
+}
+@mixin ikiwiki-images {
img {
border-style: none;
}
+}
+@mixin ikiwiki-pre {
pre {
overflow: auto;
}
+}
+@mixin ikiwiki-plugin-recentchanges {
div.recentchanges {
border-style: solid;
border-width: 1px;
@@ -193,7 +225,9 @@ div.recentchanges {
margin: 0;
width: 60%;
}
+}
+@mixin ikiwiki-blogform {
.blogform, #blogform {
padding: 10px 10px;
border: 1px solid #aaa;
@@ -202,13 +236,17 @@ div.recentchanges {
width: auto;
overflow: auto;
}
+}
+@mixin ikiwiki-inlinepage {
.inlinepage {
padding: 10px 10px;
border: 1px solid #aaa;
overflow: auto;
}
+}
+@mixin ikiwiki-authorship {
.pagedate,
.pagelicense,
.pagecopyright {
@@ -216,7 +254,9 @@ div.recentchanges {
display: block;
margin-top: 1em;
}
+}
+@mixin ikiwiki-archivepage {
.archivepagedate {
font-style: italic;
}
@@ -224,11 +264,15 @@ div.recentchanges {
.archivepage {
margin-bottom: 1em;
}
+}
+@mixin ikiwiki-debug {
.error {
color: #C00;
}
+}
+@mixin ikiwiki-plugin-sidebar {
.sidebar {
width: 20ex;
float: right;
@@ -240,7 +284,9 @@ div.recentchanges {
border: 1px solid black;
color: black !important;
}
+}
+@mixin ikiwiki-plugin-poll {
hr.poll {
height: 10pt;
color: white !important;
@@ -254,11 +300,15 @@ div.poll {
padding: 1ex 1ex;
border: 1px solid #aaa;
}
+}
+@mixin ikiwiki-plugin-color {
span.color {
padding: 2px;
}
+}
+@mixin ikiwiki-plugin-comments {
.comment-header,
.microblog-header {
font-style: italic;
@@ -282,7 +332,9 @@ span.color {
border: 1px solid #aaa;
padding: 3px;
}
+}
+@mixin ikiwiki-plugin-progress {
div.progress {
margin-top: 1ex;
margin-bottom: 1ex;
@@ -299,7 +351,9 @@ div.progress-done {
text-align: center;
padding: 1px;
}
+}
+@mixin ikiwiki-site-print {
/* things to hide in printouts */
@media print {
.actions {
@@ -327,7 +381,9 @@ div.progress-done {
display: none;
}
}
+}
+@mixin ikiwiki-infobox {
/* infobox template */
.infobox {
float: right;
@@ -339,7 +395,9 @@ div.progress-done {
background: white;
color: black !important;
}
+}
+@mixin ikiwiki-notebook {
/* notebox template */
.notebox {
float: right;
@@ -352,7 +410,9 @@ div.progress-done {
background: white;
color: black !important;
}
+}
+@mixin ikiwiki-popup {
/* popup template and backlinks hiding */
.popup {
border-bottom: 1px dotted #366;
@@ -376,7 +436,9 @@ div.progress-done {
background-color: #dee;
color: black;
}
+}
+@mixin ikiwiki-forms {
/* form styling */
fieldset {
margin: 1ex 0;
@@ -426,7 +488,9 @@ input#searchbox {
.fb_required {
font-weight: bold;
}
+}
+@mixin ikiwiki-plugin-highlight {
/* highlight plugin */
pre.hl {
color: #000000;
@@ -492,7 +556,9 @@ pre.hl {
.hl.kwd {
color: #010181;
}
+}
+@mixin ikiwiki-plugin-calendar {
/* calendar plugin */
.month-calendar-day-this-day,
.year-calendar-this-month {
@@ -515,7 +581,9 @@ pre.hl {
font-weight: normal;
font-size: 150%;
}
+}
+@mixin ikiwiki-lists {
/* outlines */
li.L1 {
list-style: upper-roman;
@@ -548,7 +616,9 @@ li.L7 {
li.L8 {
list-style: upper-alpha;
}
+}
+@mixin ikiwiki-plugin-pagestats {
/* tag cloud */
.pagecloud {
float: right;
@@ -579,7 +649,9 @@ li.L8 {
.biggestPC {
font-size: 130%;
}
+}
+@mixin ikiwiki-feedbutton {
/* orange feed button */
.feedbutton {
background: #ff6600;
@@ -600,11 +672,15 @@ li.L8 {
color: white !important;
background: #ff9900;
}
+}
+@mixin ikiwiki-plugin-flattr {
.FlattrButton {
display: none;
}
+}
+@mixin ikiwiki-plugin-openid {
/* login selector */
#login_choice {
display: none;
@@ -649,7 +725,9 @@ a.login_large_btn:focus {
.login_selected {
border: 4px solid #DDD;
}
+}
+@mixin ikiwiki-plugin-attachment {
.fileupload-content .ui-progressbar {
width: 200px;
height: 20px;
@@ -658,7 +736,9 @@ a.login_large_btn:focus {
.fileupload-content .ui-progressbar-value {
background: url(ikiwiki/images/pbar-ani.gif);
}
+}
+@mixin ikiwiki-plugin-trail {
.trails {
margin-top: 1em;
margin-bottom: 1em;
@@ -745,6 +825,110 @@ a.login_large_btn:focus {
}
}
+// all styles in same order as original Ikiwiki stylesheet
+@mixin ikiwiki-style-legacy {
+ @include ikiwiki-header;
+ @include ikiwiki-inlineheader;
+ @include ikiwiki-actions;
+ @include ikiwiki-plugin-po;
+ @include ikiwiki-inlinecontent;
+ @include ikiwiki-footer;
+ @include ikiwiki-pageinfo;
+ @include ikiwiki-tags;
+ @include ikiwiki-plugin-map;
+ @include ikiwiki-plugin-img;
+ @include ikiwiki-alignment;
+ @include ikiwiki-backlinks;
+ @include ikiwiki-plugin-search;
+ @include ikiwiki-plugin-editpage;
+ @include ikiwiki-images;
+ @include ikiwiki-pre;
+ @include ikiwiki-plugin-recentchanges;
+ @include ikiwiki-blogform;
+ @include ikiwiki-inlinepage;
+ @include ikiwiki-authorship;
+ @include ikiwiki-archivepage;
+ @include ikiwiki-debug;
+ @include ikiwiki-plugin-sidebar;
+ @include ikiwiki-plugin-poll;
+ @include ikiwiki-plugin-color;
+ @include ikiwiki-plugin-comments;
+ @include ikiwiki-plugin-progress;
+ @include ikiwiki-site-print;
+ @include ikiwiki-infobox;
+ @include ikiwiki-notebook;
+ @include ikiwiki-popup;
+ @include ikiwiki-forms;
+ @include ikiwiki-plugin-highlight;
+ @include ikiwiki-plugin-calendar;
+ @include ikiwiki-lists;
+ @include ikiwiki-plugin-pagestats;
+ @include ikiwiki-feedbutton;
+ @include ikiwiki-plugin-flattr;
+ @include ikiwiki-plugin-openid;
+ @include ikiwiki-plugin-attachment;
+ @include ikiwiki-plugin-trail;
+}
+
+@mixin ikiwiki-site {
+ // main content
+ @include ikiwiki-inlinepage;
+ @include ikiwiki-inlineheader;
+ @include ikiwiki-inlinecontent;
+ @include ikiwiki-plugin-comments;
+ // header
+ @include ikiwiki-header;
+ @include ikiwiki-plugin-search;
+ @include ikiwiki-actions;
+ @include ikiwiki-plugin-po;
+ // footer
+ @include ikiwiki-footer;
+ @include ikiwiki-pageinfo;
+ @include ikiwiki-tags;
+ @include ikiwiki-backlinks;
+ @include ikiwiki-authorship;
+ // aside
+ @include ikiwiki-plugin-sidebar;
+ @include ikiwiki-plugin-trail;
+}
+
+// http://www.louddog.com/2008/create-maintainable-code-with-a-css-styleguide/
+@mixin ikiwiki-style {
+ // site defaults
+ @include ikiwiki-images;
+ @include ikiwiki-pre;
+ // generic styles
+ @include ikiwiki-lists;
+ @include ikiwiki-plugin-img;
+ @include ikiwiki-feedbutton;
+ @include ikiwiki-forms;
+ @include ikiwiki-alignment;
+ @include ikiwiki-debug;
+ @include ikiwiki-plugin-highlight;
+ @include ikiwiki-plugin-color;
+ // shell
+ // layout
+ @include ikiwiki-site;
+ @include ikiwiki-site-print;
+ // modulars
+ @include ikiwiki-infobox;
+ @include ikiwiki-notebook;
+ @include ikiwiki-popup;
+ @include ikiwiki-plugin-calendar;
+ @include ikiwiki-plugin-progress;
+ @include ikiwiki-plugin-map;
+ @include ikiwiki-plugin-poll;
+ @include ikiwiki-plugin-pagestats;
+ @include ikiwiki-plugin-flattr;
+ @include ikiwiki-blogform;
+ // section/page specific
+ @include ikiwiki-archivepage;
+ @include ikiwiki-plugin-recentchanges;
+ @include ikiwiki-plugin-editpage;
+ @include ikiwiki-plugin-attachment;
+ @include ikiwiki-plugin-openid;
+}
+
@mixin ikiwiki {
@include ikiwiki-boilerplate;
@include ikiwiki-reset;