Jump to content

MediaWiki:Common.css

From Consumer_Action_Taskforce
Revision as of 11:39, 31 January 2025 by Kostas (talk | contribs) (change image backround to subtle)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* CSS placed here will be applied to all skins */
/************************************************/

/** Category Page **/

.cat-but-container{
    display:flex; 
    flex-direction:column; 
    justify-content:center; 
    align-items:center; 
    background-color: #e1e1e1;
}

.cat-but-row{
    display:flex; 
    flex-direction:row; 
    flex-wrap:wrap
    justify-content:space-around; 
    gap:8px;
}

.cat-but{
    display: inline-block; 
    box-sizing: border-box; 
    margin: 0; 
    padding:0.2rem;
    text-align: center;
    vertical-align: middle;
    line-height: 1.5em;
    font-size: 1em;
    background-color:#f8f8f8; 
    border: solid 2px #aaa;  
    border-radius: 0.25em; 
    font-family: inherit; 
    font-weight: bold;
}


.cat-but:active{
    border-color: #4c4;
    background-color:#fff;
    text-color: #ffb238;
}
@media (hover: hover) {
    .cat-but:hover{
        border-color: #4c4;
        background-color:#fff; 
    }
}

/** Templates **/ 

/* Notices - Coloured boxes */

.cat-mw-box{
    border: 1px solid #aaa;
    border-radius: 0.3rem;
    margin-bottom:2rem
}

.cat-mw-box-header{
    font-size:1.5rem;
    line-height: 1.65rem;
    background:rgba(0,0,0,0.03);
    padding:0.2rem 1rem;
}

.cat-mw-box-body{
    padding:0.2rem 1rem;
}

/* Infobox */

.infobox {
    color: var(--color-base, #202122);
    background-color: var(--background-color-interactive-subtle, #f8f9fa);
    border: 1px solid #aaa;
    float: right;
    margin: 0 0 1em 1em;
    padding: 0.5em;
    width: 24em;
}

.infobox-title {
    font-size: 2em;
    text-align: center;
    border-bottom: 0.2em solid #ccc;
    padding-bottom: .25em;
}

/*bg color to get visible images in darkmode*/
.infobox-image{
    display: flex;
    aspect-ratio: 2 / 1;
    align-items: center;
    justify-content: center;
    background-color: var(--background-color-interactive-subtle, #f8f9fa); 
}

.infobox-table{
    width:100%;
    table-layout:fixed;
}

.infobox-table td{
    word-wrap:break-word;
    text-align: left;
}

.infobox-table th{
    text-align: left;
}

.infobox-table-caption{
    border-bottom: 0.1em solid #ccc;
    font-size:125%;
}

/* Loosely based on https://en.wikipedia.org/wiki/Template:Infobox */
@media (min-width: 640px) {
    .infobox {
        float: right;
        clear: right;
    }
}

@media (max-width: 640px) {
    .infobox {
        width: 95%;
    }
}