From 25083df18e1a93533856edcc175faf6a439314a3 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 3 Dec 2018 14:58:14 +0100 Subject: [PATCH] get last item spacing * work around felxbox containers not taking padding into account --- src/components/Repositories/RepositoryList.module.scss | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/Repositories/RepositoryList.module.scss b/src/components/Repositories/RepositoryList.module.scss index c7e0eb6a..cc0952dc 100644 --- a/src/components/Repositories/RepositoryList.module.scss +++ b/src/components/Repositories/RepositoryList.module.scss @@ -7,7 +7,6 @@ -webkit-overflow-scrolling: touch; margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); - padding-right: $spacer; display: flex; @media (min-width: $break-point--medium) { @@ -31,10 +30,12 @@ margin-left: 0; } } + } - &:last-child { - margin-right: $spacer * 1.4; - } + // add final right margin + &:after { + content: ''; + flex: 0 0 $spacer * 2; } // custom scrollbar