From 160d516699d348d4f92b5dacb580cb817954271c Mon Sep 17 00:00:00 2001 From: Andrew Short Date: Wed, 13 Jun 2012 17:46:22 +1000 Subject: [PATCH] BUGFIX: Consistently style custom defined page icons. * Apply page icon styling to .page-icon, rather than specific elements. --- admin/css/screen.css | 18 ++++++++------ admin/scss/_style.scss | 53 ++++++++++++++++++++++-------------------- admin/scss/_tree.scss | 8 +------ 3 files changed, 40 insertions(+), 39 deletions(-) diff --git a/admin/css/screen.css b/admin/css/screen.css index 0246987ec..63539b87b 100644 --- a/admin/css/screen.css +++ b/admin/css/screen.css @@ -325,6 +325,14 @@ body.cms { overflow: hidden; } .message.good { background-color: #65a839; background-color: rgba(101, 168, 57, 0.7); border-color: #65a839; color: #fff; text-shadow: 1px -1px 0 #1f9433; -webkit-border-radius: 3px 3px 3px 3px; -moz-border-radius: 3px 3px 3px 3px; -ms-border-radius: 3px 3px 3px 3px; -o-border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px; } .message p { margin: 0; } +/** -------------------------------------------- Page icons -------------------------------------------- */ +.page-icon, a .jstree-pageicon { display: block; width: 16px; height: 16px; background: transparent url(../images/sitetree_ss_pageclass_icons_default.png) no-repeat; } + +.page-icon.class-HomePage { background-position: 0 -48px; } +.page-icon.class-RedirectorPage { background-position: 0 -16px; } +.page-icon.class-VirtualPage { background-position: 0 -32px; } +.page-icon.class-ErrorPage { background-position: 0 -112px; } + /** -------------------------------------------- "Add page" dialog -------------------------------------------- */ .cms-page-add-form-dialog { display: none; } @@ -340,12 +348,8 @@ body.cms { overflow: hidden; } .cms-add-form #PageType li.disabled:hover { background: none; } .cms-add-form #PageType li input { margin: inherit; } .cms-add-form #PageType li label { padding-left: 0; padding-bottom: 0; } -.cms-add-form #PageType li input, .cms-add-form #PageType li label, .cms-add-form #PageType li .icon, .cms-add-form #PageType li .title { float: left; line-height: 1.3em; } -.cms-add-form #PageType li .icon { width: 20px; display: block; width: 16px; height: 16px; margin: 0 4px; background-color: transparent; background-image: url(../images/sitetree_ss_pageclass_icons_default.png); background-repeat: no-repeat; } -.cms-add-form #PageType li .class-HomePage { background-position: 0 -48px; } -.cms-add-form #PageType li .class-RedirectorPage { background-position: 0 -16px; } -.cms-add-form #PageType li .class-VirtualPage { background-position: 0 -32px; } -.cms-add-form #PageType li .class-ErrorPage { background-position: 0 -112px; } +.cms-add-form #PageType li input, .cms-add-form #PageType li label, .cms-add-form #PageType li .page-icon, .cms-add-form #PageType li .title { float: left; line-height: 1.3em; } +.cms-add-form #PageType li .page-icon { margin: 0 4px; } .cms-add-form #PageType li .title { width: 120px; font-weight: bold; padding-right: 10px; } .cms-add-form #PageType li .description { font-style: italic; } @@ -726,7 +730,7 @@ form.import-form label.left { width: 250px; } .tree-holder.jstree-apple .jstree-closed > ins, .cms-tree.jstree-apple .jstree-closed > ins { background-position: 0 0; } .tree-holder.jstree-apple .jstree-open > ins, .cms-tree.jstree-apple .jstree-open > ins { background-position: -20px 0; } -a .jstree-pageicon { display: block; float: left; width: 16px; height: 16px; margin-right: 4px; background-color: transparent; background-image: url(../images/sitetree_ss_pageclass_icons_default.png); background-repeat: no-repeat; } +a .jstree-pageicon { float: left; margin-right: 4px; } li.class-HomePage > a .jstree-pageicon { background-position: 0 -48px; } diff --git a/admin/scss/_style.scss b/admin/scss/_style.scss index 513001de7..4b6dde9d6 100644 --- a/admin/scss/_style.scss +++ b/admin/scss/_style.scss @@ -423,6 +423,32 @@ body.cms { } } +/** -------------------------------------------- + * Page icons + * -------------------------------------------- */ + +.page-icon, a .jstree-pageicon { + display: block; + width: 16px; + height: 16px; + background: transparent url(../images/sitetree_ss_pageclass_icons_default.png) no-repeat; +} + +.page-icon { + &.class-HomePage { + background-position: 0 -48px; + } + &.class-RedirectorPage { + background-position: 0 -16px; + } + &.class-VirtualPage { + background-position: 0 -32px; + } + &.class-ErrorPage { + background-position: 0 -112px; + } +} + /** -------------------------------------------- * "Add page" dialog * -------------------------------------------- */ @@ -487,38 +513,15 @@ body.cms { padding-bottom: 0; } - input, label, .icon, .title { + input, label, .page-icon, .title { float: left; line-height: 1.3em; } - .icon { - width: 20px; - display: block; - width: 16px; - height: 16px; + .page-icon { margin: 0 4px; - background-color: transparent; - background-image: url(../images/sitetree_ss_pageclass_icons_default.png); - background-repeat: no-repeat; - } - - .class-HomePage { - background-position: 0 -48px; } - .class-RedirectorPage { - background-position: 0 -16px; - } - - .class-VirtualPage { - background-position: 0 -32px; - } - - .class-ErrorPage { - background-position: 0 -112px; - } - .title { width: 120px; font-weight: bold; diff --git a/admin/scss/_tree.scss b/admin/scss/_tree.scss index 272de76ea..d44bc1aeb 100644 --- a/admin/scss/_tree.scss +++ b/admin/scss/_tree.scss @@ -587,14 +587,8 @@ } a .jstree-pageicon { - display: block; - float: left; - width: 16px; - height: 16px; + float: left; margin-right: 4px; - background-color: transparent; - background-image: url(../images/sitetree_ss_pageclass_icons_default.png); - background-repeat: no-repeat; } li.class-HomePage > a .jstree-pageicon {