How to replace jQuery in my css stylesheet?

I want a responsive app, when I resize the page I want that a certain condition triggers but I just know doing this with jQuery, but I read jQuery doesn’t run properly with Dash due the DOM touch (or something ike that, found here Part 6. FAQs | Dash for Python Documentation | Plotly).
So the link shows me I need to use custom Dash components, but I tried and I had no success (because I don’t know nothing about javascript and Reac.js).

The main point is that the css property “vh” doesn’t work well after triggering the jQuery…

I did a proper html page to test and worked great, but not with dash.

Is there a path to fix this problem???

BTW, the code is:

.main_container {
	display : flex;
	flex-direction : row;	
	justify-content : center;
}

.div1, .div2 {
	margin : 5px;		
	background : tan;
	width : 100%;
	height : 100%;
}

@media (max-width: 900px) {
	.main_container {
		flex-direction : column;		
	}
	.div1, .div2 {	
		width : 100%;
		height : 50vh;
	}
}

I have considered using bootstrap?

I don’t like bootstrap, I’m still learning css and Dash so using bootstrap is like walking in darkness… But thank you!