mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:12:45 +08:00
UX: details tag background colour (#24710)
This commit is contained in:
parent
094d597ec8
commit
707acbe696
|
@ -1,5 +1,22 @@
|
|||
details {
|
||||
position: relative;
|
||||
background-color: var(--primary-very-low);
|
||||
padding: 0.25rem 0.75rem;
|
||||
margin-bottom: 0.5rem;
|
||||
|
||||
&:not([open]) {
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:focus-within {
|
||||
background-color: var(--d-hover);
|
||||
}
|
||||
}
|
||||
|
||||
aside.quote .title,
|
||||
blockquote,
|
||||
code {
|
||||
background-color: rgba(var(--primary-rgb), 0.05);
|
||||
}
|
||||
}
|
||||
|
||||
details > *,
|
||||
|
@ -12,6 +29,13 @@ summary {
|
|||
outline: none;
|
||||
}
|
||||
|
||||
summary {
|
||||
> p {
|
||||
margin-block: 0;
|
||||
padding-block: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
summary:first-of-type {
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
|
@ -43,6 +67,30 @@ summary::-webkit-details-marker {
|
|||
}
|
||||
|
||||
.elided {
|
||||
background-color: unset;
|
||||
padding: 0;
|
||||
|
||||
&:not([open]) {
|
||||
//specificity needed to overrule non-elided
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:focus-within {
|
||||
background-color: unset;
|
||||
}
|
||||
|
||||
summary:hover {
|
||||
background: var(--d-hover);
|
||||
}
|
||||
}
|
||||
|
||||
&[open] {
|
||||
background: var(--primary-very-low);
|
||||
padding: 0.5rem 0.75rem;
|
||||
summary {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
summary:before {
|
||||
content: "" !important;
|
||||
display: none;
|
||||
|
@ -56,17 +104,17 @@ summary::-webkit-details-marker {
|
|||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding: 0.5rem 0.75rem;
|
||||
color: var(--primary-medium);
|
||||
background: var(--primary-low);
|
||||
border: 1px solid var(--primary-low-mid);
|
||||
width: 1.5em;
|
||||
background: var(--primary-very-low);
|
||||
width: min-content;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
summary:hover {
|
||||
color: var(--primary);
|
||||
background: var(--primary-low-mid);
|
||||
border-color: currentColor;
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:focus-within {
|
||||
color: var(--primary);
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user