nicolafranchini/VenoBox

Prevent vertical scroll

sashabeep opened this issue · 4 comments

Is there any parameter to fit media content to the screen vertically without scrolling?

I need that too.

so do I

I used the following CSS:

.vbox-overlay {
	height: 100% !important;
}

.vbox-container {
	height: 100% !important;
	overflow: hidden !important;
}

.vbox-content {
	height: 100% !important;
}

.vbox-child {
	max-height: 100% !important;
	width: auto !important;
	background-color: transparent !important;
	max-width: 100% !important;
	height: 100%;
	box-shadow: none !important;
	display: flex;
}

	.vbox-child img {
		max-height: 100%;
		max-width: 100%;
		display: inline-block;
		object-fit: contain;
	}

Edit: there was an issue where portrait pictures would be cropped, fixed now. There might be some unused rules, but I'm no FE dev to judge

the new option fitView has been introduced, you can set fitView: true when initializing the script