break-inside
-
https://developer.mozilla.org/en-US/docs/Web/CSS/break-inside
-
역활: page 나누기나 column 나누기에 element의 나뉘어서 표시되는지 여부를 설정한다.
-
auto: Allows, but does not force, any break (page, column, or region) to be be inserted within the principal box. 잘린다.
avoid: Avoids any break (page, column, or region) from being inserted within the principal box. 안 잘린다.
avoid-page: Avoids any page break within the principal box. 페이지 나누기에서 안잘린다.
avoid-column: Avoids any column break within the principal box. 컬럼에서 안잘린다.
avoid-region: Avoids any region break within the principal box.
-
부모 엘레멘트가 column-fill: auto; 일 경우
자식 엘레멘트를 break-inside:auto;로 설정하면 최대한 빡빡하게 단의 앞쪽 부터 내용이 채워진다.
자식 엘레멘트를 break-inside:avoid;로 설정하면 자식 엘레멘트의 나누어짐 없이 단의 앞쪽 부터 내용이 채워진다.
부모 엘레멘트가 column-fill: balance; 일 경우
자식 엘레멘트를 break-inside:auto;로 높이에 맞춰서 자식 엘레멘트가 단에 균등하게 내용이 맞춰서 채워짐
자식 엘레멘트를 break-inside:avoid;로 설정하면 자식 엘레멘트의 나누어짐 없이 최대한 단에 균등하게 내용이 맞춰서 채워짐
column-fill: auto; / break-inside:auto;
box-1
box-2
box-3
box-1
box-2
box-3
box-1
box-2
column-fill: auto; / break-inside:avoid;
box-1
box-2
box-3
box-1
box-2
box-3
box-1
box-2
column-fill: balance; / break-inside:auto;
box-1
box-2
box-3
box-1
box-2
box-3
box-1
box-2
column-fill: balance; / break-inside:avoid;
box-1
box-2
box-3
box-1
box-2
box-3
box-1
box-2