+$breakpoint-timeline = 600px // When timeline collapses into 1 column
+$dot-size = 14px // width or height of a single background dot, including its gutter
+
.timeline
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='14'%3E%3Ccircle cx='1.5' cy='1.5' r='1.5' fill='%23707070'/%3E%3C/svg%3E")
+ background-repeat: repeat-y
+ background-position: 3.3em 0
+
+ +below($breakpoint-timeline)
+ background-position: 50% 0
+
&-item
@apply flex items-center
&:not(:last-child)
- @apply mb-6
+ margin-bottom: $dot-size * 5
+
+ +below($breakpoint-timeline)
+ flex-direction: column
+ align-items: center
+ background-color: #fff
+ padding-bottom: $dot-size
+
+ &-date-wrapper
+ align-self: stretch
+ display: flex
+ flex-direction: column
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='3'%3E%3Ccircle cx='1.5' cy='1.5' r='1.5' fill='%23707070'/%3E%3C/svg%3E")
+ background-position: 7px 50%
+ background-repeat: repeat-x
+ margin-right: 1.2em // Spacing between text and dots on the right
+
+ // Before and after pseudo elements used to centre year when text is taller than the year
+ // Doing it this way allows the backgrounds to be a solid colour, masking the dots in the
+ // background when necessary (for the first and last items only)
+ &:before, &:after
+ content: ''
+ flex: 1 1 auto
+
+ // For the first timeline item, mask any space ABOVE the date
+ // with white so background dots don't show above...
+ &:before
+ .timeline-item:first-child &
+ background-color: #fff
+
+ // For the last timeline item, mask any space BELOW the date
+ // with white so background dots don't show above...
+ &:after
+ .timeline-item:last-child &
+ background-color: #fff
+
+ +below($breakpoint-timeline)
+ background: none
+ margin-right: 0
+ align-self: center
+
+ &:before, &:after
+ display: none
+
&-date
@apply bg-teal text-white text-lg rounded-full
- @apply flex flex-shrink-0 items-center justify-center mb-4 mr-16
+ @apply flex items-center justify-center
+ flex: 0 0 auto
width: 5em
height: @width
overflow: hidden
box-shadow: inset 0 0 0 0.45em rgba(#fff, 0.6)
+ box-sizing: content-box // So border takes space outside circle instead of making it smaller
+ border: $dot-size solid #fff // White border works as mask so background dots don't get too close to date circles
+ margin-left: - $dot-size // Offset the invisible white border on the left
+ margin-right: $dot-size * 9 // Number of dots to show
+
+ +below(1200px)
+ margin-right: $dot-size * 6
+ +below(768px)
+ margin-right: $dot-size * 4
+ +below($breakpoint-timeline)
+ margin: - $dot-size 0 0 0
+
&.is-highlight
@apply bg-pink
-
- // Todo: implement dotted lines like we did for cubedesigners.com/news
+ &-content
+ +below($breakpoint-timeline)
+ max-width: 280px
+ text-align: center
'purple': '#5A5488',
'purple-dark': '#2E2C40', // Footer and other dark sections
'pink': '#FF078B', // Accent colour
- 'pink-light': '#FF7EC3',
+ 'pink-light': '#FF7EC3', // Hover colour
'teal': '#2CC4CF', // Accent colour
+ 'teal-light': '#71D3DF', // Hover colour
},
fontFamily: {
'display': ['Dosis', 'sans-serif'], // Headings, labels, menus etc