Created
October 6, 2014 06:47
-
-
Save cfxd/b8736913b039bc083b0c to your computer and use it in GitHub Desktop.
Bootstrap 3 full width inline form for Contact Form 7 (only tested with 1 input field and 1 submit button)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* | |
* Bootstrap 3 inline form *full width* for CF7 | |
* | |
* In the shortcode, you must use html_id="my-id" | |
* or html_class="my-class" to target a specific form | |
* | |
* Actual form sample: | |
* <label for="your-email">Email:</label> | |
* [email* your-email 0/ placeholder "enter your email"] | |
* <span><button type="submit" class="wpcf7-form-control">Submit</button></span> | |
* | |
* Example 1 (affects targeted form class only): .my-form-class { &:extend(.cf7_inline_full all); } | |
* | |
* Example 2 (affects all Contact Form 7 forms): .wpcf7-form { &:extend(.cf7_inline_full all); } | |
* | |
*/ | |
.cf7_inline_full { | |
form& { | |
&:extend(.input-group); | |
} | |
.wpcf7-form-control-wrap { | |
> input { | |
&:extend(.input-group .form-control, .input-group .form-control:first-child); | |
.border-right-radius(@border-radius-base); | |
} | |
+ span { | |
&:extend(.input-group-btn); | |
vertical-align: bottom; | |
> button { | |
&:extend(.input-group-btn:last-child > .btn, .input-group-btn > .btn); | |
margin-left: 5px; | |
.border-left-radius(@border-radius-base); | |
} | |
} | |
} | |
label { | |
&:extend(.hidden); | |
@media (min-width: @grid-float-breakpoint) { | |
display: inline-block !important; | |
visibility: visible !important; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment