diff --git a/scss/notice-manager.scss b/scss/notice-manager.scss index 4fab8f7..aed26d2 100644 --- a/scss/notice-manager.scss +++ b/scss/notice-manager.scss @@ -1,59 +1,51 @@ -:not(.wrap) ~ div.updated, -:not(.wrap) ~ div.error, -:not(.wrap) ~ div.notice, -:not(.wrap) ~ div.update-nag{ - margin: 5px 20px 15px 2px; +div.updated, +div.error, +div.update-nag { + @extend div.notice; } +div.notice { + :not(.wrap) ~ & { + margin: 5px 20px 15px 2px; + } + // This should only be used if auto-collect/above-title is enabled + // classes .notices-auto-collect, .notices-above-title added to body tag by plugin + .notices-auto-collect #wpbody-content > &, + .notices-auto-collect .wrap > &, + .notices-above-title .wrap > & { + display: none; + } +} #meta-link-notices-wrap { margin: 0; - /* padding: 8px 20px 12px; */ + // padding: 8px 20px 12px; position: relative; + + > button.notice-dismiss { + position: relative; + display: flex; + width: 100%; + } } -#meta-link-notices-wrap > button.notice-dismiss { - position: relative; - display: flex; - width: 100%; -} - -.notice_container{ +.notice_container { padding: 9px 0px 1px 0px; background-color: gainsboro; -} -.notice_container.empty{ - padding: 0; -} + &.empty { + padding: 0; + } -.notice_container > div.updated, -.notice_container > div.error, -.notice_container > div.notice, -.notice_container > div.update-nag{ - margin: 5px 12px 15px 12px !important; /* Override plugins custom css */ -} - -/* This should only be used if auto-collect/above-title is enabled */ -.notices-auto-collect #wpbody-content > div.updated, -.notices-auto-collect #wpbody-content > div.error, -.notices-auto-collect #wpbody-content > div.notice, -.notices-auto-collect #wpbody-content > div.update-nag, -.notices-auto-collect .wrap > div.updated, -.notices-auto-collect .wrap > div.error, -.notices-auto-collect .wrap > div.notice, -.notices-auto-collect .wrap > div.update-nag, -.notices-above-title .wrap > div.updated, -.notices-above-title .wrap > div.error, -.notices-above-title .wrap > div.notice, -.notices-above-title .wrap > div.update-nag{ - display: none; + > div.notice { + margin: 5px 12px 15px 12px !important; // Override plugins custom css + } } #meta-link-notices .plugin-count { display: inline-block; - /* vertical-align: top; */ + // vertical-align: top; box-sizing: border-box; margin: 1px 0 -1px 2px; padding: 0 5px; @@ -66,12 +58,13 @@ line-height: 1.6; text-align: center; z-index: 26; + + &.warning { + background-color: #dba617; + } + + &.error { + background-color: #d63638; + } } -#meta-link-notices .plugin-count.warning { - background-color: #dba617; -} - -#meta-link-notices .plugin-count.error { - background-color: #d63638; -} \ No newline at end of file