mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
Only apply full bleed images on narrow viewports. And default to non-large image, making large images pop into their full bleed.
This commit is contained in:
parent
b74fc79266
commit
24e15d8d34
2 changed files with 11 additions and 20 deletions
|
@ -3086,36 +3086,26 @@ body {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
.NB-feed-story .NB-feed-story-content img {
|
.NB-feed-story .NB-feed-story-content img {
|
||||||
max-width: max-content !important;
|
max-width: 100% !important;
|
||||||
margin-left: -28px;
|
width: auto !important;
|
||||||
width: calc(100% - 56px * -1) !important;
|
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|
||||||
/* See http://www.newsblur.com/site/1031643/le-21me for width: auto, height: auto */
|
/* See http://www.newsblur.com/site/1031643/le-21me for width: auto, height: auto */
|
||||||
}
|
}
|
||||||
.NB-feed-story .NB-feed-story-content img.NB-medium-image {
|
.NB-feed-story .NB-feed-story-content img.NB-medium-image {
|
||||||
max-width: max-content !important;
|
|
||||||
margin: 0;
|
|
||||||
width: auto !important;
|
|
||||||
}
|
}
|
||||||
.NB-feed-story .NB-feed-story-content img.NB-small-image {
|
.NB-feed-story .NB-feed-story-content img.NB-small-image {
|
||||||
max-width: max-content !important;
|
|
||||||
margin: 0;
|
|
||||||
width: auto !important;
|
|
||||||
}
|
}
|
||||||
.NB-feed-story .NB-feed-story-content img.NB-large-image {
|
.NB-feed-story .NB-feed-story-content img.NB-large-image {
|
||||||
}
|
|
||||||
.NB-feed-story .NB-feed-story-content img.NB-table-image.NB-large-image,
|
|
||||||
.NB-feed-story .NB-feed-story-content img.NB-table-image.NB-medium-image {
|
|
||||||
max-width: max-content !important;
|
max-width: max-content !important;
|
||||||
|
margin-left: -28px !important;
|
||||||
|
width: calc(100% - 56px * -1) !important;
|
||||||
|
}
|
||||||
|
.NB-feed-story .NB-feed-story-content img.NB-table-image.NB-large-image {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
.NB-feed-story .NB-feed-story-content img.NB-table-image.NB-small-image {
|
|
||||||
max-width: max-content !important;
|
|
||||||
margin: 0;
|
|
||||||
width: auto !important;
|
|
||||||
}
|
|
||||||
.NB-feed-story .NB-feed-story-content figure {
|
.NB-feed-story .NB-feed-story-content figure {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,12 +153,13 @@ NEWSBLUR.Views.StoryDetailView = Backbone.View.extend({
|
||||||
largest = this.width;
|
largest = this.width;
|
||||||
$largest = $(this);
|
$largest = $(this);
|
||||||
}
|
}
|
||||||
|
$(this).removeClass('NB-large-image').removeClass('NB-medium-image').removeClass('NB-small-image');
|
||||||
// Can't even calculate widths because with tables, nothing fits
|
if (pane_width >= 900) return;
|
||||||
|
|
||||||
if (has_tables) {
|
if (has_tables) {
|
||||||
|
// Can't even calculate widths because with tables, nothing fits
|
||||||
$(this).addClass('NB-table-image');
|
$(this).addClass('NB-table-image');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.naturalWidth >= pane_width && this.naturalHeight >= 50) {
|
if (this.naturalWidth >= pane_width && this.naturalHeight >= 50) {
|
||||||
$(this).addClass('NB-large-image');
|
$(this).addClass('NB-large-image');
|
||||||
} else if (this.naturalWidth >= 100 && this.naturalHeight >= 50) {
|
} else if (this.naturalWidth >= 100 && this.naturalHeight >= 50) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue