Skip to content

Commit

Permalink
Add interaction styles for details/summary (flutter#10359)
Browse files Browse the repository at this point in the history
These styles help make it more clear you're interacting with an
expandable details/summary tab, while also providing some spacing to the
contents of the expanded details.

Find an example near
https://flutter-docs-prod--pr10359-feat-new-details-style-i0iuss6t.web.app/testing/code-debugging#print-the-render-tree:~:text=tree%20and%20the-,sizes%20flow%20back%20up.,-Expand%20to%20view
  • Loading branch information
parlough authored and Tony Sansone committed Apr 5, 2024
1 parent 2ed0f37 commit a9e5a95
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/_sass/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,32 @@ blockquote {
}
}

details {
margin-bottom: 0.75rem;

> summary {
font-weight: 500;
user-select: none;

&:hover {
color: $site-color-primary;
}
}

&[open] {
margin-bottom: unset;

> summary {
margin-bottom: 0.75rem;
}
}

> :not(:first-child) {
margin-left: 0.75rem;
margin-right: 0.75rem;
}
}

summary {
margin-bottom: 1rem;
}
Expand Down

0 comments on commit a9e5a95

Please sign in to comment.