We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
position: sticky
overflow: hidden
contain
none
strict
content
size
layout
style
paint
size layout paint
layout paint
containment
contnet-visibility: auto
content-visibility: hidden
display: none
visibility: hidden
contain-intrinsic-size
The text was updated successfully, but these errors were encountered:
KangyeolLee
No branches or pull requests
공유할 내용
배경
과정
난관
position: sticky
를 선언overflow: hidden
이 있다면 무시되는 성질이 있음overflow: hidden
이 적용되어 있었음position: sticky
적용을 위해overflow: hidden
이 적용된 박스 모델을 모두 제거 & 변경하는 작업을 진행overflow: hidden
속성이 여전히 필요한 처리가 남아있음position: sticky
와overflow: hidden
동시적용 불가해결책
contain
속성을 활용해보자css contain 이란?
none
|strict
|content
,size
|layout
|style
|paint
속성 사용 가능size
속성을 지정하면, 이는 엘리먼트의 크기를 계산할 때 자손의 크기는 고려하지 않아도 된다는 뜻.layout
속성이라면 엘리먼트 외부 어느 것도 내부 레이아웃에 영향을 주지 않고 그 반대 역시 성립함.strict
=size layout paint
와 동일 /content
=layout paint
와 동일paint
속성을 활용하면, 엘리먼트의 자식이 자신을 벗어나는 경우 또는 외부에 있는 경우에 대한 고려를 하지 않아도 됨을 의미 →overflow: hidden
속성으로 활용 가능content-visibility
containment
스펙에 의존. 해당 스펙을 css 속성으로 사용하도록 구현한 것이 csscontain
. 즉 내부적으로contain
의 동작을 내포하고 있음contnet-visibility: auto
가 부여되어 있다면 뷰포트에 들어오기 전까지 브라우저가 렌더링을 생략 → 성능 향상content-visibility: hidden
display: none
: 엘리먼트를 숨기면서 렌더링 상태 또한 함께 제거. 해당 요소가 다시 나타나기 위해서는 브라우저가 해당 엘리먼트를 다시 렌더링하기 위한 비용이 필요visibility: hidden
: 엘리멘트를 숨기면서 렌더링 상태는 유지. 그러나 문서에서 실제로 제거되지 않으며 여전히 페이지에 공간을 차지하고 있으며 접근이 가능content-visibility: hidden
: 엘리멘트를 숨기면서 렌더링 상태는 유지. 페이지에서 공간을 차지하지 않음contain-intrinsic-size
속성을 통해 지정 가능List Virtualization
결론
리스트 렌더링에 큰 성능 이슈가 발생한다면 그거슨!! 리스트 설계를 잘못한 거시다!!출처
The text was updated successfully, but these errors were encountered: