When you expand or collapse the details
element, there is an outline.
Is there a way to remove this outline on expand/collapse, but not when we switch between elements using the Tab key?
summary { cursor: pointer; user-select: none; } /* The sledgehammer. It removes focus for both * select-with-Tab-key and expand events **/ /* summary:focus { outline: none; } */ /* An attempt of more intelligent approach. However, * it doesn't really work. **/ details[open] summary, summary:active { outline: none; }
<button>button</button> <details> <summary>summary</summary> details </details> <input value="input">
没有评论:
发表评论