Template:Colored box/style.css: Difference between revisions
Content deleted Content added
fix color?? |
dark mode support |
||
Line 4: | Line 4: | ||
border-radius: 2px; |
border-radius: 2px; |
||
overflow: hidden; |
overflow: hidden; |
||
background: #fff; |
background: var( --background-color-base, #fff ); |
||
color: # |
color: var( --color-base, #202122 ); |
||
border: 1px solid #a2a9b1; |
border: 1px solid var( --border-color-base, #a2a9b1 ); |
||
box-shadow: 0 2px 2px rgba( 0, 0, 0, 0.2 ); |
box-shadow: 0 2px 2px rgba( 0, 0, 0, 0.2 ); |
||
} |
} |
||
.mw-tpl-colorbox-title { |
.mw-tpl-colorbox-title { |
||
background: #eaecf0; |
background: var( --background-color-interactive, #eaecf0 ); |
||
color: #000000; |
color: var( --color-emphasized, #000000 ); |
||
display: flex; |
display: flex; |
||
gap: 0.5rem; |
gap: 0.5rem; |
||
Line 19: | Line 19: | ||
} |
} |
||
.mw-tpl-colorbox-title--linked:hover { |
.mw-tpl-colorbox-title--linked:hover { |
||
background: #eaf3ff; |
background: var( --background-color-progressive-subtle, #eaf3ff ); |
||
} |
} |
||
.mw-tpl-colorbox-title > *:first-child { |
.mw-tpl-colorbox-title > *:first-child { |
Latest revision as of 11:55, 26 June 2024
.mw-tpl-colorbox {
box-sizing: border-box;
margin: 0.5em 0.5em 1em 0.5em;
border-radius: 2px;
overflow: hidden;
background: var( --background-color-base, #fff );
color: var( --color-base, #202122 );
border: 1px solid var( --border-color-base, #a2a9b1 );
box-shadow: 0 2px 2px rgba( 0, 0, 0, 0.2 );
}
.mw-tpl-colorbox-title {
background: var( --background-color-interactive, #eaecf0 );
color: var( --color-emphasized, #000000 );
display: flex;
gap: 0.5rem;
padding-top: 0.4rem;
padding-bottom: 0.4rem;
}
.mw-tpl-colorbox-title--linked:hover {
background: var( --background-color-progressive-subtle, #eaf3ff );
}
.mw-tpl-colorbox-title > *:first-child {
padding-left: 1rem;
}
.mw-tpl-colorbox-title > *:last-child {
padding-right: 1rem;
}
/* Let title-link take up whole heading area for easy target.
* Direct strong or link child is the title, as icon and view-link have their own element.
* we can't add class names to links in wikitext.
*/
.mw-tpl-colorbox-title > strong,
.mw-tpl-colorbox-title > a {
flex-grow: 1;
}
.mw-tpl-colorbox-title-icon {
opacity: 0.8;
}
.mw-tpl-colorbox-title-corner {
float: right;
font-size: 0.7em;
}
.mw-tpl-colorbox-content {
padding: 0.5rem 1rem;
}
.mw-tpl-colorbox-content::after {
content: "";
display: block;
clear: both;
}