Skip to content

Commit a09698d

Browse files
committed
feat(timeline): m3 styles
1 parent 7af373d commit a09698d

File tree

2 files changed

+14
-22
lines changed

2 files changed

+14
-22
lines changed

src/core/components/timeline/timeline-vars.less

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,12 @@
99
--f7-timeline-month-font-weight: inherit;
1010
--f7-timeline-item-text-font-weight: inherit;
1111
--f7-timeline-item-subtitle-font-weight: inherit;
12-
.light-vars({
13-
--f7-timeline-item-inner-bg-color: #fff;
14-
});
15-
.dark-vars({
16-
--f7-timeline-item-inner-bg-color: #1c1c1d;
17-
--f7-timeline-horizontal-item-border-color: rgba(255, 255, 255, 0.15);
18-
--f7-timeline-horizontal-item-date-border-color: rgba(255, 255, 255, 0.15);
19-
});
2012
}
2113
.ios-vars({
14+
--f7-timeline-divider-color: #bbb;
2215
--f7-timeline-padding-horizontal: 16px;
2316
--f7-timeline-margin-vertical: 35px;
2417
--f7-timeline-item-inner-border-radius: 7px;
25-
--f7-timeline-item-inner-box-shadow: none;
2618
--f7-timeline-item-time-font-size: 13px;
2719
--f7-timeline-item-title-font-size: 17px;
2820
--f7-timeline-item-title-line-height: inherit;
@@ -35,19 +27,23 @@
3527
--f7-timeline-year-font-size: 16px;
3628
--f7-timeline-horizontal-item-padding: 10px;
3729
.light-vars({
30+
--f7-timeline-item-inner-bg-color: #fff;
3831
--f7-timeline-item-time-text-color: rgba(0,0,0,0.45);
3932
--f7-timeline-horizontal-item-border-color: rgba(0,0,0,0.22);
4033
--f7-timeline-horizontal-item-date-border-color: rgba(0,0,0,0.22);
4134
});
4235
.dark-vars({
36+
--f7-timeline-horizontal-item-border-color: rgba(255, 255, 255, 0.15);
37+
--f7-timeline-horizontal-item-date-border-color: rgba(255, 255, 255, 0.15);
38+
--f7-timeline-item-inner-bg-color: #1c1c1d;
4339
--f7-timeline-item-time-text-color: rgba(255,255,255,0.55);
4440
});
4541
});
4642
.md-vars({
43+
--f7-timeline-divider-color: var(--f7-md-outline);
4744
--f7-timeline-padding-horizontal: 16px;
4845
--f7-timeline-margin-vertical: 32px;
49-
--f7-timeline-item-inner-border-radius: 4px;
50-
--f7-timeline-item-inner-box-shadow: var(--f7-elevation-1);
46+
--f7-timeline-item-inner-border-radius: 16px;
5147
--f7-timeline-item-time-font-size: 13px;
5248
--f7-timeline-item-title-font-size: 16px;
5349
--f7-timeline-item-title-line-height: inherit;
@@ -56,15 +52,12 @@
5652
--f7-timeline-item-subtitle-line-height: inherit;
5753
--f7-timeline-item-text-font-size: inherit;
5854
--f7-timeline-item-text-line-height: inherit;
59-
--f7-timeline-item-text-color: inherit;
55+
--f7-timeline-item-text-color: var(--f7-md-on-surface);
6056
--f7-timeline-year-font-size: 16px;
6157
--f7-timeline-horizontal-item-padding: 12px;
62-
.light-vars({
63-
--f7-timeline-item-time-text-color: rgba(0, 0, 0, 0.54);
64-
--f7-timeline-horizontal-item-border-color: rgba(0,0,0,0.12);
65-
--f7-timeline-horizontal-item-date-border-color: transparent;
66-
});
67-
.dark-vars({
68-
--f7-timeline-item-time-text-color: rgba(255,255,255,0.54);
69-
});
58+
--f7-timeline-horizontal-item-border-color: var(--f7-md-outline);
59+
--f7-timeline-horizontal-item-date-border-color: transparent;
60+
--f7-timeline-item-inner-bg-color: var(--f7-md-surface-1);
61+
--f7-timeline-item-time-text-color: var(--f7-md-on-surface-variant);
62+
7063
});

src/core/components/timeline/timeline.less

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
box-sizing: border-box;
7979
border-radius: var(--f7-timeline-item-inner-border-radius);
8080
padding: 8px var(--f7-timeline-padding-horizontal);
81-
box-shadow: var(--f7-timeline-item-inner-box-shadow);
8281

8382
+ .timeline-item-inner {
8483
margin-top: var(--f7-timeline-inner-block-margin-vertical);
@@ -104,7 +103,7 @@
104103
position: relative;
105104
width: 10px;
106105
height: 10px;
107-
background: #bbb;
106+
background: var(--f7-timeline-divider-color);
108107
border-radius: 50%;
109108
flex-shrink: 0;
110109
margin: 3px var(--f7-timeline-divider-margin-horizontal) 0;

0 commit comments

Comments
 (0)