Skip to content

Commit

Permalink
feat: add base form styles
Browse files Browse the repository at this point in the history
  • Loading branch information
RickEyre committed Apr 8, 2020
1 parent addb079 commit 3b2edf9
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/panda-san/src/form/form.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.form {
.input-group + &__button {
margin-top: px-to-rem($input-group-gap * 3);
}
}
3 changes: 3 additions & 0 deletions packages/panda-san/src/form/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import 'form';
@import 'input';
@import 'input-group';
7 changes: 7 additions & 0 deletions packages/panda-san/src/form/input-group.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.input-group {
width: 100%;

& + & {
margin-top: px-to-rem($input-group-gap);
}
};
26 changes: 26 additions & 0 deletions packages/panda-san/src/form/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.input {
@extend %base-font;
background-color: transparent;
border: 0;
border-bottom: solid px-to-rem(2px);
color: inherit;
padding: px-to-rem(12px) px-to-rem(4px);
width: 100%;

&::placeholder {
color: inherit;
}

&--select {
padding-left: 0;

option {
background-color: $white;
color: $black;
}
}

&--textarea {
min-height: px-to-rem(200px);
}
}
1 change: 1 addition & 0 deletions packages/panda-san/src/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import 'variables/index';
@import 'mixins/index';
@import 'core/index';
@import 'form/index';
@import 'layout/index';
@import 'navbar/index';
1 change: 1 addition & 0 deletions packages/panda-san/src/variables/form.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$input-group-gap: 12px;
1 change: 1 addition & 0 deletions packages/panda-san/src/variables/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
@import 'colors';
@import 'container';
@import 'font';
@import 'form';
@import 'stacks';

0 comments on commit 3b2edf9

Please sign in to comment.