Porting all CSS to SCSS for easier maintainance, checking on all best practices.

This commit is contained in:
Adsooi 2021-07-14 00:18:53 +02:00
parent 4f5089655b
commit bdded822bd
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
37 changed files with 1115 additions and 424 deletions

View file

@ -1,43 +0,0 @@
.block-preview {
/*border: black 1px solid;*/
box-shadow: 0px 0px 2px 0px #000000;
width: min(25em, calc(100vw - 2em));
height: 20em;
background-size: cover;
background-repeat: no-repeat;
}
.block-preview:hover, .block-preview.toggled {
box-shadow: 0px 0px 4px 0px #000000;
}
.block-preview .label {
transition: max-height 0.15s ease-in;
max-height: 20%;
overflow: hidden;
bottom: 0;
background-color: #FFFFFFDD;
padding: 0.5em;
bottom: 0;
}
.block-preview:hover .label, .block-preview.toggled .label {
max-height: 100%;
height: calc(100% - 1em);
}
.block-preview .label .show-on-hover {
display: none;
transition: opacity 0.15s;
opacity: 0;
max-height: 0;
background: none;
}
.block-preview:hover .label .show-on-hover, .block-preview.toggled .label .show-on-hover {
display: block;
opacity: 1;
max-height: 100%;
}

View file

@ -1,224 +0,0 @@
body {
font-family: 'Metropolis', 'Fira Sans','Ubuntu', 'Noto Sans', sans-serif;
overflow-x: hidden;
margin: 0px;
--light-font: 'Metropolis Light', 'Fira Sans Light','Ubuntu Light', 'Noto Sans Light', sans-serif;
--primary-color: #50DC71;
--secondary-color: #FAFAFA;
--nav-background: var(--secondary-color);
--nav-background-dark: #282828;
--footer-background: #111111;
}
.content-center {
max-width: 75em;
}
.padding-container {
padding: 1em;
}
/* button */
a[role=button] {
text-decoration: none;
color: black;
cursor: pointer;
}
.primary {
background-color: var(--primary-color);
}
.secondary {
background-color: var(--secondary-color);
}
a[role=button].primary, a[role=button].secondary {
padding: 0.5em;
text-transform: uppercase;
font-size: larger;
box-shadow: 0px 0px 2px 0px #000000;
transition: box-shadow 0.2s;
line-height: 3em;
}
a[role=button].primary:active, a[role=button].secondary:active {
box-shadow: 0px 0px 8px 0px #000000;
}
a[role=button].primary:hover, a[role=button].secondary:hover {
box-shadow: 0px 0px 4px 0px #000000;
}
.text-white a[role=button]:not(.primary), a[role=button]:not(.primary).text-white {
color: white;
}
/* format */
.fill-width {
width: 100%;
}
.center {
margin-right: auto !important;
margin-left: auto !important;
}
img.center {
display: block;
max-width: 100%;
}
.vertical-center {
margin-top: auto !important;
margin-bottom: auto !important;
max-height: 100%;
}
/* workaround for sometimes images don't position correctly vertically */
.vertical-center-img {
margin: auto;
max-height: 100%;
}
.text-left {
text-align: left;
}
.text-center {
text-align: center;
}
.text-right {
text-align: right;
}
.text-white {
color: white;
}
.text-white .icon-monochrome {
filter: invert(96%) sepia(0%) saturate(0%) hue-rotate(119deg) brightness(104%) contrast(104%);
}
.icon-as-text {
width: 1em;
height: 1em;
margin-right: 0.4em;
vertical-align: middle;
}
.icon-larger-text {
width: 1.4em;
height: 1.4em;
margin-right: 0.4em;
margin-top: -0.2em;
vertical-align: middle;
}
h1 {
font-size: xx-large;
font-family: var(--light-font);
}
h2 {
font-size: x-large;
font-family: var(--light-font);
}
h3 {
font-family: var(--light-font);
}
p {
line-height: 1.5em;
}
.grid {
display: flex;
flex-wrap: wrap;
margin: 3px;
}
.flex {
display: flex !important;
}
.inline {
display: inline !important;
}
.flex-right {
justify-content: flex-end;
}
.flex-center {
justify-content: center;
}
/* Columns */
.columns-container {
display: flex;
}
.col1:not(.col1-fill) {
width: 50%;
margin-right: auto !important;
margin-left: auto !important;
}
.col1.col1-fill {
width: 100%;
}
.col2 {
width: 50%;
}
.col3 {
width: 33%;
}
.col2-3 {
width: 66%;
}
.col4 {
width: 25%;
}
.col3-4 {
width: 75%;
}
.col5 {
width: 20%;
}
@media screen and (max-width: 700px) {
:not(footer) > .columns-container {
display: block;
}
.column {
width: 100%;
}
.section-header .column > img {
width: 100%;
}
.column :not(p).text-right, .column.text-right :not(p), .column :not(p).text-left, .column.text-left :not(p) {
text-align: center;
}
.column .flex-right {
justify-content: center;
}
.col1:not(.col1-fill) {
width: 100%;
}
}

