Blog, Website & Page Publishing

CWashburn
Member

Extra Carrot in Accordion On Website Page

SOLVE

Hello everyone. I'm building an accordion on my website home page and running into a strange extra carrot/chevron:

 

Screenshot 2024-10-17 at 9.50.49 AM.png

 

As you can see here the carrot on the left side of the dropdown is not expected, and I don't want it there. The weird thing is, this carrot only shows up on Safari, and not on Chrome or Brave. 

When I inspect the element in safari in the devtools I can see its part of something called Shadow Content (User Agent):

 

Screenshot 2024-10-17 at 9.55.23 AM.png

 

Does anyone know how I can fix this? I'm having a tough time figuring out how to remove it.

0 Upvotes
1 Accepted solution
CWashburn
Solution
Member

Extra Carrot in Accordion On Website Page

SOLVE

I was able to fix this issue by adding the following snippet to the Head tag:

 

 

<style>
  /* Remove default marker in Safari */
  details > summary::-webkit-details-marker {
    display: none;
  }

  /* Ensure no list-style for broader compatibility */
  details > summary {
    list-style: none;
  }
</style>

 

 

The extra carrot is part of the default disclosure widget (or "details marker") that Safari adds to <details> elements. This is part of the browser's default styling for these elements, and it's rendered in the Shadow DOM, which is why it's showing up as "Shadow Content (User Agent)" in the developer tools.

View solution in original post

0 Upvotes
1 Reply 1
CWashburn
Solution
Member

Extra Carrot in Accordion On Website Page

SOLVE

I was able to fix this issue by adding the following snippet to the Head tag:

 

 

<style>
  /* Remove default marker in Safari */
  details > summary::-webkit-details-marker {
    display: none;
  }

  /* Ensure no list-style for broader compatibility */
  details > summary {
    list-style: none;
  }
</style>

 

 

The extra carrot is part of the default disclosure widget (or "details marker") that Safari adds to <details> elements. This is part of the browser's default styling for these elements, and it's rendered in the Shadow DOM, which is why it's showing up as "Shadow Content (User Agent)" in the developer tools.

0 Upvotes