Просмотр исходного кода

Merge pull request #16620 from overleaf/jel-sso-modal-notifications

[web] SSO form notifications

GitOrigin-RevId: 3b9ced2430434adb3a4fa093ad04c56648e95c43
Jessica Lawshe 2 лет назад
Родитель
Сommit
2d3b7c5846

+ 11 - 2
services/web/frontend/stylesheets/components/forms.less

@@ -187,9 +187,18 @@ input[type='date'] {
 //
 //
 // Designed to help with the organization and spacing of vertical forms. For
 // Designed to help with the organization and spacing of vertical forms. For
 // horizontal forms, use the predefined grid classes.
 // horizontal forms, use the predefined grid classes.
-
+@form-group-margin-bottom: 15px;
 .form-group {
 .form-group {
-  margin-bottom: 15px;
+  margin-bottom: @form-group-margin-bottom;
+}
+
+// Form alert
+//
+// adds top padding/mergin so that element has spacing when scrolled into
+// view, but no vertical spacing is applied to layout
+.form-group#form-alert {
+  padding-top: @form-group-margin-bottom;
+  margin-top: -@form-group-margin-bottom;
 }
 }
 
 
 // Checkboxes and radios
 // Checkboxes and radios

+ 2 - 0
services/web/test/frontend/bootstrap.js

@@ -134,3 +134,5 @@ globalThis.fetch =
 // ignore CSS files
 // ignore CSS files
 const { addHook } = require('pirates')
 const { addHook } = require('pirates')
 addHook(() => '', { exts: ['.css'], ignoreNodeModules: false })
 addHook(() => '', { exts: ['.css'], ignoreNodeModules: false })
+
+globalThis.HTMLElement.prototype.scrollIntoView = () => {}