Recepty se škálují s velikostí okna s @media tagy
This commit is contained in:
parent
770d23085f
commit
dd7861bd42
@ -4,7 +4,8 @@ $secondary:#e8e6dc;
|
||||
$border:#bbb;
|
||||
|
||||
// scale
|
||||
$wrap:1200px;
|
||||
$main-wrap:1000px;
|
||||
$main-padding:1em;
|
||||
|
||||
// body
|
||||
$body-background:$secondary;
|
||||
@ -36,8 +37,10 @@ $recipe-background:#fff;
|
||||
$recipe-wrap:800px;
|
||||
|
||||
// article
|
||||
$article-width:22%;
|
||||
$article-margin:0 1em 2em 1em;
|
||||
$article-width:24%;
|
||||
$article-width-narrow:48%;
|
||||
$article-margin:0 .5% 2em .5%;
|
||||
$article-margin-narrow:0 1% 2em 1%;
|
||||
$article-background:#fff;
|
||||
$article-color:#000;
|
||||
$article-date-color:#888;
|
||||
|
@ -5,6 +5,24 @@
|
||||
@import "tables";
|
||||
@import "fonts";
|
||||
|
||||
@media screen and (max-width: 699px){
|
||||
|
||||
main section article {
|
||||
width:$article-width-narrow;
|
||||
margin:$article-margin-narrow;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media screen and (min-width: 700px){
|
||||
|
||||
main section article {
|
||||
width:$article-width;
|
||||
margin:$article-margin;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
html, body {
|
||||
margin:0;
|
||||
}
|
||||
@ -29,8 +47,9 @@ img {
|
||||
}
|
||||
|
||||
main {
|
||||
max-width:$wrap;
|
||||
max-width:$main-wrap;
|
||||
margin:3em auto;
|
||||
padding:$main-padding;
|
||||
|
||||
h2 {
|
||||
font-size:3em;
|
||||
@ -83,12 +102,11 @@ main {
|
||||
article {
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
width:$article-width;
|
||||
margin:$article-margin;
|
||||
background:$article-background;
|
||||
border:1px solid $border;
|
||||
border-radius:$article-border-radius;
|
||||
overflow:hidden;
|
||||
box-sizing:border-box;
|
||||
|
||||
a {
|
||||
color:$article-color;
|
||||
|
Loading…
Reference in New Issue
Block a user