Skip to content

Commit b201400

Browse files
authored
Merge pull request #105 from mendix/fix/timeline-popup
Update timeline & popup styles
2 parents bdd6c1d + 54104af commit b201400

File tree

5 files changed

+105
-13
lines changed

5 files changed

+105
-13
lines changed

styles/web/css/main.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

styles/web/css/main.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

styles/web/sass/core/_variables.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,17 @@ $callout-success-bg: $color-success-lighter !default;
558558
$callout-warning-bg: $color-warning-lighter !default;
559559
$callout-danger-bg: $color-danger-lighter !default;
560560

561+
//== Timeline
562+
//## Extended variables for Timeline Widget
563+
// Colors
564+
$timeline-icon-color: $brand-primary;
565+
$timeline-border-color: $border-color-default;
561566

567+
$timeline-color-header: $font-color-header;
568+
$timeline-color-detail: $font-color-detail;
562569

563-
570+
// Sizes
571+
$timeline-icon-size: 18px;
564572

565573
//== Spacing
566574
//## Advanced layout options (used in base/mixins/default-spacing)

styles/web/sass/core/widgets/_popupmenu.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@
2525
display: none;
2626
flex-direction: column;
2727
width: max-content;
28-
border: 1px solid $border-color-default;
2928
border-radius: 8px;
3029
background-color: $bg-color;
31-
box-shadow: 0 3px 14px 2px rgba(0, 0, 0, 0.02), 0 8px 10px 1px rgba(0, 0, 0, 0.04),
32-
0 5px 5px -3px rgba(0, 0, 0, 0.08);
30+
box-shadow: 0 2px 20px 1px rgba(5, 15, 129, 0.05), 0 2px 16px 0 rgba(33, 43, 54, 0.08);
3331

3432
&.popupmenu-position-left {
3533
top: 0;
Lines changed: 93 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,102 @@
1-
.widget-timeline-icon-circle {
2-
background-color: $brand-primary
1+
.widget-timeline-date-header {
2+
display: inline-block;
3+
width: 110px;
4+
overflow-wrap: break-word;
5+
padding: 8px;
6+
text-align: center;
7+
border: 1px solid $timeline-border-color;
8+
border-radius: 30px;
9+
}
10+
11+
.widget-timeline-events-wrapper {
12+
display: flex;
13+
flex: 1;
14+
margin-left: 55px;
15+
padding-top: 35px;
16+
17+
ul {
18+
padding: 0;
19+
list-style: none;
20+
margin-bottom: 0;
21+
}
322
}
423

524
.widget-timeline-title {
25+
color: $timeline-color-header;
626
font-weight: 600;
727
margin: 0 0 10px 0;
828
}
929

10-
.widget-timeline-info-wrapper {
11-
&:hover {
12-
.title {
13-
color: rgba($brand-primary, 0.7)
30+
.widget-timeline-description {
31+
color: $timeline-color-detail;
32+
}
33+
34+
.widget-timeline-event {
35+
position: relative;
36+
margin-left: $timeline-icon-size / 2;
37+
padding-left: $spacing-large;
38+
padding-bottom: 20px;
39+
40+
&:not(:last-of-type) {
41+
border-left: 1px solid $timeline-border-color;
42+
}
43+
44+
&.clickable {
45+
cursor: pointer;
46+
transition: background 0.8s;
47+
48+
&:hover {
49+
.widget-timeline-title {
50+
color: #dadcde;
51+
}
1452
}
15-
}
53+
}
54+
}
55+
56+
.widget-timeline-icon-wrapper {
57+
position: absolute;
58+
top: 0;
59+
left: 0;
60+
display: flex;
61+
justify-content: center;
62+
align-items: center;
63+
width: $timeline-icon-size;
64+
height: $timeline-icon-size;
65+
transform: translateX(-50%);
66+
67+
.glyphicon {
68+
font-size: $timeline-icon-size;
69+
}
70+
71+
img {
72+
max-width: $timeline-icon-size;
73+
max-height: $timeline-icon-size;
74+
}
75+
}
76+
77+
.widget-timeline-content-wrapper {
78+
.widget-timeline-date-time-wrapper {
79+
margin-right: 15px;
80+
}
81+
82+
.widget-timeline-info-wrapper {
83+
flex-direction: column;
84+
}
85+
}
86+
87+
.widget-timeline-icon-circle {
88+
width: 18px;
89+
height: 18px;
90+
border-radius: 50%;
91+
background-color: $timeline-icon-color;
92+
}
93+
94+
.widget-timeline-no-divider {
95+
padding-bottom: 0;
96+
padding-top: 0;
97+
margin-left: 0;
98+
}
99+
100+
.widget-timeline-flex-container {
101+
display: flex;
16102
}

0 commit comments

Comments
 (0)