[메모] 미디어 쿼리, flex

임택·2021년 3월 5일
0

메모

목록 보기
10/14
@import 'theme.css';
/* TODO */
@media only screen and (max-width: 992px) {
	.SearchResult .item {
		width: calc(100% / 3);
	}
}
@media only screen and (max-width: 768px) {
	.SearchResult .item {
		width: calc(100% / 2);
	}
	/* modal 넓이 100% */
	.ImageInfo .content-wrapper {
		width: 100%;
	}

	/* 글씨 줄이기 */
	.Banner .CatName {
		/* display: flex; */
		font-size: 0.8em;
	}
}
@media only screen and (max-width: 600px) {
	.SearchResult .item {
		width: calc(100% / 1);
	}
}

/* TODO dark mode 처리 */
@media (prefers-color-scheme: dark) {
	body {
		background-color: var(--background-color);
		color: var(--color);
	}
}
/* flex TEST code */
#flex-container {
	display: flex;
	flex-wrap: wrap;
	flex-direction: row;
}

#flex-container > div {
	min-height: 30px;
}

#flex-container > .flex-item {
	flex: 1;
	width: 100%;
	border: 2px solid red;
	white-space: nowrap;
	text-overflow: ellipsis;
}

#flex-container > .raw-item {
	flex: 5;
	/* flex-basis: 100%; */
	border: 2px solid green;
}
#flex-container > .raw-item2 {
	/* flex: 100%; */
	width: 5em;
	/* flex-basis: 100%; */
	border: 2px solid blue;
}

#flex-container > .raw-item3 {
	flex: 100%;
	/* flex-basis: 100%; */
	border: 3px solid yellow;
}
#flex-container > .raw-item4 {
	flex: 100%;
	width: 5em;
	/* flex-basis: 100%; */
	border: 10px solid white;
	box-sizing: border-box !important;
}
profile
캬-!

0개의 댓글