diff --git a/modules/primer-base/lib/base.scss b/modules/primer-base/lib/base.scss index 88213a74aa..8c1bba0458 100644 --- a/modules/primer-base/lib/base.scss +++ b/modules/primer-base/lib/base.scss @@ -65,3 +65,12 @@ th { button { cursor: pointer; } + +details { + summary { cursor: pointer; } + + &:not([open]) { + // Set details content hidden by default for browsers that don't do this + > *:not(summary) { display: none; } + } +} diff --git a/modules/primer-buttons/lib/button.scss b/modules/primer-buttons/lib/button.scss index d31cd625e3..a0d32a596f 100644 --- a/modules/primer-buttons/lib/button.scss +++ b/modules/primer-buttons/lib/button.scss @@ -202,3 +202,12 @@ } } } + +.details-reset { + // Remove marker added by the display: list-item browser default + > summary { list-style: none; } + // Remove marker added by details polyfill + > summary::before { display: none; } + // Remove marker added by Chrome + > summary::-webkit-details-marker { display: none; } +}