Merge pull request #3671 from riking/css-cleanup

CLEANUP: Coalesce repeated CSS properties
This commit is contained in:
Robin Ward 2015-08-19 12:13:49 -04:00
commit 4062e4a464
24 changed files with 55 additions and 83 deletions

View file

@ -11,7 +11,6 @@
float: right; float: right;
font-size: 1.429em; font-size: 1.429em;
font-weight: bold; font-weight: bold;
line-height: 18px;
color: $primary; color: $primary;
opacity: 0.2; opacity: 0.2;
filter: alpha(opacity = 20); filter: alpha(opacity = 20);

View file

@ -51,9 +51,7 @@ body img.emoji {
} }
.emoji-modal .toolbar { .emoji-modal .toolbar {
margin: 0; margin: 8px 0 5px;
margin-top: 8px;
margin-bottom: 5px
} }
.emoji-modal .toolbar li { .emoji-modal .toolbar li {

View file

@ -337,9 +337,8 @@ button {
@if $IE7support { @if $IE7support {
filter: unquote("alpha(opacity=#{$controls-opacity*100})"); filter: unquote("alpha(opacity=#{$controls-opacity*100})");
} }
margin: 0;
top: 50%; top: 50%;
margin-top: -55px; margin: -55px 0 0;
padding: 0; padding: 0;
width: 90px; width: 90px;
height: 110px; height: 110px;

View file

@ -65,7 +65,6 @@
margin: 0 auto; margin: 0 auto;
background-color: $secondary; background-color: $secondary;
border: 1px solid dark-light-diff($primary, $secondary, 90%, -60%); border: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
border: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
box-shadow: 0 3px 7px rgba(0,0,0, .8); box-shadow: 0 3px 7px rgba(0,0,0, .8);
background-clip: padding-box; background-clip: padding-box;

View file

@ -82,8 +82,7 @@ a.loading-onebox {
@mixin onebox-favicon($class, $image) { @mixin onebox-favicon($class, $image) {
&.#{$class} .source { &.#{$class} .source {
background-image: image-url("favicons/#{$image}.png"); background: image-url("favicons/#{$image}.png") no-repeat;
background-repeat: no-repeat;
padding-left: 20px; padding-left: 20px;
} }
} }

View file

@ -13,10 +13,7 @@
} }
.wmd-button-row { .wmd-button-row {
margin-left: 5px; margin: 5px;
margin-right: 5px;
margin-bottom: 5px;
margin-top: 5px;
padding: 0; padding: 0;
height: 20px; height: 20px;
overflow: hidden; overflow: hidden;
@ -33,18 +30,9 @@
} }
.wmd-button { .wmd-button {
width: 20px;
height: 20px;
padding-left: 2px;
padding-right: 3px;
margin-right: 5px; margin-right: 5px;
background-repeat: no-repeat;
background-position: 0 0;
border: 0; border: 0;
width: 20px;
height: 20px;
position: relative; position: relative;
border: 0;
float: left; float: left;
font-family: FontAwesome; font-family: FontAwesome;
font-weight: normal; font-weight: normal;

View file

@ -1,5 +1,4 @@
.uploaded-image-preview { .uploaded-image-preview {
background-position: center center;
background-size: cover; background-size: cover;
background-color: $primary; background: $primary center center;
} }

View file

@ -4,10 +4,9 @@
color: $primary; color: $primary;
border: 1px solid dark-light-diff($primary, $secondary, 90%, -65%); border: 1px solid dark-light-diff($primary, $secondary, 90%, -65%);
line-height: 19px; line-height: 19px;
margin: 0;
display: inline-block; display: inline-block;
background-color: $secondary; background-color: $secondary;
margin-bottom: 3px; margin: 0 0 3px;
.fa { .fa {
padding-right: 3px; padding-right: 3px;
@ -52,8 +51,7 @@
img { img {
display: block; display: block;
margin: auto; margin: auto auto 4px;
margin-bottom: 4px;
width: 55px; width: 55px;
height: 55px; height: 55px;
} }

View file

@ -24,8 +24,17 @@ div.tagsinput span.tag {
} }
div.tagsinput span.tag a { font-weight: bold; color: #82ad2b; text-decoration:none; font-size: 11px; } div.tagsinput span.tag a { font-weight: bold; color: #82ad2b; text-decoration:none; font-size: 11px; }
div.tagsinput input { width:80px; margin:0px; font-family: helvetica; font-size: 0.929em; border:1px solid transparent; div.tagsinput input {
padding:2px 5px; background: transparent; color: #000; outline:0px; margin-right:5px; margin-bottom:5px; } width:80px;
font-family: helvetica;
font-size: 0.929em;
border:1px solid transparent;
padding:2px 5px;
background: transparent;
color: #000;
outline:0px;
margin: 0px 5px 5px 0px;
}
div.tagsinput div { display:block; float: left; } div.tagsinput div { display:block; float: left; }
.tags_clear { clear: both; width: 100%; height: 0; } .tags_clear { clear: both; width: 100%; height: 0; }
.not_valid {background: #FBD8DB !important; color: #90111A !important;} .not_valid {background: #FBD8DB !important; color: #90111A !important;}

View file

@ -75,10 +75,9 @@
{ {
left: 90%; left: 90%;
top: 33%; top: 33%;
border: solid transparent;
content: " "; content: " ";
position: absolute; position: absolute;
border-width: 8px; border: 8px solid transparent;
border-left-color: $secondary; border-left-color: $secondary;
} }

View file

@ -60,6 +60,7 @@
// Linear gradient // Linear gradient
//noinspection CssOptimizeSimilarProperties
@mixin linear-gradient($start-color, $end-color) { @mixin linear-gradient($start-color, $end-color) {
background-color: $start-color; background-color: $start-color;
background-image: linear-gradient(to bottom, $start-color, $end-color); background-image: linear-gradient(to bottom, $start-color, $end-color);

View file

@ -8,8 +8,6 @@
position: absolute; position: absolute;
width: 133px; width: 133px;
padding: 5px;
@include unselectable; @include unselectable;
button.full { button.full {

View file

@ -77,12 +77,12 @@ body {
.grippie { .grippie {
width: 100%; width: 100%;
border: 1px solid dark-light-diff($primary, $secondary, 90%, -60%); border: 1px solid;
border-width: 1px 0; border-right-width: 0;
border-left-width: 0;
cursor: row-resize; cursor: row-resize;
height: 11px; height: 11px;
overflow: hidden; overflow: hidden;
background-color: dark-light-diff($primary, $secondary, 90%, -60%);
display:block; display:block;
background: image-url("grippie.png") dark-light-diff($primary, $secondary, 90%, -60%) no-repeat center 3px; background: image-url("grippie.png") dark-light-diff($primary, $secondary, 90%, -60%) no-repeat center 3px;
} }

View file

@ -17,7 +17,6 @@
margin: -250px 0 0 -305px; margin: -250px 0 0 -305px;
background-color: $secondary; background-color: $secondary;
border: 1px solid dark-light-diff($primary, $secondary, 90%, -60%); border: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
border: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
box-shadow: 0 3px 7px rgba(0,0,0, .8); box-shadow: 0 3px 7px rgba(0,0,0, .8);
background-clip: padding-box; background-clip: padding-box;

View file

@ -182,8 +182,7 @@
} }
td.latest { td.latest {
vertical-align: top; vertical-align: top;
padding: 8px; padding: 0 8px 8px;
padding-top: 0;
} }
.last-user-info { .last-user-info {
font-size: 0.857em; font-size: 0.857em;

View file

@ -797,7 +797,6 @@ $topic-avatar-width: 45px;
#selected-posts { #selected-posts {
padding-left: 20px;
margin-left: 330px; margin-left: 330px;
width: 200px; width: 200px;
position: fixed; position: fixed;

View file

@ -88,8 +88,7 @@ blockquote {
// we must remove margins for text site titles // we must remove margins for text site titles
h2#site-text-logo h2#site-text-logo
{ {
margin: 0; margin: 0 0 0 10px;
margin-left: 10px;
} }
// categories should not be bold on mobile; they fight with the topic title too much // categories should not be bold on mobile; they fight with the topic title too much

View file

@ -17,7 +17,6 @@
width: 100%; width: 100%;
height: auto; height: auto;
background-color: $secondary; background-color: $secondary;
border: 1px solid scale-color($secondary, $lightness: 90%);
border: 1px solid rgba(0, 0, 0, 0.3); border: 1px solid rgba(0, 0, 0, 0.3);
@include border-radius-all (6px); @include border-radius-all (6px);

View file

@ -268,17 +268,14 @@ tr.category-topic-link {
float: left; float: left;
width: 280px; width: 280px;
padding: 4px 0; padding: 4px 0;
margin: 1px 0 0;
list-style: none; list-style: none;
background-color: $secondary; background-color: $secondary;
border: 1px solid dark-light-diff($primary, $secondary, 90%, -60%); border: 1px solid dark-light-choose(rgba(0, 0, 0, 0.2), scale-color($primary, $lightness: -60%));
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 5px; border-radius: 5px;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
background-clip: padding-box; background-clip: padding-box;
margin-bottom: 20px; margin: 1px 0 20px;
.title {font-weight: bold; display: block;} .title {font-weight: bold; display: block;}
} }
.dropdown-menu a { .dropdown-menu a {
display: block; display: block;

View file

@ -69,7 +69,6 @@
position: absolute; position: absolute;
bottom: 34px; bottom: 34px;
width: 133px; width: 133px;
padding: 5px;
button.full { button.full {
width: 100%; width: 100%;

View file

@ -221,9 +221,8 @@
} }
.about { .about {
background-color: dark-light-diff($primary, $secondary, 0%, -75%);
background-size: cover; background-size: cover;
background-position: center center; background: dark-light-diff($primary, $secondary, 0%, -75%) center center;
width: 100%; width: 100%;
margin-bottom: 10px; margin-bottom: 10px;
overflow: hidden; overflow: hidden;

View file

@ -14,6 +14,7 @@
@import "common/foundation/mixins"; @import "common/foundation/mixins";
//noinspection CssOverwrittenProperties
a:focus { a:focus {
outline: thin dotted #333; outline: thin dotted #333;
outline: 5px auto -webkit-focus-ring-color; outline: 5px auto -webkit-focus-ring-color;

View file

@ -86,9 +86,7 @@
text-indent: 20px; // hide text using text-indent trick, using width value (it's enough) text-indent: 20px; // hide text using text-indent trick, using width value (it's enough)
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
background-color: transparent; background: transparent no-repeat center center;
background-position: center center;
background-repeat: no-repeat;
background-size: 75% 75%; background-size: 75% 75%;
opacity: .5; opacity: .5;
*position: absolute; *position: absolute;

View file

@ -200,6 +200,7 @@ Version: @@ver@@ Timestamp: @@timestamp@@
white-space: nowrap; white-space: nowrap;
} }
//noinspection CssOverwrittenProperties
.select2-search input { .select2-search input {
width: 100%; width: 100%;
height: auto !important; height: auto !important;
@ -228,6 +229,7 @@ Version: @@ver@@ Timestamp: @@timestamp@@
margin-top: 4px; margin-top: 4px;
} }
//noinspection CssOverwrittenProperties
.select2-search input.select2-active { .select2-search input.select2-active {
background: #fff asset-url('select2-spinner.gif') no-repeat 100%; background: #fff asset-url('select2-spinner.gif') no-repeat 100%;
background: asset-url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee)); background: asset-url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
@ -389,16 +391,14 @@ disabled look for disabled choices in the results dropdown
/* disabled styles */ /* disabled styles */
.select2-container.select2-container-disabled .select2-choice { .select2-container.select2-container-disabled .select2-choice {
background-color: #f4f4f4; background: #f4f4f4 none;
background-image: none; border: 1px solid #ddd;
border: 1px solid #ddd; cursor: default;
cursor: default;
} }
.select2-container.select2-container-disabled .select2-choice .select2-arrow { .select2-container.select2-container-disabled .select2-choice .select2-arrow {
background-color: #f4f4f4; background: #f4f4f4 none;
background-image: none; border-left: 0;
border-left: 0;
} }
.select2-container.select2-container-disabled .select2-choice abbr { .select2-container.select2-container-disabled .select2-choice abbr {
@ -540,17 +540,15 @@ html[dir="rtl"] .select2-search-choice-close {
/* disabled styles */ /* disabled styles */
.select2-container-multi.select2-container-disabled .select2-choices { .select2-container-multi.select2-container-disabled .select2-choices {
background-color: #f4f4f4; background: #f4f4f4 none;
background-image: none; border: 1px solid #ddd;
border: 1px solid #ddd; cursor: default;
cursor: default;
} }
.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice { .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice {
padding: 3px 5px 3px 5px; padding: 3px 5px 3px 5px;
border: 1px solid #ddd; border: 1px solid #ddd;
background-image: none; background: #f4f4f4 none;
background-color: #f4f4f4;
} }
.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close { display: none; .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close { display: none;
@ -594,16 +592,15 @@ html[dir="rtl"] .select2-search-choice-close {
/* Retina-ize icons */ /* Retina-ize icons */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 2dppx) { @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 2dppx) {
.select2-search input, .select2-search input,
.select2-search-choice-close, .select2-search-choice-close,
.select2-container .select2-choice abbr, .select2-container .select2-choice abbr,
.select2-container .select2-choice .select2-arrow b { .select2-container .select2-choice .select2-arrow b {
background-image: asset-url('select2x2.png') !important; background: asset-url('select2x2.png') no-repeat !important;
background-repeat: no-repeat !important; background-size: 60px 40px !important;
background-size: 60px 40px !important; }
}
.select2-search input { .select2-search input {
background-position: 100% -21px !important; background-position: 100% -21px !important;
} }
} }