mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Deal with focus state following cancelation
Follows pattern from dialogs whereby focus returns to the button/link that fired the dialog when it closes.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
// CSS adapted from
|
||||
// https://github.com/alphagov/govuk_frontend_toolkit/blob/d9489a987086471fe30b4b925a81c12cd198c91d/docs/javascript.md#stick-at-top-when-scrolling
|
||||
|
||||
$sticky-padding: $gutter * 2 / 3;
|
||||
|
||||
.js-stick-at-top-when-scrolling,
|
||||
.js-stick-at-bottom-when-scrolling {
|
||||
|
||||
@@ -44,11 +46,9 @@
|
||||
|
||||
.js-stick-at-bottom-when-scrolling {
|
||||
|
||||
$vertical-padding: $gutter * 2 / 3;
|
||||
|
||||
transition: bottom 0.1s ease-out, box-shadow 1s ease-in-out;
|
||||
padding: $vertical-padding 0 $vertical-padding $gutter-half;
|
||||
margin-top: -$vertical-padding;
|
||||
padding: $sticky-padding 0 $sticky-padding $gutter-half;
|
||||
margin-top: -$sticky-padding;
|
||||
|
||||
& + .js-stick-at-bottom-when-scrolling {
|
||||
margin-top: ($sticky-padding * 2) * -1;
|
||||
|
||||
Reference in New Issue
Block a user