improved grid system with media query in home display
This commit is contained in:
@ -346,15 +346,32 @@ article.node--type-frontpage{
|
||||
position:relative;
|
||||
// height:550px;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-rows: 1fr;
|
||||
$bp: ($column_width + $column_goutiere )*7;
|
||||
|
||||
@media only screen and (max-width: $bp){
|
||||
grid-template-columns: 1fr;
|
||||
>.field__item{
|
||||
grid-column: 1;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: $bp + 1px){
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-gap: 1em;
|
||||
>.field__item:nth-child(odd){
|
||||
grid-column: 1;
|
||||
}
|
||||
>.field__item:nth-child(even){
|
||||
grid-column: 2;
|
||||
}
|
||||
}
|
||||
|
||||
>.field__item{
|
||||
grid-row: 1;
|
||||
// position: absolute;
|
||||
// top:0; left:0;
|
||||
// width:100%; height:100%;
|
||||
// overflow: hidden;
|
||||
grid-column: 1;
|
||||
grid-row: 1;
|
||||
.taxonomy-term{
|
||||
position: relative;
|
||||
width:100%; height:100%;
|
||||
@ -363,6 +380,7 @@ article.node--type-frontpage{
|
||||
padding-bottom: 10em;
|
||||
img{
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
section.text{
|
||||
@ -392,8 +410,16 @@ article.node--type-frontpage{
|
||||
|
||||
.cards-list-home{
|
||||
position: relative;
|
||||
// max-height: 580px;
|
||||
// overflow-y: hidden;
|
||||
$bp: ($column_width + $column_goutiere );
|
||||
overflow-y: hidden;
|
||||
|
||||
@media only screen and (max-width: $bp * 6){
|
||||
max-height: 630px;
|
||||
}
|
||||
@media only screen and (min-width: ($bp * 6) + 1px){
|
||||
max-height: 310px;
|
||||
}
|
||||
|
||||
ul{
|
||||
width:100%;
|
||||
margin:0; padding:0;
|
||||
|
Reference in New Issue
Block a user