MediaWiki:Common.css

From GDPRhub
Revision as of 09:12, 21 June 2022 by Gb (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)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* CSS placed here will be applied to all skins */

/* Load the Lato font files (only defines the @font-face; the ‘Timeless’ skin applies it to the document) */
@import '/resources/assets/fonts/lato/stylesheet.css';

/* noyb colors */
.color-middle {
	background: #9c0a7d;
}

.color-left {
	background: #9c0a7d;
}

.color-right {
	background: #9c0a7d;
}

.mw-body h1.firstHeading {
    border-bottom: solid 4px #9c0a7d;
}

.tools-inline li.selected {
	border-bottom: solid 4px #9c0a7d;
}

a.new, .new a {
	color: #9c0a7d;
}

/* Text/Headline font sizes */
body {
	font-size: 0.875em;
}

.mw-body h1, .h1 {
	font-size: 1.8em;
}

.mw-body h2, .h2 {
	font-size: 1.6em;
}

.mw-body h3, .h3 {
	font-size: 1.4em;
	border-bottom: solid 1px #c8ccd1;
}

.mw-body h4, .h4 {
	font-size: 1.2em;
	font-weight: bold;
}

.mw-body h5, .h5 {
	font-style: italic;
}

/* Copy styles from normal h1, h2, …  for our ‘fake’ headings */
.h1, .h2, .h3, .h4, .h5, .h6 {
	font-weight: normal;
	font-family: 'Linux Libertine','Times New Roman','Liberation Serif','Nimbus Roman','Noto Serif','Times',serif;
	line-height: 1.125;
	margin: 1.25em 0 0.5em;
}
.h1::after,
.h2::after {
    content: '';
    display: block;
    border-bottom: solid 2px #c8ccd1;
    overflow: hidden;
}

/* No title on welcome page; see https://www.mediawiki.org/wiki/Manual:FAQ#How_do_I_hide_the_main_page_title? */
body.page-Welcome_to_GDPRhub.action-view h1.firstHeading,
body.page-Welcome_to_GDPRhub.action-submit h1.firstHeading {
	display: none;
}

p {
	text-align: justify;
	text-justify: auto;
}

/* Only/mainly used for machine translations. Show a scrollbar if too long. */
pre {
	max-height: 80vh;
	overflow-y: auto;
}


/* Table of contents */
html body .mw-body .toc {
	/* Don’t show ToC in a box */
	display: block;
	border: unset;
	background: unset;
	box-shadow: unset;
	padding: unset;
	margin: unset;
	min-width: unset;
}
html body .mw-body .toctitle h2 {
	/* Undo special styling for “Contents” h2 (apply same styles as for normal h2) */
	display: block;
	font-size: 1.6em;
	font-family: 'Linux Libertine','Times New Roman','Liberation Serif','Nimbus Roman','Noto Serif','Times',serif;
	line-height: 1.125;
	margin: 1.25em 0 0.5em;
}
html body .mw-body .toctitle {
	border-bottom: none; /* put border under h2 (not div) to not touch floating box */
}
html body .mw-body .toctitle h2::after {
	display: block;  /* put border under h2 (not div) to not touch floating box */
}
/*html body .mw-body .toc > ul {*/
	/* For links to headings, use font of headings */
	/*font-family: 'Linux Libertine','Times New Roman','Liberation Serif','Nimbus Roman','Noto Serif','Times',serif;*/
	/*line-height: 1.125;*/
	/*font-size: 1.1em;*/
/*}*/
html body .mw-body .toctogglespan {
	/* No hide/show button */
	display: none;
}


/* mobile/desktop specific media queries */

/* make content tables at beginning of articles prettier */
@media screen and (max-width: 850px) {
  .wikitable {
    width: 100% !important;
    float: left;
    /* display: none; */
  }
}

/* display element desktop/mobile only */
@media screen and (max-width: 850px) {
  .desktop-only {
    display: none;
  }
}

@media screen and (min-width: 850px) {
  .mobile-only {
    display: none;
  }
}

/* For making two column layout on front page */
.split-box {
	display: flex;
	flex-flow: row wrap;
	gap: 2em;
}
.split-box-left,
.split-box-right {
	width: 30em;
	max-width: 100%;
	flex-grow: 1;
}

