What got you here won't get you there

details marker 제거 본문

카테고리 없음

details marker 제거

optimy 2021. 7. 13. 01:30

크롬 89 버전 이후로 details-summary spec에 변경이 있어 -webkit-details-marker pseudo class로 marker를 없앨 수 없다.
대신 list-style-type: none; 또는 display: block; 을 적용한다.

'display: list-item' by default for <summary>

<details>
  <summary>test1</summary>
  <p>test</p>
</details>

<!-- 89~ chrome -->
<style>
  summary {
  	list-style-type: none; // or display: block;
  }
</style>

<!-- ^89 chrome, safari -->
<style>
  summary::-webkit-details-marker {
	display: none;
  }
</style>

 

Comments