From: Christian Dywan Date: Thu, 5 Jul 2012 23:19:23 +0000 (+0200) Subject: Enhance faq.css for use with Readable X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75657d1fb495dbaef1d1ce0439f471451a81404c;p=midori Enhance faq.css for use with Readable See: https://bugs.launchpad.net/midori/+bug/743998 --- diff --git a/data/faq.css b/data/faq.css index eb96e13e..bf7d1b27 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 7fe60f65..e765cdec 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; }