From cb92d29ddccb71ce39f98315b8668a3ad5bf9661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 10 Jan 2019 10:35:16 +0100 Subject: [PATCH] Simplify nth-child selectors Using `nth-child(odd), nth-child(even)` is the same as selecting all the elements. --- app/assets/stylesheets/milestones.scss | 29 +++++++++++++------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/app/assets/stylesheets/milestones.scss b/app/assets/stylesheets/milestones.scss index 41cf2a175..b740163af 100644 --- a/app/assets/stylesheets/milestones.scss +++ b/app/assets/stylesheets/milestones.scss @@ -46,8 +46,7 @@ } } -.tab-milestones .timeline ul li:nth-child(odd), -.tab-milestones .timeline ul li:nth-child(even) { +.tab-milestones .timeline ul li { .milestone-content { @@ -59,27 +58,27 @@ width: rem-calc(450); } } -} -.tab-milestones .timeline ul li:nth-child(odd) { + &:nth-child(odd) { - .milestone-content { - text-align: right; + .milestone-content { + text-align: right; - @include breakpoint(medium) { - margin-left: rem-calc(-315); - } + @include breakpoint(medium) { + margin-left: rem-calc(-315); + } - @include breakpoint(large) { - margin-left: rem-calc(-465); + @include breakpoint(large) { + margin-left: rem-calc(-465); + } } } -} -.tab-milestones .timeline ul li:nth-child(even) { + &:nth-child(even) { - .milestone-content { - left: 15px; + .milestone-content { + left: 15px; + } } }