Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Reboot for details

Open Beginner friendly
#43,114 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
bootstrap, css, html, sass, scss
Domain
design, frontend

Research direction

Start with Bootstrap’s reboot-layer styles and locate where native details and summary elements are handled. Implement the proposed Sass styles in the appropriate reboot stylesheet and verify open, closed, hover, focus, and reduced-motion states in project examples or browser tests. Done means these elements receive consistent styling and animation without affecting summary.accordion-header.

Written by the indexing model from the issue text.

Description

css feature needs-decision v6
Prerequisites
Proposal

Add styles to the reboot layer for the native <details> and <summary> elements.

@layer reboot {
    details {
        --bs-details-transition-property: color, background-color, border-radius;
        --bs-details-transition-duration: 0.15s;
        --bs-details-transition-timing: ease-in-out;
        --bs-details-border-color: var(--bs-border-color);
        --bs-details-border-width: var(--bs-border-width);
        --bs-details-btn-color: var(--bs-fg-2);
        --bs-details-btn-bg: var(--bs-bg-body);
        --bs-details-btn-icon-width: 1rem;
        --bs-details-btn-icon-transform: rotate(-180deg);
        --bs-details-btn-icon-transition: transform 0.2s ease-in-out;
        --bs-details-active-color: var(--bs-fg-body);
        --bs-details-active-bg: transparent;
        --bs-details-margin-bottom: var(--bs-spacer-2);

        summary:not(.accordion-header) {
            display: flex;
            align-items: center;
            width: 100%;
            padding: 0;
            margin-bottom: var(--bs-details-margin-bottom);
            border-bottom: var(--bs-details-border-width) solid var(--bs-details-border-color);
            line-height: inherit;
            list-style: none;
            cursor: pointer;

            @media (prefers-reduced-motion: no-preference) {
                transition-timing-function: var(--bs-details-transition-timing);
                transition-duration: var(--bs-details-transition-duration);
                transition-property: var(--bs-details-transition-property);
            }

            &::-webkit-details-marker {
                display: none;
            }

            .accordion-icon {
                flex-shrink: 0;
                width: var(--bs-details-btn-icon-width);
                height: var(--bs-details-btn-icon-width);
                margin-inline-start: auto;
                color: currentcolor;

                @media (prefers-reduced-motion: no-preference) {
                    transition: var(--bs-details-btn-icon-transition);
                }
            }

            &:hover {
                z-index: 2;
            }

            &:focus-visible {
                position: relative;
                z-index: 3;
                outline: var(--bs-focus-ring);
                outline-offset: var(--bs-focus-ring-offset);
                outline-offset: -1px;
            }
        }

        &[open] {
            z-index: 2;
            border-color: var(--bs-theme-border, var(--bs-details-border-color));

            &::details-content {
                block-size: auto;
            }

            & > summary:not(.accordion-header) {
                color: var(--bs-theme-fg, var(--bs-details-active-color));
                background-color: var(--bs-theme-bg-subtle, var(--bs-details-active-bg));

                .accordion-icon {
                    transform: var(--bs-details-btn-icon-transform);
                }
            }
        }
    }
}
Motivation and context

This restyles the native <details> and <summary> elements to have better styling and open/closed animation that is more consistently styled across browsers. It also makes details visually fit better with the rest of Bootstrap's styling.

Dominant language
MDX
Stars
175k
Forks
78.5k
Avg merge
14h 39m
Merged PRs (30d)
88

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from twbs/bootstrap

All issues in twbs/bootstrap

Similar issues

More Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.