From fb72fc48fdc1d728bccf8f9e76dcda421b66a4c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 10 Jan 2019 10:45:51 +0100 Subject: [PATCH] Simplify milestones styles for small devices The selector `nth-child(even)` didn't need specific rules, and it's easier to understand the code for the selector `nth-child(odd)` if all breakpoints are grouped together. --- app/assets/stylesheets/milestones.scss | 27 +++++++++----------------- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/app/assets/stylesheets/milestones.scss b/app/assets/stylesheets/milestones.scss index 0df9cf465..bc4515665 100644 --- a/app/assets/stylesheets/milestones.scss +++ b/app/assets/stylesheets/milestones.scss @@ -8,6 +8,10 @@ position: relative; width: 0; + @include breakpoint(small only) { + width: 100%; + } + &::before { background: $budget; border-radius: rem-calc(20); @@ -65,6 +69,11 @@ @include breakpoint(large) { margin-left: rem-calc(-465); } + + @include breakpoint(small only) { + left: 15px; + text-align: left; + } } } @@ -76,24 +85,6 @@ } } -.tab-milestones { - @include breakpoint(small only) { - - .timeline ul li { - width: 100%; - - &:nth-child(odd), - &:nth-child(even) { - - .milestone-content { - left: 15px; - text-align: left; - } - } - } - } -} - .milestone-status { background: $budget; border-radius: rem-calc(4);