From 5cf928c88390dc4930dc7740a7dc2fd1a6267b48 Mon Sep 17 00:00:00 2001 From: Amr Salama Date: Sat, 8 Feb 2020 06:09:07 +0200 Subject: [PATCH] feat: sticky header --- src/Components/Board/styles.js | 7 +++++-- src/Components/TraineeList/styles.js | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Components/Board/styles.js b/src/Components/Board/styles.js index 03646de..d2c450d 100644 --- a/src/Components/Board/styles.js +++ b/src/Components/Board/styles.js @@ -5,21 +5,24 @@ export default css` display: flex; flex-direction: row; overflow: auto; + position: fixed; + width: 100%; + height: 100%; } /* trainees */ .board .trainees-section { - background-color: white; position: sticky; left: 0; z-index: 1; - padding: 0 10px; } /* sheets */ .board .sheets-section .sheets { display: flex; flex-direction: row; + position: sticky; + top: 0; } .board .sheets-section .trainee-problems-status { diff --git a/src/Components/TraineeList/styles.js b/src/Components/TraineeList/styles.js index 2f0f1a0..fbbee93 100644 --- a/src/Components/TraineeList/styles.js +++ b/src/Components/TraineeList/styles.js @@ -6,6 +6,8 @@ export default css` .trainee-list { display: flex; flex-direction: column; + background: white; + padding: 0 10px; } .trainee-list .header { @@ -16,6 +18,10 @@ export default css` text-transform: uppercase; font-size: 14px; cursor: default; + background: white; + position: sticky; + top: 0; + z-index: 10; } .list-item {