/* “New on GDPRhub” list on main page
 Functionality defined by multiple pieces: 
 - the NewPages extension
 - MediaWiki:Common.js to load the content to preview
	- relies on OpenGraphMeta+Description2 extensions to provide those contents
 - MediaWiki:Common.css to style the items as cards
*/
ul#new-on-gdprhub {
	list-style: none;
	margin-left: 0;
	display: flex;
	flex-flow: row wrap;
	gap: 2em;
	justify-content: space-evenly;
}
#new-on-gdprhub li {
    width: 20em;
    max-width: 100%;
    flex-grow: 1;
	transition: opacity 0.5s;
}
#new-on-gdprhub li a {
	box-sizing: border-box;
	width: 100%;
	height: 10rem;
	padding: 1.2rem;
	border: 1px solid lightgrey;
	border-radius: 4px;
	box-shadow: 2px 2px 4px #33333333;
	overflow: hidden;
	color: inherit;
	position:relative;
	display: flex;
	flex-flow: row nowrap;
}
#new-on-gdprhub li .card-text {
	flex-grow: 1;
	font-size: 0.8em;
}
#new-on-gdprhub li .card-image {
	width: 100px;
	flex-shrink: 0;
	margin-left: 1em;
	display: flex;
	align-content: center;
}
#new-on-gdprhub li .card-image img {
	width: 100%;
	height: auto;
	max-height: 100%;
	max-width: 100%;
	align-self: center;
}
#new-on-gdprhub li:not(.preview-loaded) {
	opacity: 0.2;
}
#new-on-gdprhub li .card-title {
	margin-top: 0;
}
#new-on-gdprhub li .card-description {
}
#new-on-gdprhub li.preview-loaded a::after {
	content: '→ Read more';
	font-size: 0.8rem;
	display: block;
	position: absolute;
	bottom:0;
	left: 0;
	width: 100%;
	padding: 1.2rem 0 0.2rem 1.2rem;
	background: linear-gradient(#ffffff00, #ffffffee 50%);
}

/* Style the “most active contributors” table on the main page */
.contributionscores {
	border: none;
}
.contributionscores td:nth-child(1),
.contributionscores th:nth-child(1),
.contributionscores td:nth-child(2),
.contributionscores th:nth-child(2) {
	/* Hide rank & score columns */
	display: none;
}
.contributionscores tbody {
	display: block;
	max-height: 40em;
	overflow-y: auto;
	overflow-x: hidden; /* prevents horizontal scrollbar in Chromium */
	position: relative;
}
.contributionscores tr.header {
	/* Keep column headers visible */
	position: sticky; /* Not working in Chromium. whatever. */
	top: 0;
}
.contributionscores tr.header th {
	border: none;
}
.contributionscores-title {
	display: none;
}

/* We use sitenotice/localnotice to show the banner image (if any) */
#localNotice {
	border: none;
	background: none;
	box-shadow: none;
	text-align: center;
}
#localNotice p,
.random-banner-container p {
	margin: 0;
	text-align: center;
}
.random-banner-container img {
	width: auto !important;
	height: auto !important;
	max-width: 100% !important;
}
/* Hide unless only-child: No risk of flicker when there is only one option */
.random-banner-container:not(.ready) > *:not(:only-child) {
	opacity: 0;
}
/* Display only the first child to reserve space for one banner (assumes all options are the same size) */
.random-banner-container:not(.ready) > :not(:first-child) {
	display: none;
}

/* Colour the GDPRhub country reporter log in button */
button#mw-input-pluggableauthlogin {
	background-color: #9a0a7c;
	border-color: #9a0a7c;
}

/* Make “Forgot your password?” button less misleading */
a[title="Special:PasswordReset"]::after {
    content: ' (note: if you are a country reporter and lost your password: don’t click here but send us a message!)';
    font-size: smaller;
    color: black;
}

/* Remove cat background image from theme */
#mw-content-container {
	background-image: none;
}

/* Advanced Search */
iframe[src*="search-embed"] {
	/*max-height: calc(100vh - 50px);*/
}