View file

@ -1,2 +0,0 @@

View file

@ -1,15 +0,0 @@
@font-face {
font-family: "Metropolis";
src: url(/fonts/metropolis/Metropolis-Regular.otf) format("opentype");
}
@font-face {
font-family: "Metropolis";
src: url(/fonts/metropolis/Metropolis-Bold.otf) format("opentype");
font-weight: bold;
}
@font-face {
font-family: "Metropolis Light";
src: url(/fonts/metropolis/Metropolis-Light.otf) format("opentype");
}

View file

@ -1,17 +0,0 @@
footer {
width: 100%;
background: var(--footer-background);
color: white;
}
.footer-social-list {
display: flex;
font-size: 17px;
}
@media screen and (max-width: 550px) {
footer {
font-size: 10px;
}
}

View file

@ -1,165 +0,0 @@
nav {
font-size: 1.3em;
height: 3em;
position: absolute;
width: 100%;
font-family: var(--light-font);
}
nav .nav-flex {
display: flex;
max-width: 99%;
}
nav .navbar-brand {
padding-top: 1em;
padding-left: 0.5em;
display: flex;
}
nav .navbar-brand .icon-brand {
width: 2.5em;
height: 2.5em;
margin-top: -0.7em;
margin-right: 5px;
}
nav .navbar-menu {
flex: auto;
display: block;
width: 2em;
}
nav .navbar-list {
float:right;
flex: auto;
display: flex;
margin-top: 0px;
list-style-type: none;
text-transform: uppercase;
}
.navbar-list li {
padding: 1em;
margin-left: 0;
display: flex;
}
.navbar-list li.active {
background-color: var(--primary-color);
}
.navbar-list li.background {
background-color: var(--nav-background);
color: black;
}
.menu-with-sub {
display: block;
}
.menu-with-sub .sub-menu {
display: none;
position: absolute;
padding: 0;
margin-top: -2px;
}
.menu-with-sub.toggled .sub-menu {
display: block;
}
.menu-with-sub:hover .sub-menu {
display: block;
}
.menu-with-sub .sub-menu:hover {
display: block;
}
#navbar-toggler {
border: 0;
background: none;
box-shadow: none;
border-radius: 0px;
display: none;
cursor: pointer;
padding-right: 1em;
}
@media screen and (max-width: 700px) {
#navbar-toggler {
display: block;
}
nav {
/*background: var(--nav-background);*/
}
nav.menu-shown {
position: fixed;
z-index: 1;
background: var(--nav-background);
}
/* positioning for mobile */
nav .nav-flex {
display: block;
max-width: 100%;
}
.nav-mobile {
display: flex;
width: 100%;
}
.navbar-brand {
flex: auto;
}
.navbar-menu {
height: 100vh;
width: 100% !important;
display: none !important;
background: var(--nav-background);
}
.navbar-menu.shown {
display: block !important;
}
.navbar-list {
display: block !important;
width: 100%;
height: 100%;
padding-left: 0;
}
.navbar-list li {
width: 100% !important;
display: flex;
}
.menu-with-sub {
display: block;
}
.menu-with-sub .sub-menu {
margin-left: 1em;
display: ruby;
}
/* removing white text from menu with light background */
nav.menu-shown.text-white a[role=button], nav.menu-shown .text-white a[role=button], nav.menu-shown a[role=button].text-white {
color: black;
}
nav.menu-shown.text-white .icon-monochrome {
filter: unset;
}
nav.menu-shown.text-white .navbar-list li.background {
background-color: var(--nav-background);
}
}

View file

@ -1,40 +0,0 @@
section.section1 {
background-size: cover;
background-repeat: no-repeat;
color: black;
padding-left: 1em;
padding-top: 1em;
padding-right: 1em;
}
section.section-header {
height: calc(100vh + 3em);
}
.section-end-triangle {
width: 0;
height: 0;
border-top-width: 3em;
border-top-style: solid;
border-top-color: transparent;
border-right-width: 100vw;
border-right-style: solid;
border-right-color: #FFFFFF;
}
section.section-header > div.columns-container {
padding-top: 3em !important;
height: calc(100% - 6em);
}
@media screen and (max-width: 700px) {
section.section-header {
height: auto;
min-height: calc(100vh + 3em);
}
section.section-header > div.columns-container {
min-height: calc(100vh - 3em);
}
}