[Xfce4-commits] <midori:master> Enhance faq.css for use with Readable
Christian Dywan
noreply at xfce.org
Fri Jul 6 01:38:03 CEST 2012
Updating branch refs/heads/master
to 75657d1fb495dbaef1d1ce0439f471451a81404c (commit)
from db30c9a3d7604934d1c089af83d89b3071b4e8e1 (commit)
commit 75657d1fb495dbaef1d1ce0439f471451a81404c
Author: Christian Dywan <christian at twotoasts.de>
Date: Fri Jul 6 01:19:23 2012 +0200
Enhance faq.css for use with Readable
See: https://bugs.launchpad.net/midori/+bug/743998
data/faq.css | 56 ++++++++++++++++++++++++++++++++++++-----------
midori/midori-browser.c | 9 ++++++-
2 files changed, 50 insertions(+), 15 deletions(-)
diff --git a/data/faq.css b/data/faq.css
index eb96e13..bf7d1b2 100644
--- a/data/faq.css
+++ b/data/faq.css
@@ -8,29 +8,59 @@ Stylesheet for Midori's documentation based on a version of Enrico Troeger.
@media screen {
- body {
- background-color: #f6fff3;
- color: #404040;
- margin-left: 0.4em;
- width: 60em;
- font-size: 90%;
+ html, body {
+ width: 100% !important;
+ height: 100% !important;
+ overflow: auto !important;
+ margin: 0 !important;
+ padding: 0 !important;
}
- a {
- color: #013100;
+ * {
+ background: #f6fff3 !important;
+ color: #404040 !important;
+ font-size: 14pt !important;
+ font-family: serif !important;
+ text-align: justify !important;
+ line-height: 1.4em !important;
+ word-spacing: 0.4mm !important;
+ letter-spacing: 0.2mm !important;
+ -webkit-column-count: auto !important;
+ -webkit-column-width: auto !important;
+ -webkit-box-shadow: none !important;
}
- a:visited {
- color: #7E558E;
+ div, p {
+ padding: 5pt !important;
+ }
+
+ body, li {
+ padding-left: 5pt !important;
+ }
+
+ img, *[accesskey], form *, form, iframe {
+ display: none !important
+ }
+
+ img[width] {
+ display: inline !important
+ }
+
+ :link, :link * {
+ color: #013100 !important;
+ }
+
+ :visited, :visited * {
+ color: #7E558E !important;
}
a:hover {
- text-decoration: none;
+ text-decoration: none !important;
}
h1, h2, h3 {
- font-family: sans-serif;
- color: #002a00;
+ font-family: serif !important;
+ color: #002a00 !important;
}
h1 {
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 7fe60f6..e765cde 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -3623,14 +3623,19 @@ _action_readable_activate (GtkAction* action,
if (!view)
return;
- filename = midori_app_find_res_filename ("readable.css");
+ filename = midori_app_find_res_filename ("faq.css");
stylesheet = NULL;
if (!g_file_get_contents (filename, &stylesheet, NULL, NULL))
{
+ katze_assign (filename, sokoke_find_data_filename ("doc/midori/faq.css", FALSE));
+ g_file_get_contents (filename, &stylesheet, NULL, NULL);
+ }
+ if (!(stylesheet && *stylesheet))
+ {
g_free (filename);
g_free (stylesheet);
midori_view_add_info_bar (MIDORI_VIEW (view), GTK_MESSAGE_ERROR,
- "Stylesheet readable.css not found", NULL, view,
+ "Stylesheet faq.css not found", NULL, view,
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL);
return;
}
More information about the Xfce4-commits
mailing list