sassed padding

This commit is contained in:
aj 2019-04-05 11:55:16 +01:00
parent db725447b9
commit a2e54e40a3
3 changed files with 66 additions and 61 deletions

View File

@ -3,6 +3,8 @@ $background-colour: #202124;
$ui-colour: #131313; $ui-colour: #131313;
$text-colour: white; $text-colour: white;
$pad-px: 20px;
* { * {
box-sizing: border-box; box-sizing: border-box;
} }
@ -34,13 +36,16 @@ p {
display: inline-block; display: inline-block;
margin: 4px auto; margin: 4px auto;
cursor: pointer; cursor: pointer;
text-align: center;
padding: 15px; padding: 15px;
text-decoration: none;
box-shadow: 2px 2px 4px black; box-shadow: 2px 2px 4px black;
/*-webkit-transition-duration: 0.4s; /*-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;*/ transition-duration: 0.4s;*/
text: {
align: center;
decoration: none;
}
&:hover { &:hover {
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24),0 17px 50px 0 rgba(0,0,0,0.19); box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24),0 17px 50px 0 rgba(0,0,0,0.19);
} }
@ -60,7 +65,7 @@ p {
img { img {
height: auto; height: auto;
border: 10px solid #313439; border: 10px solid #313439;
margin: 10px; margin: $pad-px / 2;
box-shadow: 4px 4px 7px #070707; box-shadow: 4px 4px 7px #070707;
} }
} }
@ -111,7 +116,7 @@ h1.title {
background-color: $ui-colour; background-color: $ui-colour;
box-shadow: 4px 4px 8px black; box-shadow: 4px 4px 8px black;
padding: 10px; padding: 10px;
margin: 10px; margin: $pad-px / 2;
/*border-radius: 3px;*/ /*border-radius: 3px;*/
h1 { h1 {
@ -148,44 +153,49 @@ ul.navbar {
padding: 0; padding: 0;
overflow: hidden; overflow: hidden;
background-color: $ui-colour; background-color: $ui-colour;
li {
float: left;
position: -webkit-sticky;
position: sticky;
top: 0;
a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
text-shadow: 1px 1px 2px black;
-webkit-transition: background-color 0.4s;
transition: background-color 0.4s;
&:hover {
background-color: #080808;
}
}
}
li.right {float: right;}
} }
ul.navbar li { footer {
float: left; p {
position: -webkit-sticky; text-align: right;
position: sticky; font-size: 12px;
top: 0; }
}
ul.navbar li a { a {
display: block; margin-top: 10px;
color: white; margin-bottom: 10px;
text-align: center; text-align: right;
padding: 14px 16px; display: block;
text-decoration: none; color: grey;
text-shadow: 1px 1px 2px black; font-size: 12px;
-webkit-transition: background-color 0.4s; }
transition: background-color 0.4s;
}
ul.navbar a:hover {
background-color: #080808;
}
ul.navbar li.right {float: right;}
footer p {
text-align: right;
font-size: 12px;
}
footer a {
margin-top: 10px;
margin-bottom: 10px;
text-align: right;
display: block;
color: grey;
font-size: 12px;
} }
@media only screen and (max-width: 600px) { @media only screen and (max-width: 600px) {
@ -200,7 +210,7 @@ footer a {
[class*="pad-"] { [class*="pad-"] {
float: left; float: left;
width: calc(100% - 20px); width: calc(100% - #{$pad-px});
} }
@media only screen and (min-width: 768px) { @media only screen and (min-width: 768px) {
@ -219,17 +229,17 @@ footer a {
.col-12 {width: 100%;} .col-12 {width: 100%;}
/* For desktop: */ /* For desktop: */
.pad-2 {width: calc(16.66% - 20px);} .pad-2 {width: calc(16.66% - #{$pad-px});}
.pad-3 {width: calc(25% - 20px);} .pad-3 {width: calc(25% - #{$pad-px});}
.pad-4 {width: calc(33.33% - 20px);} .pad-4 {width: calc(33.33% - #{$pad-px});}
.pad-5 {width: calc(41.66% - 20px);} .pad-5 {width: calc(41.66% - #{$pad-px});}
.pad-6 {width: calc(50% - 20px);} .pad-6 {width: calc(50% - #{$pad-px});}
.pad-7 {width: calc(58.33% - 20px);} .pad-7 {width: calc(58.33% - #{$pad-px});}
.pad-8 {width: calc(66.66% - 20px);} .pad-8 {width: calc(66.66% - #{$pad-px});}
.pad-9 {width: calc(75% - 20px);} .pad-9 {width: calc(75% - #{$pad-px});}
.pad-10 {width: calc(83.33% - 20px);} .pad-10 {width: calc(83.33% - #{$pad-px});}
.pad-11 {width: calc(91.66% - 20px);} .pad-11 {width: calc(91.66% - #{$pad-px});}
.pad-12 {width: calc(100% - 20px);} .pad-12 {width: calc(100% - #{$pad-px});}
} }
.row::after { .row::after {

View File

@ -29,12 +29,12 @@ p {
display: inline-block; display: inline-block;
margin: 4px auto; margin: 4px auto;
cursor: pointer; cursor: pointer;
text-align: center;
padding: 15px; padding: 15px;
text-decoration: none;
box-shadow: 2px 2px 4px black; box-shadow: 2px 2px 4px black;
/*-webkit-transition-duration: 0.4s; /*-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;*/ transition-duration: 0.4s;*/
text-align: center;
text-decoration: none;
} }
.button:hover { .button:hover {
box-shadow: 0 12px 16px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19); box-shadow: 0 12px 16px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19);
@ -133,14 +133,12 @@ ul.navbar {
overflow: hidden; overflow: hidden;
background-color: #131313; background-color: #131313;
} }
ul.navbar li { ul.navbar li {
float: left; float: left;
position: -webkit-sticky; position: -webkit-sticky;
position: sticky; position: sticky;
top: 0; top: 0;
} }
ul.navbar li a { ul.navbar li a {
display: block; display: block;
color: white; color: white;
@ -151,11 +149,9 @@ ul.navbar li a {
-webkit-transition: background-color 0.4s; -webkit-transition: background-color 0.4s;
transition: background-color 0.4s; transition: background-color 0.4s;
} }
ul.navbar li a:hover {
ul.navbar a:hover {
background-color: #080808; background-color: #080808;
} }
ul.navbar li.right { ul.navbar li.right {
float: right; float: right;
} }
@ -164,7 +160,6 @@ footer p {
text-align: right; text-align: right;
font-size: 12px; font-size: 12px;
} }
footer a { footer a {
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;

View File

@ -1 +1 @@
{"version":3,"sourceRoot":"","sources":["../css/style.scss"],"names":[],"mappings":"AAKA;EACC;;;AAGD;EACC,aAVY;;;AAab;EACC,kBAbmB;;;AAgBpB;EACC,OAfa;EAgBb;AACA;;;AAGD;EACQ,OArBM;EAsBN;EACP;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACA;AAAA;;AAGA;EACC;;;AAIF;EACC;;;AAGD;EAEC;EACA;EACA;;AAGA;EACC;EACA;EACA;EACA;;;AAIF;EACC;EACA;EACA;AACA;EACA;EACA;;AAGA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIF;EACC;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;AACA;EACA;EACA;EACA;EACA;EACA;;;AAID;AACC;EACA,kBA5GW;EA6GX;EACA;EACA;AACA;;AAEA;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;EACI;;AAGL;EACC;;;AAIF;EACC;EACA;EACA;;;AAGD;EACC;EACA;AACA;EACA;EACA;EACA;EACA,kBAnJW;;;AAsJZ;EACC;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACE;;;AAGH;EACC;;;AAGD;EAAoB;;;AAEpB;EACC;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACE;AAAA;IACc;;;AAGhB;EACG;EACF;;;AAGD;EACG;EACF;;;AAGD;AACE;EACA;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAS;;;EACT;IAAS;;;EACT;IAAS;;;AAET;EACA;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAS;;;EACT;IAAS;;;EACT;IAAS;;;AAGX;EACE;EACA;EACA","file":"style.css"} {"version":3,"sourceRoot":"","sources":["../css/style.scss"],"names":[],"mappings":"AAOA;EACC;;;AAGD;EACC,aAZY;;;AAeb;EACC,kBAfmB;;;AAkBpB;EACC,OAjBa;EAkBb;AACA;;;AAGD;EACQ,OAvBM;EAwBN;EACP;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACA;AAAA;EAIC;EACA;;AAGD;EACC;;;AAIF;EACC;;;AAGD;EAEC;EACA;EACA;;AAGA;EACC;EACA;EACA;EACA;;;AAIF;EACC;EACA;EACA;AACA;EACA;EACA;;AAGA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIF;EACC;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;AACA;EACA;EACA;EACA;EACA;EACA;;;AAID;AACC;EACA,kBAjHW;EAkHX;EACA;EACA;AACA;;AAEA;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;EACI;;AAGL;EACC;;;AAIF;EACC;EACA;EACA;;;AAGD;EACC;EACA;AACA;EACA;EACA;EACA;EACA,kBAxJW;;AA2JX;EACC;EACA;EACA;EACA;;AAGA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACE;;AAGF;EACC;;AAKH;EAAU;;;AAIV;EACC;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;;;AAIF;EACE;AAAA;IACc;;;AAGhB;EACG;EACF;;;AAGD;EACG;EACF;;;AAGD;AACE;EACA;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAS;;;EACT;IAAS;;;EACT;IAAS;;;AAET;EACA;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAQ;;;EACR;IAAS;;;EACT;IAAS;;;EACT;IAAS;;;AAGX;EACE;EACA;EACA","file":"style.css"}