I want to customise HTML summary's marker, and animate it when the details element opens. The transition animation works on all browsers except Safari both on desktop and mobile.
details {
width: 50%;
margin: 0 auto;
background: #FDF4E3;;
margin-bottom: .5rem;
border-radius: 5px;
color: black;
outline: 0;
}
summary {
padding: 1rem;
display: block;
padding-left: 2.2rem;
position: relative;
cursor: pointer;
}
summary:before {
content: '';
border-width: .4rem;
border-style: solid;
border-color: transparent transparent transparent #fff;
position: absolute;
top: 1.3rem;
left: 1rem;
transform: rotate(0);
transform-origin: .2rem 50%;
transition: 1s transform ease;
}
details[open] summary {
background: #F9D478;
}
details[open]>summary:before {
transform: rotate(90deg);
}
details summary::-webkit-details-marker {
display: none;
}
details p {
padding: 1rem;
}
<details>
<summary>Summary</summary>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Itaque porro odit nulla quis voluptas quod similique sunt, nostrum, ea maxime repellendus quisquam harum tempore illum sed, dolore qui aperiam impedit!
</p>
</details>
I have used the following transition that did not work.
-webkit-transition: 1s transform ease;
-webkit-transition: 1s all ease;
details[open]>summary:before { transform: rotate(90deg); transition: 1s transform ease; }
How to fix issue?
These answers did not help.
css transitions not working in safari
CSS transform and transition not working in Safari
CSS transition is not working in Safari
Transitions not working on iOS safari - tried all the different suffix