clean up images max-width mess in the CSS
This commit is contained in:
parent
86b14da69f
commit
02ea23a4ad
|
@ -121,7 +121,13 @@ Discourse.ComposerView = Discourse.View.extend(Ember.Evented, {
|
||||||
},
|
},
|
||||||
|
|
||||||
ensureMaximumDimensionForImagesInPreview: function() {
|
ensureMaximumDimensionForImagesInPreview: function() {
|
||||||
$('<style>#wmd-preview img, .cooked img {' +
|
// This enforce maximum dimensions of images in the preview according
|
||||||
|
// to the current site settings.
|
||||||
|
// For interactivity, we immediately insert the locally cooked version
|
||||||
|
// of the post into the stream when the user hits reply. We therefore also
|
||||||
|
// need to enforce these rules on the .cooked version.
|
||||||
|
// Meanwhile, the server is busy post-processing the post and generating thumbnails.
|
||||||
|
$('<style>#wmd-preview img:not(.thumbnail), .cooked img:not(.thumbnail) {' +
|
||||||
'max-width:' + Discourse.SiteSettings.max_image_width + 'px;' +
|
'max-width:' + Discourse.SiteSettings.max_image_width + 'px;' +
|
||||||
'max-height:' + Discourse.SiteSettings.max_image_height + 'px;' +
|
'max-height:' + Discourse.SiteSettings.max_image_height + 'px;' +
|
||||||
'}</style>'
|
'}</style>'
|
||||||
|
|
|
@ -496,9 +496,6 @@ div.ac-wrap {
|
||||||
.preview-wrapper {
|
.preview-wrapper {
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
float: right;
|
float: right;
|
||||||
img, svg {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#wmd-button-bar {
|
#wmd-button-bar {
|
||||||
|
|
|
@ -43,18 +43,15 @@ a.loading-onebox {
|
||||||
.onebox-result-body {
|
.onebox-result-body {
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
img {
|
img {
|
||||||
max-width: 100px;
|
|
||||||
max-height: 80%;
|
max-height: 80%;
|
||||||
|
max-width: 25%;
|
||||||
|
height: auto;
|
||||||
float: left;
|
float: left;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
h3, h4 {
|
h3, h4 {
|
||||||
margin: 0px !important;
|
margin: 0px !important;
|
||||||
}
|
}
|
||||||
img.thumbnail {
|
|
||||||
max-width: 25%;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
code {
|
code {
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,7 +182,6 @@
|
||||||
width: 140px;
|
width: 140px;
|
||||||
}
|
}
|
||||||
.posters {
|
.posters {
|
||||||
max-width: 220px;
|
|
||||||
min-width: 150px;
|
min-width: 150px;
|
||||||
> a {
|
> a {
|
||||||
float: left;
|
float: left;
|
||||||
|
|
|
@ -402,12 +402,6 @@ span.post-count {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
article.boxed {
|
|
||||||
img, svg {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.quote-button {
|
.quote-button {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -693,11 +687,13 @@ blockquote { /* solo quotes */
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 720px;
|
width: 720px;
|
||||||
padding: 10px 10px 15px 20px;
|
padding: 10px 10px 15px 20px;
|
||||||
|
|
||||||
.highlighted {
|
.highlighted {
|
||||||
background-color: lighten(yellow, 45%) !important;
|
background-color: lighten(yellow, 45%) !important;
|
||||||
}
|
}
|
||||||
|
img, svg {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -736,7 +732,6 @@ blockquote { /* solo quotes */
|
||||||
}
|
}
|
||||||
&.bottom .arrow {float: right; margin: 0 0 0 0;}
|
&.bottom .arrow {float: right; margin: 0 0 0 0;}
|
||||||
&.top {margin-left: 112px;}
|
&.top {margin-left: 112px;}
|
||||||
.topic-body img {max-width: 100%; height: auto;}
|
|
||||||
.topic-body, .topic-meta-data {border: none;}
|
.topic-body, .topic-meta-data {border: none;}
|
||||||
.row {border-top: 1px solid #ddd; padding-top: 7px;}
|
.row {border-top: 1px solid #ddd; padding-top: 7px;}
|
||||||
.reply:first-of-type .row {border-top: none;}
|
.reply:first-of-type .row {border-top: none;}
|
||||||
|
|
Loading…
Reference in New Issue