Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove max-width for images #3060

Merged
merged 4 commits into from Apr 23, 2018
Merged

Remove max-width for images #3060

merged 4 commits into from Apr 23, 2018

Conversation

Kwpolska
Copy link
Member

IMO, this causes more harm than good. Is there anyone or anything who depends on this or otherwise wants this behavior? (This needed working around on themes.getnikola.com and chriswarrick.com recently)

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@ralsina
Copy link
Member

ralsina commented Apr 22, 2018

Well, if you have a SVG it often will be much more than 100% wide on the page.

@felixfontein
Copy link
Contributor

But why max-width: 90% then? I'd use max-width: 100% instead.

@ralsina
Copy link
Member

ralsina commented Apr 23, 2018

@felixfontein because it looked pretty.

@ralsina
Copy link
Member

ralsina commented Apr 23, 2018

Hope nobody was expecting a deep reason :-)

@felixfontein
Copy link
Contributor

@ralsina I was expecting something like that ;-)

@Kwpolska does max-width: 100% causes the same problems as 90% for your page and the themes page?

@Kwpolska
Copy link
Member Author

100% just-so-happens to work in the specific cases (as they have width: 100%). I could accept setting max-width to 100%.

@felixfontein
Copy link
Contributor

I think having some kind of max-width for images is always a good idea. I mean, it can be disabled for more specific situations (.specific-selector img { max-width: initial; } in CSS), and it will fix probably enough blog posts where a too big image is included (for example a non-properly scaled SVG, or a JPEG directly copied from the camera's SD card) without postprocessing. And it does improve the situation when looking at a blog with a low-width device (such as a phone), in which situation also images with moderate width can screw up the layout.

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@Kwpolska
Copy link
Member Author

Made it 100%, and removed some strange garbage from theme.css while at it.

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Copy link
Contributor

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Kwpolska Kwpolska merged commit cb122fe into master Apr 23, 2018
@Kwpolska Kwpolska deleted the no-img-max-width branch April 23, 2018 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants