Skip to content

Commit

Permalink
feat(timeline): m3 styles
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Oct 12, 2022
1 parent 7af373d commit a09698d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 22 deletions.
33 changes: 13 additions & 20 deletions src/core/components/timeline/timeline-vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,12 @@
--f7-timeline-month-font-weight: inherit;
--f7-timeline-item-text-font-weight: inherit;
--f7-timeline-item-subtitle-font-weight: inherit;
.light-vars({
--f7-timeline-item-inner-bg-color: #fff;
});
.dark-vars({
--f7-timeline-item-inner-bg-color: #1c1c1d;
--f7-timeline-horizontal-item-border-color: rgba(255, 255, 255, 0.15);
--f7-timeline-horizontal-item-date-border-color: rgba(255, 255, 255, 0.15);
});
}
.ios-vars({
--f7-timeline-divider-color: #bbb;
--f7-timeline-padding-horizontal: 16px;
--f7-timeline-margin-vertical: 35px;
--f7-timeline-item-inner-border-radius: 7px;
--f7-timeline-item-inner-box-shadow: none;
--f7-timeline-item-time-font-size: 13px;
--f7-timeline-item-title-font-size: 17px;
--f7-timeline-item-title-line-height: inherit;
Expand All @@ -35,19 +27,23 @@
--f7-timeline-year-font-size: 16px;
--f7-timeline-horizontal-item-padding: 10px;
.light-vars({
--f7-timeline-item-inner-bg-color: #fff;
--f7-timeline-item-time-text-color: rgba(0,0,0,0.45);
--f7-timeline-horizontal-item-border-color: rgba(0,0,0,0.22);
--f7-timeline-horizontal-item-date-border-color: rgba(0,0,0,0.22);
});
.dark-vars({
--f7-timeline-horizontal-item-border-color: rgba(255, 255, 255, 0.15);
--f7-timeline-horizontal-item-date-border-color: rgba(255, 255, 255, 0.15);
--f7-timeline-item-inner-bg-color: #1c1c1d;
--f7-timeline-item-time-text-color: rgba(255,255,255,0.55);
});
});
.md-vars({
--f7-timeline-divider-color: var(--f7-md-outline);
--f7-timeline-padding-horizontal: 16px;
--f7-timeline-margin-vertical: 32px;
--f7-timeline-item-inner-border-radius: 4px;
--f7-timeline-item-inner-box-shadow: var(--f7-elevation-1);
--f7-timeline-item-inner-border-radius: 16px;
--f7-timeline-item-time-font-size: 13px;
--f7-timeline-item-title-font-size: 16px;
--f7-timeline-item-title-line-height: inherit;
Expand All @@ -56,15 +52,12 @@
--f7-timeline-item-subtitle-line-height: inherit;
--f7-timeline-item-text-font-size: inherit;
--f7-timeline-item-text-line-height: inherit;
--f7-timeline-item-text-color: inherit;
--f7-timeline-item-text-color: var(--f7-md-on-surface);
--f7-timeline-year-font-size: 16px;
--f7-timeline-horizontal-item-padding: 12px;
.light-vars({
--f7-timeline-item-time-text-color: rgba(0, 0, 0, 0.54);
--f7-timeline-horizontal-item-border-color: rgba(0,0,0,0.12);
--f7-timeline-horizontal-item-date-border-color: transparent;
});
.dark-vars({
--f7-timeline-item-time-text-color: rgba(255,255,255,0.54);
});
--f7-timeline-horizontal-item-border-color: var(--f7-md-outline);
--f7-timeline-horizontal-item-date-border-color: transparent;
--f7-timeline-item-inner-bg-color: var(--f7-md-surface-1);
--f7-timeline-item-time-text-color: var(--f7-md-on-surface-variant);

});
3 changes: 1 addition & 2 deletions src/core/components/timeline/timeline.less
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
box-sizing: border-box;
border-radius: var(--f7-timeline-item-inner-border-radius);
padding: 8px var(--f7-timeline-padding-horizontal);
box-shadow: var(--f7-timeline-item-inner-box-shadow);

+ .timeline-item-inner {
margin-top: var(--f7-timeline-inner-block-margin-vertical);
Expand All @@ -104,7 +103,7 @@
position: relative;
width: 10px;
height: 10px;
background: #bbb;
background: var(--f7-timeline-divider-color);
border-radius: 50%;
flex-shrink: 0;
margin: 3px var(--f7-timeline-divider-margin-horizontal) 0;
Expand Down

0 comments on commit a09698d

Please sign in to comment.