wtf-webseite/assets/css/style.css
Stephan 0a94a0fba4 Rudimentäre Lektor-Version des WTF-Layouts.
Nur eine Section, nur eine Menüebene.
2020-12-22 14:47:58 +01:00

392 lines
6.9 KiB
CSS

/*
* Namensschema der CSS-Klassen nach BEM (Block Element Modifier,
* http://getbem.com/naming/). Mit der Erweiterung, dass Modifier einzeln
* mit Bindestrich angegeben werden. Also:
*
* <li class="navlist__navitem -active">
* statt
* <li class="navlist__navitem navlist__navitem--active">
*
* Das ist weniger redundant und übersichtlicher. Der passende CSS-Selektor
* dazu ist:
*
* .navlist__navitem.-active
*/
:root {
/* WTF Farben gemäß https://git.vebit.xyz/vebit/swag/src/branch/master/README.markdown */
--wtf-orange: #f60;
--wtf-light-blue: #2a7fff;
--wtf-dark-blue: #003380;
/* TODO: Grautöne üerarbeiten */;
--wtf-dark-grey: #202020;
--wtf-grey: #666;
--wtf-mid-grey: #acacac; /* Nicht im swag-Repo */
--wtf-light-grey: #f2f2f2;
--column-count: 4;
}
body {
font-family: 'Lato', sans-serif;
font-weight: normal;
line-height: 1.4rem;
color: #333;
}
/* nav - Start */
nav {
width: 100%;
background-color: var(--wtf-dark-grey);
display: flex;
flex-direction: row;
justify-content: flex-end;
}
.nav__toggle {
display: none;
height: 3.375rem;
margin-left: 1rem;
}
.nav__toggle rect {
fill: var(--wtf-light-grey);
}
.nav__toggle svg {
margin: 0.25rem 0 0 0;
width: 2rem;
height: 2rem;
padding: 0;
position: relative;
left: 0;
}
.nav__toggle p {
margin: 0;
padding: 0;
position: relative;
left: -0.2rem;
bottom: 0.65rem;
color: var(--wtf-light-grey);
}
.nav__navlist {
background-color: var(--wtf-dark-grey);
margin: 0;
display: flex;
flex-direction: row;
justify-content: flex-end;
}
.nav__navitem {
margin: 0 1.5rem;
padding: 1rem 1rem 1rem 1.5rem;
display: flex;
flex-direction: column;
justify-content: flex-start;
font-size: 1.25rem;
}
.nav__navitem.-active {
background-color: var(--wtf-grey);
}
.nav__navlink {
color: var(--wtf-light-grey);
}
.nav__navlink:hover {
color: var(--wtf-mid-grey);
}
.nav__sub_navlist {
display: none;
}
.nav__navlist > li:hover > .nav__sub_navlist {
display: block;
margin: 2.4rem 0 0 -0.5rem;
padding: 0;
position: absolute;
background-color: var(--wtf-dark-grey);
}
/*
* Gleicht zusammen mit padding von .nav__navitem die Verschiebung durch Sub-
* menümarker aus.
*/
.nav__navitem .nav__navlink {
display: inline-block;
padding-right: 0.5rem;
}
/* Greift wenn Submenü vorhanden ist */
.nav__navlist li a:first-child:nth-last-child(2) {
padding-right: 0;
}
/* Malt bei vorhandenem Submenü den Pfeil */
.nav__navlist li a:first-child:nth-last-child(2):after {
content: "";
position: relative;
top: -0.125rem;
left: 0.5rem;
height: 5px;
width: 5px;
display: inline-block;
transform: rotate(0.125turn);
border-bottom: 3px solid var(--wtf-orange);
border-right: 3px solid var(--wtf-orange);
}
.nav__sub_navitem {
margin: 0;
padding: 0.5rem 0.5rem;
list-style: none;
text-align: left;
background-color: var(--wtf-dark-grey);
border-top: 1px solid var(--wtf-mid-grey);
}
/* nav - Ende */
/* header - Start */
header {
background-color: var(--wtf-orange);
padding: 2.5% 5% 3% 5%;
display: flex;
flex-direction: row;
justify-content: center;
}
.header__wrapper {
display: flex;
flex-direction: row;
justify-content: center;
}
.header__headding {
width: 80%;
}
/* header - Ende */
/* main - Start */
h2 {
font-family: 'Lato Black';
font-size: 2rem;
line-height: 1.3em;
margin-top: 0.5em;
}
h3 {
font-family: 'Lato Black';
font-size: 1.75rem;
line-height: 1.3em;
margin-top: 0.5em;
}
h4 {
font-family: 'Lato Black';
font-size: 1.5rem;
line-height: 1.3em;
margin-top: 0.5em;
}
h5 {
font-family: 'Lato Black';
font-size: 1.25rem;
line-height: 1.2em;
margin-top: 0.5em;
}
h6 {
font-family: 'Lato Black';
font-size: 1rem;
line-height: 1.2em;
margin-top: 0.5em;
}
p {
margin-bottom: 0.5rem;
}
.content__wrapper p, .content__wrapper li {
hyphens: auto;
}
.content__wrapper a {
color: var(--wtf-orange);
}
.content__wrapper a:hover {
color: var(--wtf-light-blue);
}
.content__wrapper a:visited {
color: var(--wtf-dark-blue);
}
ul {
list-style: disc;
}
ul, ol {
margin-left: 0.5rem;
}
ul ul, ol ol {
margin-left: 2rem;
}
ul li {
list-style: disc;
}
ol li, ol {
list-style: auto;
}
li {
margin-left: 1rem;
}
.content {
padding: 3% 5%;
display: flex;
flex-direction: row;
justify-content: center;
}
.nav__wrapper, .header__wrapper, .content__wrapper, .footer__wrapper {
width: 100%;
max-width: 2250px;
orphans: 3;
widows: 2;
}
.content__wrapper.-columns {
-webkit-column-count: var(--column-count);
-moz-column-count: var(--column-count);
column-count: var(--column-count);
}
.content.-odd {
background-color: var(--wtf-light-grey);
color: var(--wtf-dark-grey);
}
.content.-even {
background-color: var(--wtf-dark-grey);
color: var(--wtf-light-grey);
}
/* main - Ende */
/* footer - Start */
footer {
background-color: var(--wtf-orange);
padding: 3% 5%;
display: flex;
flex-direction: row;
justify-content: center;
}
.footer__wrapper {
display: flex;
flex-direction: row;
justify-content: center;
}
.footer__navitem {
display: inline-block;
margin: 0.2 1rem;
padding: 0 1rem;
}
.footer__navlink {
color: var(--wtf-dark-grey);
}
.footer__navlink:hover {
color: var(--wtf-light-grey);
}
/* footer - Ende */
@media screen and (max-width: 1440px) and (min-width: 1000px) {
:root {
--column-count: 3
}
.nav__navlist {
display: flex;
}
.nav__toggle {
display: none;
}
}
@media screen and (max-width: 999px) and (min-width: 605px) {
:root {
--column-count: 2
}
.nav__navlist {
display: flex;
}
.nav__toggle {
display: none;
}
}
@media screen and (max-width: 604px) {
:root {
--column-count: 1
}
/* mobile nav - Start */
nav {
justify-content: flex-start;
}
.nav__toggle {
display: block;
}
.nav__navlist {
display: none;
position: absolute;
top: 3.4rem;
left: 0;
}
.nav__navitem {
margin: 0;
padding: 1rem 1rem 1rem 1.5rem;
display: block;
}
.nav__sub_navlist {
display: block;
}
.nav__navlist > li:hover > .nav__sub_navlist {
margin: 0 0 0 2rem;
position: static;
}
.nav__sub_navitem {
margin: 0;
padding: 0.5rem 0.5rem;
list-style: none;
text-align: left;
background-color: var(--wtf-dark-grey);
border-top: 1px solid var(--wtf-mid-grey);
}
.nav__sub_navitem {
border-top: none;
}
/* mobile nav - Ende */
}