Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

Commit

Permalink
Fix #163
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Joyce committed Dec 15, 2016
1 parent f7948e1 commit 7b7a76e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 97 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php /*
Title: Inline Field Group
Class: .field-group.field-group--inline
Title: Field Group Collapsed Widths
Class: .field-group.field-group--collapse
Description: see component/field-group.scss
*/ ?>

<div class="field-group field-group--inline">
<div class="field-group field-group--collapse">
<div class="field-group__field">
<input type="checkbox" id="is_subscribed" name="is_subscribed" value="1" class="checkbox">
</div>
Expand Down
12 changes: 12 additions & 0 deletions pattern/component/field-group/4-inline.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php /*
Title: Field Group Inline
Class: .field-group.field-group--inline
Description: Grids up at md, see component/field-group.scss
*/ ?>

<div class="field-group field-group--inline">
<label for="text" class="field-group__label required">Text Input</label>
<div class="field-group__field">
<input id="text" type="text" placeholder="Text Input">
</div>
</div>
80 changes: 0 additions & 80 deletions pattern/component/field-group/4-scaffold.php

This file was deleted.

24 changes: 10 additions & 14 deletions src/scss/component/_field-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,27 @@
&:first-child {
margin-top: 0;
}

&__label {
margin-bottom: spacing(xs) !important;
}
}


// =============================================
// Form field group scaffold
// Form field group inline
// =============================================

@include breakpoint(screen(sm)) {
.field-group--scaffold {
.field-group--inline {
@include flex;
flex-flow: wrap;
@include align-items(center);
max-width: screen(sm,max);

.field-group__label {
width: 25%;
max-width: 16em;
margin-bottom: 0;
}

.field-group__field {
Expand All @@ -44,19 +49,10 @@


// =============================================
// scaffold form
// =============================================

.scaffold-form .field-group:not(.field-group--inline) {
@extend .field-group--scaffold;
}


// =============================================
// Inline field group
// Collapse field group
// =============================================

.field-group--inline {
.field-group--collapse {
@include flex;
@include justify-content(flex-start);

Expand Down

0 comments on commit 7b7a76e

Please sign in to comment.