From 4f1a517490174f903b10c30b04b094d9773e1e60 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Thu, 6 Mar 2014 01:14:51 -0500 Subject: [PATCH] Remove units for zero values Units are ignored for zero values in CSS except for a few edge cases. --- .../stylesheets/common/admin/admin_base.scss | 10 +++++----- .../components/keyboard_shortcuts.css.scss | 4 ++-- app/assets/stylesheets/desktop/combobox.scss | 2 +- app/assets/stylesheets/desktop/compose.scss | 18 +++++++++--------- app/assets/stylesheets/desktop/discourse.scss | 4 ++-- app/assets/stylesheets/desktop/history.scss | 2 +- app/assets/stylesheets/desktop/modal.scss | 2 +- app/assets/stylesheets/desktop/onebox.scss | 4 ++-- app/assets/stylesheets/desktop/pagedown.scss | 8 ++++---- .../stylesheets/desktop/poster_expansion.scss | 4 ++-- app/assets/stylesheets/desktop/topic-post.scss | 6 +++--- app/assets/stylesheets/desktop/topic.scss | 8 ++++---- app/assets/stylesheets/desktop/user.scss | 8 ++++---- .../stylesheets/desktop/username_tagsinput.css | 4 ++-- app/assets/stylesheets/mobile/combobox.scss | 2 +- app/assets/stylesheets/mobile/compose.scss | 10 +++++----- app/assets/stylesheets/mobile/discourse.scss | 6 +++--- app/assets/stylesheets/mobile/history.scss | 2 +- app/assets/stylesheets/mobile/onebox.scss | 2 +- app/assets/stylesheets/mobile/pagedown.scss | 8 ++++---- app/assets/stylesheets/mobile/topic-list.scss | 2 +- app/assets/stylesheets/mobile/topic-post.scss | 4 ++-- app/assets/stylesheets/mobile/topic.scss | 8 ++++---- app/assets/stylesheets/mobile/user.scss | 6 +++--- .../stylesheets/mobile/username_tagsinput.css | 4 ++-- 25 files changed, 69 insertions(+), 69 deletions(-) diff --git a/app/assets/stylesheets/common/admin/admin_base.scss b/app/assets/stylesheets/common/admin/admin_base.scss index 4788a6db178..8b608e4d780 100644 --- a/app/assets/stylesheets/common/admin/admin_base.scss +++ b/app/assets/stylesheets/common/admin/admin_base.scss @@ -12,7 +12,7 @@ td {border-bottom: 1px solid $primary_border_color; border-top: 1px solid $primary_border_color;} tr:hover { background-color: darken($primary_background_color, 2.5%); } tr.selected { background-color: lighten($tertiary_background_color, 58%); } - .filters input { margin-bottom: 0px; } + .filters input { margin-bottom: 0; } } .content-list li a span.count { @@ -85,7 +85,7 @@ .admin-controls { background-color: darken($primary_background_color, 5%); - padding: 10px 10px 3px 0px; + padding: 10px 10px 3px 0; height: 35px; .nav.nav-pills { li.active { @@ -222,7 +222,7 @@ section.details { background-color: lighten($secondary_background_color, 50%); color: $tertiary_text_color; padding: 0 10px; - margin: 0px 0 5px 0; + margin: 0 0 5px 0; } } @@ -578,9 +578,9 @@ table.api-keys { } &.trust-levels { - margin-bottom: 0px; + margin-bottom: 0; table { - margin-bottom: 0px; + margin-bottom: 0; } td.value { width: 45px; diff --git a/app/assets/stylesheets/common/components/keyboard_shortcuts.css.scss b/app/assets/stylesheets/common/components/keyboard_shortcuts.css.scss index 6d26c8aa829..bc04e669460 100644 --- a/app/assets/stylesheets/common/components/keyboard_shortcuts.css.scss +++ b/app/assets/stylesheets/common/components/keyboard_shortcuts.css.scss @@ -23,14 +23,14 @@ padding-left: 0; li { - margin: 5px 0px + margin: 5px 0 } b { background-color: $nav-stacked-divider-color; color: $nav-stacked-color; display: inline-block; - margin: 0px 2px; + margin: 0 2px; padding: 2px 4px; } } diff --git a/app/assets/stylesheets/desktop/combobox.scss b/app/assets/stylesheets/desktop/combobox.scss index d176acc353e..d8913defb62 100644 --- a/app/assets/stylesheets/desktop/combobox.scss +++ b/app/assets/stylesheets/desktop/combobox.scss @@ -14,7 +14,7 @@ color: $tertiary_text_color; } .category-desc { - margin: 6px 0px 0px 3px; + margin: 6px 0 0 3px; font-size: 12px; } } \ No newline at end of file diff --git a/app/assets/stylesheets/desktop/compose.scss b/app/assets/stylesheets/desktop/compose.scss index 29cd982cf84..919e6ddd020 100644 --- a/app/assets/stylesheets/desktop/compose.scss +++ b/app/assets/stylesheets/desktop/compose.scss @@ -111,7 +111,7 @@ .toggle-preview, #draft-status, #file-uploading { position: absolute; bottom: -31px; - margin-top: 0px; + margin-top: 0; } .toggle-preview { right: 5px; @@ -132,9 +132,9 @@ @include transition(height 0.4s ease); width: 100%; z-index: 1039; - height: 0px; + height: 0; background-color: rgba($composer_background, 0.96); - bottom: 0px; + bottom: 0; font-size: 14px; position: fixed; .toggler { @@ -175,7 +175,7 @@ } } &.closed { - height: 0px !important; + height: 0 !important; } &.draft { height: 40px !important; @@ -248,8 +248,8 @@ color: $primary_text_color; } - input#reply-title { - width: 400px; + input#reply-title { + width: 400px; color: $primary_text_color; } @@ -355,10 +355,10 @@ display: inline; } .show-admin-options { - vertical-align: top; + vertical-align: top; margin-top: 8px; background: lighten($secondary_background_color, 60%); - &:hover { + &:hover { color: $tertiary_text_color; background: lighten($secondary_background_color, 35%); } @@ -462,7 +462,7 @@ div.ac-wrap { // this removes the topmost margin; // if we don't have this, all posts would have extra space at the top #wmd-preview > *:first-child { - margin-top: 0px !important; + margin-top: 0 !important; } #wmd-input, #wmd-preview { diff --git a/app/assets/stylesheets/desktop/discourse.scss b/app/assets/stylesheets/desktop/discourse.scss index 217d233c942..03b69ab5b13 100644 --- a/app/assets/stylesheets/desktop/discourse.scss +++ b/app/assets/stylesheets/desktop/discourse.scss @@ -108,7 +108,7 @@ body { margin-top: 10px; } ul.breadcrumb { - margin: 0 10px 0px 10px; + margin: 0 10px 0 10px; } .boxed { height: 100%; @@ -198,7 +198,7 @@ body { .grippie { width: 100%; border: 1px solid $primary_border_color; - border-width: 1px 0px; + border-width: 1px 0; cursor: row-resize; height: 11px; overflow: hidden; diff --git a/app/assets/stylesheets/desktop/history.scss b/app/assets/stylesheets/desktop/history.scss index 102b5231041..56c358b131b 100644 --- a/app/assets/stylesheets/desktop/history.scss +++ b/app/assets/stylesheets/desktop/history.scss @@ -37,7 +37,7 @@ font-size: 12px; width: 100%; border-collapse: collapse; - border-spacing: 0px; + border-spacing: 0; td { width: 50%; vertical-align: top; diff --git a/app/assets/stylesheets/desktop/modal.scss b/app/assets/stylesheets/desktop/modal.scss index c0e0397e2e8..44831bd4f6b 100644 --- a/app/assets/stylesheets/desktop/modal.scss +++ b/app/assets/stylesheets/desktop/modal.scss @@ -139,7 +139,7 @@ border: 1px solid $primary_border_color; .close { float: right; font-size: 20px; - margin: 10px 10px 0px; + margin: 10px 10px 0; text-decoration: none; color: $modal-close-button-color; cursor: pointer; diff --git a/app/assets/stylesheets/desktop/onebox.scss b/app/assets/stylesheets/desktop/onebox.scss index 07708553d86..fc12db0dd8d 100644 --- a/app/assets/stylesheets/desktop/onebox.scss +++ b/app/assets/stylesheets/desktop/onebox.scss @@ -40,7 +40,7 @@ a.loading-onebox { } } - + .onebox-result-body { padding-top: 5px; img { @@ -51,7 +51,7 @@ a.loading-onebox { margin-right: 10px; } h3, h4 { - margin: 0px !important; + margin: 0 !important; } code { max-height: 400px; diff --git a/app/assets/stylesheets/desktop/pagedown.scss b/app/assets/stylesheets/desktop/pagedown.scss index 8b516157e42..2fcc26e913b 100644 --- a/app/assets/stylesheets/desktop/pagedown.scss +++ b/app/assets/stylesheets/desktop/pagedown.scss @@ -20,7 +20,7 @@ margin-right: 5px; margin-bottom: 5px; margin-top: 5px; - padding: 0px; + padding: 0; height: 20px; } @@ -41,8 +41,8 @@ padding-right: 3px; margin-right: 5px; background-repeat: no-repeat; - background-position: 0px 0px; - border: 0px; + background-position: 0 0; + border: 0; width: 20px; height: 20px; position: relative; @@ -59,7 +59,7 @@ line-height: normal; vertical-align: baseline; background-image: none !important; - background-position: 0% 0%; + background-position: 0 0; background-repeat: repeat; background-color: white; padding: 4px; diff --git a/app/assets/stylesheets/desktop/poster_expansion.scss b/app/assets/stylesheets/desktop/poster_expansion.scss index 5cd0c059b65..7d0061e993e 100644 --- a/app/assets/stylesheets/desktop/poster_expansion.scss +++ b/app/assets/stylesheets/desktop/poster_expansion.scss @@ -38,13 +38,13 @@ h3 { font-size: 13px; font-weight: normal; - margin-top: 0px; + margin-top: 0; color: $secondary_text_color; } .groups { font-size: 13px; font-weight: normal; - margin-top: 0px; + margin-top: 0; color: $secondary_text_color; .group-link { diff --git a/app/assets/stylesheets/desktop/topic-post.scss b/app/assets/stylesheets/desktop/topic-post.scss index 301eb52007a..68e385f03bd 100644 --- a/app/assets/stylesheets/desktop/topic-post.scss +++ b/app/assets/stylesheets/desktop/topic-post.scss @@ -27,7 +27,7 @@ } .full-width { - margin-left: 0px; + margin-left: 0; } h1 .topic-statuses .topic-status i {margin-right: 5px;} @@ -123,7 +123,7 @@ nav.post-controls { button.show-replies { padding: 8px 15px; - margin-left: 0px; + margin-left: 0; } @@ -626,7 +626,7 @@ iframe { .topic-admin-menu { - h3 {margin-top: 0px;} + h3 {margin-top: 0;} } diff --git a/app/assets/stylesheets/desktop/topic.scss b/app/assets/stylesheets/desktop/topic.scss index 126b6de9589..5f27c80f8ea 100644 --- a/app/assets/stylesheets/desktop/topic.scss +++ b/app/assets/stylesheets/desktop/topic.scss @@ -83,7 +83,7 @@ position: fixed; right: 50%; width: 0; - bottom: 0px; + bottom: 0; z-index: 500; outline: 1px solid transparent; } @@ -166,9 +166,9 @@ a:hover.reply-new { } .bg { position: absolute; - top: 0px; - bottom: 0px; - width: 0px; + top: 0; + bottom: 0; + width: 0; border-right: 1px solid $primary_border_color; // background-color: #d4eaf4; // background-color: #C5E8F7; diff --git a/app/assets/stylesheets/desktop/user.scss b/app/assets/stylesheets/desktop/user.scss index 602dcec969a..d9ea16da9e3 100644 --- a/app/assets/stylesheets/desktop/user.scss +++ b/app/assets/stylesheets/desktop/user.scss @@ -231,18 +231,18 @@ float: left; width: 75%; color: $tertiary_text_color; - text-shadow: rgba(0, 0, 0, 0.5) 0px 1px 1px; + text-shadow: rgba(0, 0, 0, 0.5) 0 1px 1px; h1, h2 {font-weight: bold;} .bio { color: $tertiary_text_color; - text-shadow: rgba(0, 0, 0, 0.5) 0px 1px 1px; + text-shadow: rgba(0, 0, 0, 0.5) 0 1px 1px; a[href] { color: $tertiary_text_color; text-decoration: underline; - text-shadow: rgba(0, 0, 0, 0.5) 0px 1px 1px; + text-shadow: rgba(0, 0, 0, 0.5) 0 1px 1px; } } @@ -318,7 +318,7 @@ .user-stream { .excerpt { - margin: 5px 0px; + margin: 5px 0; font-size: 13px; word-wrap: break-word; color: $primary_text_color; diff --git a/app/assets/stylesheets/desktop/username_tagsinput.css b/app/assets/stylesheets/desktop/username_tagsinput.css index 3682dd52301..6b91110174f 100644 --- a/app/assets/stylesheets/desktop/username_tagsinput.css +++ b/app/assets/stylesheets/desktop/username_tagsinput.css @@ -1,7 +1,7 @@ div.tagsinput { border:1px solid #CCC; background: #FFF; - padding:5px 5px 0px; + padding:5px 5px 0; width:584px; height:100px; overflow-y: auto; @@ -27,5 +27,5 @@ div.tagsinput span.tag a { font-weight: bold; color: #82ad2b; text-decoration:no div.tagsinput input { width:80px; margin:0px; font-family: helvetica; font-size: 13px; border:1px solid transparent; padding:2px 5px; background: transparent; color: #000; outline:0px; margin-right:5px; margin-bottom:5px; } div.tagsinput div { display:block; float: left; } -.tags_clear { clear: both; width: 100%; height: 0px; } +.tags_clear { clear: both; width: 100%; height: 0; } .not_valid {background: #FBD8DB !important; color: #90111A !important;} diff --git a/app/assets/stylesheets/mobile/combobox.scss b/app/assets/stylesheets/mobile/combobox.scss index 6acb3d1dfb9..34a84e29eb1 100644 --- a/app/assets/stylesheets/mobile/combobox.scss +++ b/app/assets/stylesheets/mobile/combobox.scss @@ -11,7 +11,7 @@ color: white; } .category-desc { - margin: 6px 0px 0px 3px; + margin: 6px 0 0 3px; font-size: 12px; } } \ No newline at end of file diff --git a/app/assets/stylesheets/mobile/compose.scss b/app/assets/stylesheets/mobile/compose.scss index 3b4e1b228f4..402243c2442 100644 --- a/app/assets/stylesheets/mobile/compose.scss +++ b/app/assets/stylesheets/mobile/compose.scss @@ -56,7 +56,7 @@ display: none; .toggle-preview, #draft-status, #file-uploading { position: absolute; bottom: -31px; - margin-top: 0px; + margin-top: 0; } .toggle-preview { right: 5px; @@ -77,9 +77,9 @@ display: none; @include transition(height 0.4s ease); width: 100%; z-index: 1039; - height: 0px; + height: 0; background-color: rgba($composer_background, 0.96); - bottom: 0px; + bottom: 0; font-size: 14px; position: fixed; .toggler { @@ -122,7 +122,7 @@ display: none; } } &.closed { - height: 0px !important; + height: 0 !important; } &.draft { height: 60px !important; @@ -385,7 +385,7 @@ div.ac-wrap { // this removes the topmost margin; // if we don't have this, all posts would have extra space at the top #wmd-preview > *:first-child { - margin-top: 0px !important; + margin-top: 0 !important; } #wmd-input, #wmd-preview { diff --git a/app/assets/stylesheets/mobile/discourse.scss b/app/assets/stylesheets/mobile/discourse.scss index dcca1f3d150..86412bc1b26 100644 --- a/app/assets/stylesheets/mobile/discourse.scss +++ b/app/assets/stylesheets/mobile/discourse.scss @@ -75,7 +75,7 @@ body { margin-top: 10px; } ul.breadcrumb { - margin: 0 10px 0px 10px; + margin: 0 10px 0 10px; } .boxed { height: 100%; @@ -102,7 +102,7 @@ body { } &.starred { color: #fe1; - text-shadow: 0px 0px 3px rgba($primary_shadow_color, 0.5); + text-shadow: 0 0 3px rgba($primary_shadow_color, 0.5); @include hover { opacity: 1; &:before { @@ -170,7 +170,7 @@ body { .grippie { width: 100%; border: 1px solid $primary_border_color; - border-width: 1px 0px; + border-width: 1px 0; cursor: row-resize; height: 11px; overflow: hidden; diff --git a/app/assets/stylesheets/mobile/history.scss b/app/assets/stylesheets/mobile/history.scss index 23d53f5dc86..537c3aab3b7 100644 --- a/app/assets/stylesheets/mobile/history.scss +++ b/app/assets/stylesheets/mobile/history.scss @@ -40,7 +40,7 @@ font-size: 12px; width: 100%; border-collapse: collapse; - border-spacing: 0px; + border-spacing: 0; td { width: 50%; vertical-align: top; diff --git a/app/assets/stylesheets/mobile/onebox.scss b/app/assets/stylesheets/mobile/onebox.scss index 9c3922ff181..db20c05b7d9 100644 --- a/app/assets/stylesheets/mobile/onebox.scss +++ b/app/assets/stylesheets/mobile/onebox.scss @@ -45,7 +45,7 @@ a.loading-onebox { margin-right: 10px; } h3, h4 { - margin: 0px !important; + margin: 0 !important; } img.thumbnail { max-width: 25%; diff --git a/app/assets/stylesheets/mobile/pagedown.scss b/app/assets/stylesheets/mobile/pagedown.scss index 524defa862e..f11dedb6224 100644 --- a/app/assets/stylesheets/mobile/pagedown.scss +++ b/app/assets/stylesheets/mobile/pagedown.scss @@ -19,7 +19,7 @@ margin-right: 5px; margin-bottom: 5px; margin-top: 10px; - padding: 0px; + padding: 0; height: 20px; } @@ -40,8 +40,8 @@ padding-right: 3px; margin-right: 5px; background-repeat: no-repeat; - background-position: 0px 0px; - border: 0px; + background-position: 0 0; + border: 0; width: 20px; height: 20px; position: relative; @@ -58,7 +58,7 @@ line-height: normal; vertical-align: baseline; background-image: none !important; - background-position: 0% 0%; + background-position: 0 0; background-repeat: repeat; background-color: white; padding: 4px; diff --git a/app/assets/stylesheets/mobile/topic-list.scss b/app/assets/stylesheets/mobile/topic-list.scss index e9d485e0875..9562206b283 100644 --- a/app/assets/stylesheets/mobile/topic-list.scss +++ b/app/assets/stylesheets/mobile/topic-list.scss @@ -458,7 +458,7 @@ ol.category-breadcrumb { .badge-category { font-size: 13px; line-height: 26px; - padding: 0px 8px; + padding: 0 8px; float: none; } diff --git a/app/assets/stylesheets/mobile/topic-post.scss b/app/assets/stylesheets/mobile/topic-post.scss index 324ca68459f..44600461f4b 100644 --- a/app/assets/stylesheets/mobile/topic-post.scss +++ b/app/assets/stylesheets/mobile/topic-post.scss @@ -18,7 +18,7 @@ nav.post-controls { background-color: $primary_background_color; - padding: 0px; + padding: 0; border-right: 1px solid $primary_border_color; margin-top: 10px; button {color: lighten($primary_text_color, 35%); @@ -409,7 +409,7 @@ iframe { #show-topic-admin { color: lighten($primary_text_color, 35%); - right: 0px; + right: 0; border-right: 0; padding-right: 4px; padding-left: 5px; diff --git a/app/assets/stylesheets/mobile/topic.scss b/app/assets/stylesheets/mobile/topic.scss index 4d1aa545c4f..6b0f846114f 100644 --- a/app/assets/stylesheets/mobile/topic.scss +++ b/app/assets/stylesheets/mobile/topic.scss @@ -52,7 +52,7 @@ position: fixed; width: 0; right: 0; - bottom: 0px; + bottom: 0; z-index: 500; margin-right: 140px; outline: 1px solid transparent; @@ -119,9 +119,9 @@ } .bg { position: absolute; - top: 0px; - bottom: 0px; - width: 0px; + top: 0; + bottom: 0; + width: 0; border-right: 1px solid $primary_border_color; // background-color: #d4eaf4; // background-color: #C5E8F7; diff --git a/app/assets/stylesheets/mobile/user.scss b/app/assets/stylesheets/mobile/user.scss index d3da6e2eb12..43483fd8078 100644 --- a/app/assets/stylesheets/mobile/user.scss +++ b/app/assets/stylesheets/mobile/user.scss @@ -64,7 +64,7 @@ width: 100%; padding: 5px 8px; } - + #profile-background-preview { height: 150px; background-position: center center; @@ -175,7 +175,7 @@ .controls { background-color: lighten($secondary_background_color, 60%); - margin-top: 0px; + margin-top: 0; padding: 10px 10px 0 10px; .btn { @@ -224,7 +224,7 @@ .user-stream { .excerpt { - margin: 5px 0px; + margin: 5px 0; font-size: 13px; word-wrap: break-word; color: lighten($primary_text_color, 30%); diff --git a/app/assets/stylesheets/mobile/username_tagsinput.css b/app/assets/stylesheets/mobile/username_tagsinput.css index 3682dd52301..6b91110174f 100644 --- a/app/assets/stylesheets/mobile/username_tagsinput.css +++ b/app/assets/stylesheets/mobile/username_tagsinput.css @@ -1,7 +1,7 @@ div.tagsinput { border:1px solid #CCC; background: #FFF; - padding:5px 5px 0px; + padding:5px 5px 0; width:584px; height:100px; overflow-y: auto; @@ -27,5 +27,5 @@ div.tagsinput span.tag a { font-weight: bold; color: #82ad2b; text-decoration:no div.tagsinput input { width:80px; margin:0px; font-family: helvetica; font-size: 13px; border:1px solid transparent; padding:2px 5px; background: transparent; color: #000; outline:0px; margin-right:5px; margin-bottom:5px; } div.tagsinput div { display:block; float: left; } -.tags_clear { clear: both; width: 100%; height: 0px; } +.tags_clear { clear: both; width: 100%; height: 0; } .not_valid {background: #FBD8DB !important; color: #90111A !important;}