Skip to content

Commit

Permalink
Merge pull request #341 from dabapps/fields-spacing-variables
Browse files Browse the repository at this point in the history
Add variables for custom form-group and label spacings
  • Loading branch information
Nikolaev Tomov authored Oct 7, 2020
2 parents 5053049 + b2eb875 commit f7c0930
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dabapps/roe",
"version": "0.11.2",
"version": "0.11.3",
"description": "A collection of React components, styles, mixins, and atomic CSS classes to aid with the development of web applications.",
"main": "dist/js/index.js",
"types": "dist/js/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions src/less/inputs.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ textarea {

.form-group {
position: relative;
margin-top: @margin-large;
margin-bottom: @margin-large;
margin-top: @form-group-margin;
margin-bottom: @form-group-margin;
min-height: @checkbox-size;

& > label,
Expand Down Expand Up @@ -125,7 +125,7 @@ textarea {

& > label:first-child,
& > .label:first-child {
margin-bottom: @margin-base;
margin-bottom: @form-group-label-margin;
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/less/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@
@code-block-name-background: contrast(@code-block-background, darken(@code-block-background, 5%), lighten(@code-block-background, 5%)); // lesshint maxCharPerLine: false
@code-block-border: @border-base;

@form-group-margin: @margin-large;
@form-group-label-margin: @margin-base;

@input-group-addon-background: @grey-lightest;

@input-border: @border-dark;
Expand Down
3 changes: 3 additions & 0 deletions src/ts/components/forms/form-group.examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
#### Less variables

```less
@form-group-margin: @margin-large;
@form-group-label-margin: @margin-base;

@input-border: @border-dark;
@input-width: 200px;
@input-height: 32px;
Expand Down

0 comments on commit f7c0930

Please sign in to comment.