MediaWiki:Common.css: Difference between revisions
From GDPRhub
m (Fix contribution scores scrolling in chromium (except sticky headers, won’t fix)) |
(Finish styling for putting random banner above pages) |
||
Line 206: | Line 206: | ||
background: none; | background: none; | ||
box-shadow: none; | box-shadow: none; | ||
text-align: center; | |||
} | } | ||
#localNotice p { | #localNotice p, | ||
.random-banner-container p { | |||
margin: 0; | margin: 0; | ||
text-align: center; | text-align: center; | ||
} | } | ||
.random-banner-container img { | |||
width: auto !important; | width: auto !important; | ||
height: auto !important; | height: auto !important; | ||
max-height: | max-height: 100px !important; | ||
} | } | ||
. | .random-banner-container { | ||
height: 100px; /* Fix height to avoid things move when the banner loads */ | |||
overflow: hidden; | |||
transition: opacity 0.2s; | transition: opacity 0.2s; | ||
} | } | ||
. | .random-banner-container:not(.ready) { | ||
opacity: 0; | opacity: 0; | ||
} | } | ||
. | .random-banner-container:not(.ready) > * { | ||
display: none; | display: none; | ||
} | } |
Revision as of 20:11, 29 June 2021
/* 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 {
font-size: 1.8em;
}
.mw-body h2 {
font-size: 1.6em;
}
.mw-body h3 {
font-size: 1.4em;
}
.mw-body h4 {
font-size: 1.2em;
}
p {
text-align: justify;
text-justify: auto;
}
/* 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
*/
#new-on-gdprhub ol {
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;
}
#new-on-gdprhub li a {
box-sizing: border-box;
width: 100%;
height: 11rem;
padding: 1.2rem;
border: 1px solid lightgrey;
border-radius: 4px;
box-shadow: 2px 2px 4px #33333333;
overflow: hidden;
color: inherit;
transition: opacity 0.5s;
position:relative;
display: flex;
flex-flow: row nowrap;
}
#new-on-gdprhub li .card-text {
flex-grow: 1;
}
#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 a:not(.preview-loaded) {
opacity: 0.2;
}
#new-on-gdprhub li a:not(.preview-loaded):not(.preview-loading) {
/* Make it look like <h4> */
font-size: 1.2em;
font-family: 'Linux Libertine','Times New Roman','Liberation Serif','Nimbus Roman','Noto Serif','Times',serif;
line-height: 1.125;
}
#new-on-gdprhub li .card-title {
margin-top: 0;
}
#new-on-gdprhub li .card-description {
font-size: 0.8em;
}
#new-on-gdprhub li .preview-loaded::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(transparent, #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-height: 100px !important;
}
.random-banner-container {
height: 100px; /* Fix height to avoid things move when the banner loads */
overflow: hidden;
transition: opacity 0.2s;
}
.random-banner-container:not(.ready) {
opacity: 0;
}
.random-banner-container:not(.ready) > * {
display: none;
}