From 808c889114bb92a4fa63dac5c2be79e40c29d362 Mon Sep 17 00:00:00 2001 From: Nathan Stitt Date: Fri, 22 May 2015 16:15:16 -0500 Subject: [PATCH] Use padding to adjust top size This works better since it'll allow the top element directly under `tutor-booksplash-background` to be targeted. --- resources/styles/components/course-calendar/month.less | 2 +- .../styles/components/student-dashboard/dashboard.less | 2 +- resources/styles/global/tutor-booksplash-background.less | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/styles/components/course-calendar/month.less b/resources/styles/components/course-calendar/month.less index 5adc3f8f57..553a92e2c7 100644 --- a/resources/styles/components/course-calendar/month.less +++ b/resources/styles/components/course-calendar/month.less @@ -28,11 +28,11 @@ .list-courses { background-color: transparent; + .tutor-booksplash-adjust-top-padding(120px); .calendar-container{ background-color: @tutor-white; .bootstrap-column-padding-override(); - .tutor-booksplash-adjust-top-margin(120px); padding-bottom: @tutor-card-body-padding-vertical; } diff --git a/resources/styles/components/student-dashboard/dashboard.less b/resources/styles/components/student-dashboard/dashboard.less index 13eae4f50d..d7efe2ee02 100644 --- a/resources/styles/components/student-dashboard/dashboard.less +++ b/resources/styles/components/student-dashboard/dashboard.less @@ -1,7 +1,7 @@ .student-dashboard { @small-height-breakpoint: 600px; .container { - .tutor-booksplash-adjust-top-margin(); + .tutor-booksplash-adjust-top-padding(); } .right-actions-box { diff --git a/resources/styles/global/tutor-booksplash-background.less b/resources/styles/global/tutor-booksplash-background.less index 2892c020dd..55b99080b4 100644 --- a/resources/styles/global/tutor-booksplash-background.less +++ b/resources/styles/global/tutor-booksplash-background.less @@ -36,9 +36,9 @@ // custom backgrounds images for different types &[data-title=Physics]:after{ .tutor-background-image("physics.jpg"); } } -.tutor-booksplash-adjust-top-margin(@normal-top-margin: 100px, @short-top-margin: 35px){ - margin-top: @normal-top-margin; +.tutor-booksplash-adjust-top-padding(@normal-top-padding: 100px, @short-top-padding: 35px){ + padding-top: @normal-top-padding; // if the screen is short, move up even though it means // the booksplash background won't be as visible - @media screen and ( max-height: 600px ){ margin-top: @short-top-margin; } + @media screen and ( max-height: 600px ){ padding-top: @short-top-padding; } }