Skip to content

Commit f7c0930

Browse files
author
Nikolaev Tomov
authored
Merge pull request #341 from dabapps/fields-spacing-variables
Add variables for custom form-group and label spacings
2 parents 5053049 + b2eb875 commit f7c0930

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dabapps/roe",
3-
"version": "0.11.2",
3+
"version": "0.11.3",
44
"description": "A collection of React components, styles, mixins, and atomic CSS classes to aid with the development of web applications.",
55
"main": "dist/js/index.js",
66
"types": "dist/js/index.d.ts",

src/less/inputs.less

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ textarea {
99

1010
.form-group {
1111
position: relative;
12-
margin-top: @margin-large;
13-
margin-bottom: @margin-large;
12+
margin-top: @form-group-margin;
13+
margin-bottom: @form-group-margin;
1414
min-height: @checkbox-size;
1515

1616
& > label,
@@ -125,7 +125,7 @@ textarea {
125125

126126
& > label:first-child,
127127
& > .label:first-child {
128-
margin-bottom: @margin-base;
128+
margin-bottom: @form-group-label-margin;
129129
}
130130
}
131131
}

src/less/variables.less

+3
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@
165165
@code-block-name-background: contrast(@code-block-background, darken(@code-block-background, 5%), lighten(@code-block-background, 5%)); // lesshint maxCharPerLine: false
166166
@code-block-border: @border-base;
167167

168+
@form-group-margin: @margin-large;
169+
@form-group-label-margin: @margin-base;
170+
168171
@input-group-addon-background: @grey-lightest;
169172

170173
@input-border: @border-dark;

src/ts/components/forms/form-group.examples.md

+3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@
5656
#### Less variables
5757

5858
```less
59+
@form-group-margin: @margin-large;
60+
@form-group-label-margin: @margin-base;
61+
5962
@input-border: @border-dark;
6063
@input-width: 200px;
6164
@input-height: 32px;

0 commit comments

Comments
 (0)