2017-05-16 16:56:40 +01:00
|
|
|
// CSS adapted from
|
|
|
|
|
// https://github.com/alphagov/govuk_frontend_toolkit/blob/d9489a987086471fe30b4b925a81c12cd198c91d/docs/javascript.md#stick-at-top-when-scrolling
|
|
|
|
|
|
2020-02-21 13:21:44 +00:00
|
|
|
$sticky-padding: govuk-spacing(4);
|
2019-02-01 16:13:04 +00:00
|
|
|
|
2018-11-05 17:47:25 +00:00
|
|
|
.js-stick-at-top-when-scrolling,
|
|
|
|
|
.js-stick-at-bottom-when-scrolling {
|
2017-05-16 16:56:40 +01:00
|
|
|
|
2019-01-30 10:47:26 +00:00
|
|
|
overflow: hidden;
|
2020-03-06 11:23:24 +00:00
|
|
|
margin-left: -1 * govuk-spacing(3);
|
2020-02-21 13:21:44 +00:00
|
|
|
padding: 10px 0 0 govuk-spacing(3);
|
2017-06-15 07:52:36 +01:00
|
|
|
position: relative;
|
2017-05-16 16:56:40 +01:00
|
|
|
|
|
|
|
|
.form-group {
|
|
|
|
|
margin-bottom: 20px;
|
2019-01-30 10:47:26 +00:00
|
|
|
|
|
|
|
|
legend {
|
|
|
|
|
outline: none;
|
|
|
|
|
}
|
2017-05-16 16:56:40 +01:00
|
|
|
}
|
|
|
|
|
|
2017-12-14 11:58:40 +00:00
|
|
|
.back-to-top-link {
|
|
|
|
|
position: absolute;
|
2020-02-21 13:21:44 +00:00
|
|
|
top: govuk-spacing(6);
|
|
|
|
|
right: govuk-spacing(3);
|
2017-12-14 11:58:40 +00:00
|
|
|
opacity: 0;
|
|
|
|
|
transition: opacity 0.1s ease-in-out;
|
|
|
|
|
}
|
|
|
|
|
|
2017-05-16 16:56:40 +01:00
|
|
|
}
|
|
|
|
|
|
2018-11-05 17:47:25 +00:00
|
|
|
.js-stick-at-top-when-scrolling {
|
|
|
|
|
|
|
|
|
|
margin-top: -10px;
|
|
|
|
|
margin-bottom: 5px;
|
|
|
|
|
top: 5px;
|
|
|
|
|
transition: top 0.1s ease-out, box-shadow 1s ease-in-out;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-12 09:54:25 +00:00
|
|
|
.js-stick-at-bottom-when-scrolling {
|
2018-11-05 17:47:25 +00:00
|
|
|
|
|
|
|
|
transition: bottom 0.1s ease-out, box-shadow 1s ease-in-out;
|
2020-02-21 13:21:44 +00:00
|
|
|
padding: $sticky-padding 0 $sticky-padding govuk-spacing(3);
|
2019-02-01 16:13:04 +00:00
|
|
|
margin-top: -$sticky-padding;
|
2018-11-19 15:18:15 +00:00
|
|
|
|
2019-01-30 14:10:59 +00:00
|
|
|
& + .js-stick-at-bottom-when-scrolling {
|
2019-01-30 10:47:26 +00:00
|
|
|
margin-top: ($sticky-padding * 2) * -1;
|
2019-01-30 14:10:59 +00:00
|
|
|
}
|
|
|
|
|
|
2019-07-11 14:28:13 +01:00
|
|
|
fieldset:focus {
|
|
|
|
|
outline: none;
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-19 15:18:15 +00:00
|
|
|
.page-footer {
|
2019-10-31 10:49:02 +00:00
|
|
|
margin-bottom: 1px;
|
2018-12-05 10:58:27 +00:00
|
|
|
}
|
|
|
|
|
|
2018-11-20 13:57:48 +00:00
|
|
|
.notification-status {
|
|
|
|
|
margin: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-05 17:47:25 +00:00
|
|
|
}
|
|
|
|
|
|
2018-11-13 14:08:06 +00:00
|
|
|
.content-fixed,
|
|
|
|
|
.content-fixed-onload {
|
2017-12-14 11:58:40 +00:00
|
|
|
|
2017-05-16 16:56:40 +01:00
|
|
|
position: fixed;
|
|
|
|
|
background: $white;
|
|
|
|
|
z-index: 100;
|
2020-02-21 13:21:44 +00:00
|
|
|
padding-right: govuk-spacing(3);
|
2019-01-08 17:30:46 +00:00
|
|
|
margin-top: 0;
|
2017-12-14 11:58:40 +00:00
|
|
|
|
|
|
|
|
.back-to-top-link {
|
|
|
|
|
opacity: 1;
|
|
|
|
|
transition: opacity 0.6s ease-in-out;
|
|
|
|
|
}
|
|
|
|
|
|
2017-05-16 16:56:40 +01:00
|
|
|
}
|
|
|
|
|
|
2018-11-13 14:08:06 +00:00
|
|
|
.js-stick-at-top-when-scrolling.content-fixed,
|
|
|
|
|
.js-stick-at-top-when-scrolling.content-fixed-onload {
|
2018-11-05 17:47:25 +00:00
|
|
|
|
|
|
|
|
top: 0;
|
|
|
|
|
margin-top: 0;
|
2019-01-18 11:44:59 +00:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.js-stick-at-top-when-scrolling.content-fixed__top {
|
|
|
|
|
|
2018-11-05 17:47:25 +00:00
|
|
|
border-bottom: 1px solid $border-colour;
|
|
|
|
|
box-shadow: 0 2px 0 0 rgba($border-colour, 0.2);
|
2018-11-13 14:08:06 +00:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.js-stick-at-top-when-scrolling.content-fixed {
|
|
|
|
|
|
2018-11-05 17:47:25 +00:00
|
|
|
transition: background 0.6s ease-in-out, margin-top 0.4s ease-out;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-13 14:08:06 +00:00
|
|
|
.js-stick-at-bottom-when-scrolling.content-fixed,
|
|
|
|
|
.js-stick-at-bottom-when-scrolling.content-fixed-onload {
|
2018-11-05 17:47:25 +00:00
|
|
|
|
|
|
|
|
top: auto; // cancel `top: 0;` inherited from govuk-template
|
|
|
|
|
bottom: 0;
|
2019-01-18 11:44:59 +00:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.js-stick-at-bottom-when-scrolling.content-fixed__bottom {
|
|
|
|
|
|
2018-11-05 17:47:25 +00:00
|
|
|
border-top: 1px solid $border-colour;
|
|
|
|
|
box-shadow: 0 -2px 0 0 rgba($border-colour, 0.2);
|
2018-11-13 14:08:06 +00:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.js-stick-at-bottom-when-scrolling.content-fixed {
|
|
|
|
|
|
2018-11-05 17:47:25 +00:00
|
|
|
transition: background 0.6s ease-in-out;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-13 14:08:06 +00:00
|
|
|
.js-stick-at-bottom-when-scrolling-loaded.content-fixed-onload {
|
|
|
|
|
|
|
|
|
|
transition: none;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2017-05-16 16:56:40 +01:00
|
|
|
.shim {
|
|
|
|
|
display: block;
|
2017-12-20 15:37:34 +00:00
|
|
|
margin-bottom: 5px;
|
2017-05-16 16:56:40 +01:00
|
|
|
}
|
2018-12-10 17:07:30 +00:00
|
|
|
|
|
|
|
|
.js-cancel {
|
|
|
|
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
padding: 10px 10px 5px 10px;
|
|
|
|
|
margin-top: -10px;
|
|
|
|
|
margin-right: -10px;
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
color: $govuk-blue;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
color: $link-hover-colour;
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-16 14:43:48 +01:00
|
|
|
&:focus {
|
|
|
|
|
/* override default box shadow to stop it looking so large vertically */
|
|
|
|
|
box-shadow: inset 0 -4px $govuk-focus-text-colour;
|
2018-12-10 17:07:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|