Skip to content

Instantly share code, notes, and snippets.

@basmiddelham
Created July 31, 2019 19:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save basmiddelham/01059dbd725a993c81c50d30c2cf9105 to your computer and use it in GitHub Desktop.
Save basmiddelham/01059dbd725a993c81c50d30c2cf9105 to your computer and use it in GitHub Desktop.
/* Newsletter form
* Single email field with submit button directly to the right
-------------------------------------------------------------- */
.gform_wrapper {
&.newsletter_wrapper {
.newsletter {
display: flex;
flex-wrap: wrap;
// Make header and validation span the form width
.gform_heading,
.validation_error {
width: 100%;
}
// Stretch email field
.gform_body {
flex: 1;
max-width: 240px;
// Make the consent text span boyond the submit button. 100px is an estimation of the button width.
.gfield:nth-child(2) {
margin-right: -120px;
width: calc(100% + 120px) !important;
}
}
// Give submit-button its own space.
.gform_footer {
flex: 0 1 auto;
.gform_button {
@extend .btn-lg;
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment