Jump to content

MediaWiki:Common.css

From Consumer_Action_Taskforce
Revision as of 01:22, 2 February 2025 by Karar (talk | contribs)

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 */
/************************************************/
/** Create page testing **/
.createPageInput {
  padding: 1rem;
  border: 2px solid var(--border-color-base, #a2a9b1); 
  background-color: var(--background-color-interactive-subtle, #f8f9fa);
  cursor: pointer;
  border-radius: 8px;
}

.pageInputActive {
  border: 2px solid var( --color-base--hover, #404244 );
  background-color: var( --background-color-interactive-subtle--active, #fff );
}

@media screen {
  html.skin-theme-clientpref-night .pageInputActive {
    border: 2px solid var( --color-base--hover, #404244 );
    background-color: #101418
  }
}

@media screen and (prefers-color-scheme: dark) {
  /* automatic mode */
  html.skin-theme-clientpref-os .pageInputActive {
    border: 2px solid var( --color-base--hover, #404244 );
    background-color: #101418
  }
}

@media (hover: hover) {
  .createPageInput:hover{
    border: 2px solid var( --color-base--hover, #404244 );
    background-color: var( --background-color-interactive-subtle--active, #fff );
  }

  html.skin-theme-clientpref-night .createPageInput:hover{
    border: 2px solid var( --color-base--hover, #404244 );
    background-color: #101418
  }
}

@media (hover: hover) and (prefers-color-scheme: dark) {
  html.skin-theme-clientpref-os .createPageInput:hover{
    border: 2px solid var( --color-base--hover, #404244 );
    background-color: #101418
  }
}
/** ---------------- **/

/** Category Page **/

.cat-but-container{
  display:flex; 
  flex-direction:column; 
  justify-content:center; 
  align-items:center; 
  padding-top:0.5rem;
}

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

.cat-but{
  display: inline-block; 
  box-sizing: border-box; 
  margin: 0 0 1rem 0; 
  padding:0.2rem;
  text-align: center;
  vertical-align: middle;
  line-height: 1.5em;
  font-size: 1em;
  background-color: var( --background-color-interactive-subtle, #558e71 );
  border: solid 2px var(--border-color-base, #a2a9b1);  
  border-radius: 0.25em; 
  font-family: inherit; 
  font-weight: bold;
}

.cat-but:active{
  border-color: var( --color-base--active, #404244 );
  background-color:var( --background-color-interactive-subtle--active, #fff );
  text-color: #ffb238;
}

@media screen {
  html.skin-theme-clientpref-night .cat-but:active{
    border: 2px solid var( --color-base--hover, #404244 );
    background-color: #101418
  }
}

@media screen and (prefers-color-scheme: dark) {
  /* automatic mode */
  html.skin-theme-clientpref-os .cat-but:active {
    border: 2px solid var( --color-base--hover, #404244 );
    background-color: #101418
  }
}

@media (hover: hover) {
  .cat-but:hover{
    border-color: var( --color-base--hover, #404244 )
    background-color: var( --background-color-interactive-subtle--active, #fff );
    }
  
  html.skin-theme-clientpref-night .cat-but:hover{
    border: 2px solid var( --color-base--hover, #404244 );
    background-color: #101418
  }
}
@media (hover: hover) and (prefers-color-scheme: dark) {
  html.skin-theme-clientpref-os .cat-but:hover{
    border: 2px solid var( --color-base--hover, #404244 );
    background-color: #101418
  }
}
/** ---------------- **/

/** Templates **/ 

/* Notices - Coloured boxes */

.cat-mw-box{
  border: 1px solid var(--border-color-base, #a2a9b1);
  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:#909590; 
}

.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%;
  }
}

/* Work in progress */
.create-page .grid {
  display: grid;
  grid-column-gap: 16px;
  grid-row-gap: 16px;
}

.create-page .grid .incident { grid-area: 1 / 1 / 3 / 3; }
.create-page .grid .company { grid-area: 1 / 3 / 2 / 4; }
.create-page .grid .product-line { grid-area: 2 / 3 / 3 / 4; }
.create-page .grid .theme { grid-area: 3 / 1 / 4 / 3; }
.create-page .grid .product { grid-area: 3 / 3 / 4 / 4; }

.create-page .hidden {
  display: none;
}


@media (max-width: 640px) {
  .create-page .grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .create-page .input-wrapper {
    position: sticky;
    background-color: var(--background-color-base, #fff)
    bottom: 0;
    display: flex;
    flex-direction: column;
    padding-top: 16px;
    border-top: 1px solid var(--border-color-muted, #dadde3);
  }
}