From c22fbd3868641ae5895fd8a519e5732d3dcc4d9b Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Mon, 26 Nov 2012 15:42:35 +0800 Subject: [PATCH] MDL-36837 theme: Help icons aligned on the left are well positioned --- lib/outputrenderers.php | 2 +- theme/base/style/core.css | 8 ++++++-- theme/standard/style/core.css | 1 - theme/upgrade.txt | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index ddf914763c9..3d7f41034f6 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -1660,7 +1660,7 @@ class core_renderer extends renderer_base { public function doc_link($path, $text = '', $forcepopup = false) { global $CFG; - $icon = $this->pix_icon('docs', $text, 'moodle', array('class'=>'iconhelp')); + $icon = $this->pix_icon('docs', $text, 'moodle', array('class'=>'iconhelp icon-pre')); $url = new moodle_url(get_docs_url($path)); diff --git a/theme/base/style/core.css b/theme/base/style/core.css index 8cb5b331324..697e07710ba 100644 --- a/theme/base/style/core.css +++ b/theme/base/style/core.css @@ -90,15 +90,21 @@ a.autolink.glossary:hover {cursor: help;} img.resize {height: 1em;width: 1em;} .block img.resize, .breadcrumb img.resize {height: 0.9em;width: 0.8em;} + +/* Icon styles */ img.icon {height:16px;vertical-align:text-bottom;width:16px;padding-right: 6px;} .dir-rtl img.icon {padding-left: 6px; padding-right: 0; } img.iconsmall {height:12px;margin-right:3px;vertical-align:middle;width:12px;} img.iconhelp, .helplink img {height:16px; padding-left:3px;vertical-align:text-bottom;width:16px;} +.dir-rtl img.iconhelp, .dir-rtl .helplink img {padding-right: 3px; padding-left: 0; } img.iconlarge {height: 24px; width: 24px; vertical-align:middle;} img.iconsort { vertical-align: text-bottom; padding-left: .3em; margin-bottom: .15em;} .dir-rtl img.iconsort { padding-right: .3em; padding-left: 0;} img.icontoggle {height:17px;vertical-align:middle;width:50px;} img.iconkbhelp {height:17px;width:49px;} +img.icon-pre, .dir-rtl img.icon-post { padding-right: 3px; padding-left: 0; } +img.icon-post, .dir-rtl img.icon-pre { padding-left: 3px; padding-right: 0; } + .categorybox .category {font-size:1.2em;font-weight:bold;} .generalbox {border:1px solid;} .boxaligncenter {margin-left:auto;margin-right:auto;} @@ -191,8 +197,6 @@ a.skip:active {position: static;display: block;} #page-footer .logininfo, #page-footer .sitelink, #page-footer .helplink {margin:0px 10px;} -#page-footer .helplink img.iconhelp { margin: 0 .45em 0 0 ; padding: 0;} -.dir-rtl #page-footer .helplink img.iconhelp { margin: 0 0 0 .45em ;} #page-footer .performanceinfo {text-align:center;margin:10px 20%;} #page-footer .performanceinfo span {display:block;} #page-footer .validators {margin-top:40px;padding-top:5px;border-top: 1px dotted gray;} diff --git a/theme/standard/style/core.css b/theme/standard/style/core.css index adbae91e578..42eb9be1cdf 100644 --- a/theme/standard/style/core.css +++ b/theme/standard/style/core.css @@ -180,7 +180,6 @@ table.rotateheaders th.header {vertical-align: bottom;} #participationreportselector {text-align: center;} #participationreportactions {text-align: center;} .initialbar {text-align: center;} -.helplink img {margin: 0 2px;} .closewindow, .tabledivider {border-width:1px;border-style:solid;border-left:0;border-right:0;border-top:0;} .sitetopic {margin-bottom:20px;} diff --git a/theme/upgrade.txt b/theme/upgrade.txt index 8a6daee760b..8bd58c8fbe9 100644 --- a/theme/upgrade.txt +++ b/theme/upgrade.txt @@ -36,6 +36,7 @@ optional changes: * new icons i/courseevent, i/groupevent, i/siteevent and i/userevent (16x16) instead of c/* for calendar events. * new icon t/markasread (12x12) to replace t/clear used in forums. * new icon t/check (12x12) to replace t/clear which name does not reflect the icon meaning. +* new classes 'icon-pre' and 'icon-post' supposedly to be used when the icon is positioned before or after the text. This is not really used yet, but it's a start towards some standardisation of the icon selectors. === 2.3 === -- 2.43.0