refactor: adjust timeline sizings for mobile, cleanup component styling
This commit is contained in:
parent
35d5232575
commit
f7ae855221
3 changed files with 47 additions and 27 deletions
|
@ -28,34 +28,21 @@
|
|||
&:not(:last-child):before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: var(--timeline-stroke-position-top);
|
||||
left: var(--timeline-stroke-position-horizontal);
|
||||
inset: var(--timeline-stroke-position-odd);
|
||||
height: var(--timeline-stroke-length);
|
||||
border-left: var(--timeline-stroke-thickness) solid
|
||||
var(--timeline-stroke-color);
|
||||
}
|
||||
|
||||
@media (min-width: 64em) {
|
||||
&:nth-child(odd) {
|
||||
margin: var(--timeline-item-margin-odd);
|
||||
}
|
||||
&:nth-child(odd) {
|
||||
margin: var(--timeline-item-margin-odd);
|
||||
}
|
||||
|
||||
&:nth-child(even) {
|
||||
margin: var(--timeline-item-margin-even);
|
||||
&:nth-child(even) {
|
||||
margin: var(--timeline-item-margin-even);
|
||||
|
||||
&:before {
|
||||
left: auto;
|
||||
right: var(--timeline-stroke-position-horizontal);
|
||||
}
|
||||
|
||||
.timeline-item__icon {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.timeline-item__content {
|
||||
text-align: right;
|
||||
margin: 0 1rem 0 0;
|
||||
}
|
||||
&:before {
|
||||
inset: var(--timeline-stroke-position-even);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -82,9 +69,19 @@
|
|||
}
|
||||
}
|
||||
|
||||
&:nth-child(even) &__icon {
|
||||
order: var(--timeline-item-flex-order);
|
||||
}
|
||||
|
||||
&__content {
|
||||
flex: 1 0 0;
|
||||
margin: 0 0 0 1rem;
|
||||
margin: 0;
|
||||
padding: var(--timeline-item-content-padding-odd);
|
||||
}
|
||||
|
||||
&:nth-child(even) &__content {
|
||||
text-align: var(--timeline-item-text-align-even);
|
||||
padding: var(--timeline-item-content-padding-even);
|
||||
}
|
||||
|
||||
&__headline {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<style lang="scss">
|
||||
.timeline {
|
||||
max-width: calc(var(--timeline-circle-size) * 15);
|
||||
max-width: var(--timeline-max-width);
|
||||
position: relative;
|
||||
|
||||
margin: 0 auto;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue