styled list collections accordion in mobile

This commit is contained in:
jorge 2022-03-22 18:40:50 +01:00
parent 1eeac2565d
commit 7ab2aaeec5
2 changed files with 85 additions and 85 deletions

File diff suppressed because one or more lines are too long

View File

@ -240,32 +240,17 @@ main {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
// accordion for colletions list
.accordion-item { .accordion-item {
&:not(.title).is-active { &:not(.title){
background-color:$input-background; &.is-active {
} background-color:$input-background;
}
.accordion-item.title li {
// @include xy-cell(3);
// @include xy-cell-offset(0);
//}
}
.accordion-title {
&.title {
@include breakpoint(small){
li {
@include xy-cell(3);
@include xy-cell-offset(0);
&.title,&.curator,&.collection-name,&.date {
&::before {content: none;}
}
}
} }
} .accordion-title {
&:not(.title) { @include breakpoint(small){
@include breakpoint(small){ li {
li { &.title,
&.title,
&.curator, &.curator,
&.collection-name, &.collection-name,
&.date { &.date {
@ -275,86 +260,101 @@ main {
&::before { &::before {
display: inline-block; display: inline-block;
color: $medium-gray; color: $medium-gray;
//font-size: $accordion-title-font-size;
position: absolute; position: absolute;
left:0; left:0;
} }
} }
&.title::before {content:"Title";} &.title::before {content:"Title";}
&.curator::before {content:"Artist";} &.curator::before {content:"Artist";}
&.collection-name::before {content:"Collection";} &.collection-name::before {content:"Collection";}
&.date::before {content:"Date";} &.date::before {content:"Date";}
}
} }
} @include breakpoint(medium){
@include breakpoint(medium){ li {
li { &.title,
&.title, &.curator,
&.curator, &.collection-name,
&.collection-name, &.date {
&.date { min-height:unset;
min-height:unset; &::before {
&::before { content: none;
content: none; // content:"";
}
}
&.title {
@include xy-cell(4);
}
&.curator {
@include xy-cell(4);
}
&.collection-name {
@include xy-cell(2);
}
&.date {
@include xy-cell(shrink);
margin-left: auto; //aligns to right
} }
} }
&.title::before {content:"";} }
&.curator::before {content:"";} }
&.collection-name::before {content:"";} }
&.date::before {content:"";} &.title {
&.title { .accordion-title {
@include xy-cell(4); @include breakpoint(small){
} li {
&.curator { @include xy-cell(3);
@include xy-cell(4); @include xy-cell-offset(0);
} &.title,&.curator,&.collection-name,&.date {
&.collection-name { &::before {content: none;}
@include xy-cell(2); }
}
&.date {
@include xy-cell(shrink);
margin-left: auto; //aligns to right
} }
} }
} }
} }
} .accordion-title {
.accordion-content { ul,ol {
padding-top: 0; margin: 0;
section { }
@include xy-grid; }
.accordion-content {
padding-top: 0; padding-top: 0;
padding-bottom: 0; section {
@include breakpoint(small){ @include xy-grid;
figure { padding-top: 0;
@include xy-cell(12); padding-bottom: 0;
margin-left:0; @include breakpoint(small){
margin-right:0; figure {
} @include xy-cell(12);
p { margin-left:0;
@include xy-cell(12); margin-right:0;
position: relative; }
padding: $global-padding; p {
padding-bottom: $global-padding * 3; @include xy-cell(12);
.button { position: relative;
position:absolute; padding: $global-padding;
right:0; padding-bottom: $global-padding * 3;
margin-top: $global-padding * 3; .button {
position:absolute;
right:0;
margin-top: $global-padding * 3;
}
} }
} }
} @include breakpoint(medium){
@include breakpoint(medium){ figure {
figure { @include xy-cell(4);
@include xy-cell(4); margin-left: 0;
margin-left: 0; }
p {
@include xy-cell(8);
}
} }
p { @include breakpoint(large){
@include xy-cell(8);
} }
} }
@include breakpoint(large){
}
} }
} }
} }
// end collections category // end collections category