Support

Home Forums Event Espresso Premium Bad CSS in espresso_default.css ruining other responsive css code

Bad CSS in espresso_default.css ruining other responsive css code

Posted: August 2, 2016 at 4:03 pm

Viewing 1 reply thread


Melissa Jones

August 2, 2016 at 4:03 pm

After 4.9.6 update, I noticed my medium grid responsive layouts were all “corrupted”. No matter the view port the body was compressed to 495px wide until I was down to 320px or above 1000px.

After investigating our site’s css, switching to the non-child theme (to eliminate a mistake in our child css), we narrowed it down to some code in the espresso_default.css file.

Lines 1122 to 1136

/* Smartphones (portrait and landscape) ----------- */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
	body {
		padding: 0;
		margin: 0;
		width: 320px;
	}
}

/* iPads (portrait and landscape) ----------- */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
	body {
		width: 495px;
	}
}

This is affecting the body tag overall throwing off other responsive css coding. So we mitigated it by adding css to our child theme css (which we force to load last).

/* Smartphones (portrait and landscape) ----------- */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
	body {
		padding: inherit !important;
		margin: inherit !important;
		width: inherit !important;
	}
}

/* iPads (portrait and landscape) ----------- */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
	body {
		width: inherit !important;
	}
}

It seems to have fixed the medium grid issue… but we’re still testing.

Wondering when this bit of code was added? It seem very non-specific which is why it’s affecting everything.


Josh

  • Support Staff

August 2, 2016 at 8:51 pm

Yeah that should have never made it into a release, and I’m not sure why it was added in the first place. It will be removed in the next version. I’m sorry for the trouble.

Viewing 1 reply thread

The support post ‘Bad CSS in espresso_default.css ruining other responsive css code’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso