본문 바로가기

Framework/Semantic UI

semantic ui sidebar errors 'Had to add pusher element. For optimal performance make sure body content is inside a pusher element'


 

semantic ui sidebar 추가시 콘솔에 아래와 같이 오류 메시지가 나옵니다.
딱히 기능상의 문제는 아니지만 html 의 구조적으로 문제가 있으니 수정하라는 메세지 라고 합니다.

"'Had to add pusher element. For optimal performance make sure body content is inside a pusher element'"

 

해결방법

참조 : 
github.com/Semantic-Org/Semantic-UI/issues/1474

semantic-ui.com/modules/sidebar.html#/usage

 

해결 방법은 위의 이미지 1,2번과 같이 "sidebar" 와 "pusher" 의 레벨과 구조를 맞추어주면 경고가 해제됩니다. 

Any fixed position content that should move with page content when your sidebar is visible, should receive the class name fixed and exist as a sibling element to your sidebar.

번역하면 

"사이드 바가 표시 될 때 페이지 콘텐츠와 함께 이동해야하는 고정 위치 콘텐츠는 고정 된 클래스 이름을 받아야하며 사이드 바의 형제 요소로 존재해야합니다."
라는 설명입니다.

 

반응형

'Framework > Semantic UI' 카테고리의 다른 글

semantic-ui 테마 변경, 폰트 변경 하기  (0) 2020.09.16