Wikipedia:AutoWikiBrowser/style.css: Difference between revisions
Appearance
Content deleted Content added
Sun Creator (talk | contribs) It's not the standard, the font is different for one. |
Tom.Reding (talk | contribs) m →Current style: Comma/ws formatting to match remainder of document |
||
(9 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{AWB}} |
{{AWB tech menu}} |
||
This is the format of the style.css file needs to be if you wish to use a custom css sheet for indicating and displaying diffs in AWB. |
This is the format of the style.css file needs to be if you wish to use a custom css sheet for indicating and displaying diffs in AWB. |
||
Create a file called "style.css" and put it in your AWB directory, you can then use the custom CSS. |
Create a file called "style.css" and put it in your AWB directory (same directory as AutoWikiBrowser.exe), you can then use the custom CSS. |
||
== Current style == |
|||
For reference, the default MediaWiki diff CSS file is [http://en.wikipedia.org/skins-1.5/common/diff.css diff.css]. |
|||
{{See also|User:Tom.Reding/Night-mode style.css}} |
|||
From AWB 5.4.0.0 onwards the MediaWiki blue diff style is used. |
|||
<syntaxhighlight lang="css"> |
|||
/* suppress whitespace padding by C# WebBrowser, see |
|||
http://stackoverflow.com/questions/15033023/white-space-padding-in-webbrowser-control */ |
|||
html, |
|||
body { |
|||
margin: 0; |
|||
} |
|||
/* |
|||
** Diff rendering |
|||
*/ |
|||
table.diff, |
|||
td.diff-otitle, |
|||
td.diff-ntitle { |
|||
background-color: white; |
|||
} |
|||
td.diff-otitle, |
|||
td.diff-ntitle { |
|||
text-align: center; |
|||
} |
|||
td.diff-marker { |
|||
text-align: right; |
|||
font-weight: bold; |
|||
font-size: 1.25em; |
|||
} |
|||
td.diff-lineno { |
|||
font-weight: bold; |
|||
} |
|||
td.diff-addedline, |
|||
td.diff-deletedline, |
|||
td.diff-context { |
|||
font-size: 88%; |
|||
vertical-align: top; |
|||
white-space: -moz-pre-wrap; |
|||
white-space: pre-wrap; |
|||
word-wrap: break-word; |
|||
} |
|||
td.diff-addedline, |
|||
td.diff-deletedline { |
|||
border-style: solid; |
|||
border-width: 1px 1px 1px 4px; |
|||
border-radius: 0.33em; |
|||
} |
|||
td.diff-addedline { |
|||
border-color: #a3d3ff; |
|||
} |
|||
td.diff-deletedline { |
|||
border-color: #ffe49c; |
|||
} |
|||
td.diff-context { |
|||
background: #f3f3f3; |
|||
color: #333333; |
|||
border-style: solid; |
|||
border-width: 1px 1px 1px 4px; |
|||
border-color: #e6e6e6; |
|||
border-radius: 0.33em; |
|||
} |
|||
.diffchange { |
|||
font-weight: bold; |
|||
text-decoration: none; |
|||
} |
|||
table.diff { |
|||
border: none; |
|||
width: 100%; |
|||
border-spacing: 4px; |
|||
/* Ensure that colums are of equal width */ |
|||
table-layout: fixed; |
|||
} |
|||
td.diff-addedline .diffchange, |
|||
td.diff-deletedline .diffchange { |
|||
border-radius: 0.33em; |
|||
padding: 0.25em 0; |
|||
} |
|||
td.diff-addedline .diffchange { |
|||
background: #d8ecff; |
|||
} |
|||
td.diff-deletedline .diffchange { |
|||
background: #feeec8; |
|||
} |
|||
table.diff td { |
|||
padding: 0.25em 0.25em; |
|||
} |
|||
table.diff col.diff-marker { |
|||
width: 1.5%; |
|||
} |
|||
table.diff col.diff-content { |
|||
width: 48.5%; |
|||
} |
|||
table.diff td div { |
|||
/* Force-wrap very long lines such as URLs or page-widening char strings.*/ |
|||
word-wrap: break-word; |
|||
/* As fallback (FF<3.5, Opera <10.5), scrollbars will be added for very wide cells |
|||
instead of text overflowing or widening |
|||
*/ |
|||
overflow: auto; |
|||
} |
|||
</syntaxhighlight> |
|||
== Old style== |
|||
This is not the standard/default AWB style but is similar to it: |
|||
This is the old standard/default AWB style for versions up to 5.3.1.0 (yellow/red/green): |
|||
< |
<syntaxhighlight lang="css"> |
||
td{ |
td{ |
||
border: 1px solid white; |
border: 1px solid white; |
||
Line 17: | Line 136: | ||
background-color: white; |
background-color: white; |
||
border: 1px solid gray; |
border: 1px solid gray; |
||
font-family: Arial, san-serif; font-size: 12pt; |
|||
} |
} |
||
td.diff-addedline { |
td.diff-addedline { |
||
Line 47: | Line 167: | ||
overflow: auto; |
overflow: auto; |
||
} |
} |
||
</syntaxhighlight> |
|||
</source> |
|||
[[Category:AutoWikiBrowser|style.css]] |
[[Category:AutoWikiBrowser|style.css]] |
Latest revision as of 18:08, 24 July 2022
This is the format of the style.css file needs to be if you wish to use a custom css sheet for indicating and displaying diffs in AWB.
Create a file called "style.css" and put it in your AWB directory (same directory as AutoWikiBrowser.exe), you can then use the custom CSS.
Current style
[edit]From AWB 5.4.0.0 onwards the MediaWiki blue diff style is used.
/* suppress whitespace padding by C# WebBrowser, see
http://stackoverflow.com/questions/15033023/white-space-padding-in-webbrowser-control */
html,
body {
margin: 0;
}
/*
** Diff rendering
*/
table.diff,
td.diff-otitle,
td.diff-ntitle {
background-color: white;
}
td.diff-otitle,
td.diff-ntitle {
text-align: center;
}
td.diff-marker {
text-align: right;
font-weight: bold;
font-size: 1.25em;
}
td.diff-lineno {
font-weight: bold;
}
td.diff-addedline,
td.diff-deletedline,
td.diff-context {
font-size: 88%;
vertical-align: top;
white-space: -moz-pre-wrap;
white-space: pre-wrap;
word-wrap: break-word;
}
td.diff-addedline,
td.diff-deletedline {
border-style: solid;
border-width: 1px 1px 1px 4px;
border-radius: 0.33em;
}
td.diff-addedline {
border-color: #a3d3ff;
}
td.diff-deletedline {
border-color: #ffe49c;
}
td.diff-context {
background: #f3f3f3;
color: #333333;
border-style: solid;
border-width: 1px 1px 1px 4px;
border-color: #e6e6e6;
border-radius: 0.33em;
}
.diffchange {
font-weight: bold;
text-decoration: none;
}
table.diff {
border: none;
width: 100%;
border-spacing: 4px;
/* Ensure that colums are of equal width */
table-layout: fixed;
}
td.diff-addedline .diffchange,
td.diff-deletedline .diffchange {
border-radius: 0.33em;
padding: 0.25em 0;
}
td.diff-addedline .diffchange {
background: #d8ecff;
}
td.diff-deletedline .diffchange {
background: #feeec8;
}
table.diff td {
padding: 0.25em 0.25em;
}
table.diff col.diff-marker {
width: 1.5%;
}
table.diff col.diff-content {
width: 48.5%;
}
table.diff td div {
/* Force-wrap very long lines such as URLs or page-widening char strings.*/
word-wrap: break-word;
/* As fallback (FF<3.5, Opera <10.5), scrollbars will be added for very wide cells
instead of text overflowing or widening
*/
overflow: auto;
}
Old style
[edit]This is the old standard/default AWB style for versions up to 5.3.1.0 (yellow/red/green):
td{
border: 1px solid white;
}
table.diff, td.diff-otitle, td.diff-ntitle {
background-color: white;
border: 1px solid gray;
font-family: Arial, san-serif; font-size: 12pt;
}
td.diff-addedline {
background: #cfc;
font-size: smaller;
}
td.diff-deletedline {
background: #ffa;
font-size: smaller;
}
td.diff-context {
background: #eee;
font-size: smaller;
}
.diffchange {
color: red;
font-weight: bold;
text-decoration: none;
}
td.diff-deletedline span.diffchange {
background-color: #FFD754; color:black;
}
td.diff-addedline span.diffchange {
background-color: #73E5A1; color:black;
}
.d{
overflow: auto;
}