Skip to content

Commit

Permalink
Create global input variables and center all other valus around them
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Jun 18, 2015
1 parent 2f20aca commit 12b27c1
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 29 deletions.
1 change: 0 additions & 1 deletion src/themes/default/collections/form.variables
Expand Up @@ -28,7 +28,6 @@
@inputFont: @pageFont;
@inputWidth: 100%;
@inputFontSize: 1em;
@inputLineHeight: @defaultInputLineHeight;
@inputPadding: (@inputVerticalPadding + ((1em - @inputLineHeight) / 2)) @inputHorizontalPadding;
@inputBorder: 1px solid @borderColor;
@inputBorderRadius: @absoluteBorderRadius;
Expand Down
4 changes: 2 additions & 2 deletions src/themes/default/elements/input.variables
Expand Up @@ -10,13 +10,13 @@
@verticalPadding: @inputVerticalPadding;
@horizontalPadding: @inputHorizontalPadding;

@lineHeight: @defaultInputLineHeight;
@lineHeight: @inputLineHeight;
@lineHeightOffset: ((@lineHeight - 1em) / 2);

@padding: (@verticalPadding - @lineHeightOffset) @horizontalPadding;

@textAlign: left;
@background: #FFFFFF;
@background: @inputBackground;
@borderWidth: 1px;
@border: @borderWidth solid @borderColor;
@boxShadow: none;
Expand Down
12 changes: 6 additions & 6 deletions src/themes/default/globals/site.variables
Expand Up @@ -62,11 +62,11 @@
@headerFontWeight : bold;
@headerLineHeight : 1.2857em;

@h1 : 2rem;
@h2 : 1.714rem;
@h3 : 1.28rem;
@h4 : 1.071rem;
@h5 : 1rem;
@h1 : 2rem;
@h2 : 1.714rem;
@h3 : 1.28rem;
@h4 : 1.071rem;
@h5 : 1rem;

/*--------------
Form Input
Expand All @@ -79,7 +79,7 @@
@inputPadding : @inputVerticalPadding @inputHorizontalPadding;

/* Line Height Default For Inputs in Browser */
@defaultInputLineHeight: 1.2142em;
@inputLineHeight: 1.2142em;

/*-------------------
Sizes
Expand Down
42 changes: 25 additions & 17 deletions src/themes/default/modules/dropdown.variables
Expand Up @@ -118,15 +118,19 @@
/*-------------------
Types
--------------------*/
/* Selection */
@selectionMinWidth: 200px;
@selectionBorderEmWidth: @relative1px;
@selectionMinHeight: @defaultInputLineHeight + (@selectionVerticalPadding * 2) - @selectionBorderEmWidth;
@selectionBackground: @white;
@selectionDisplay: inline-block;

/*------------
Selection
--------------*/

@selectionMinWidth: 14em;
@selectionVerticalPadding: @inputVerticalPadding;
@selectionHorizontalPadding: @inputHorizontalPadding;
@selectionIconDistance: 2em;
@selectionBorderEmWidth: @relative1px;
@selectionMinHeight: @inputLineHeight + (@selectionVerticalPadding * 2) - @selectionBorderEmWidth;
@selectionBackground: @inputBackground;
@selectionDisplay: inline-block;
@selectionIconDistance: @inputHorizontalPadding + @glyphWidth + 0.5em;
@selectionPadding: @selectionVerticalPadding @selectionIconDistance @selectionVerticalPadding @selectionHorizontalPadding;
@selectionZIndex: 10;

Expand Down Expand Up @@ -185,7 +189,7 @@
@selectionHoverBorderColor: @selectedBorderColor;
@selectionHoverBoxShadow: none;

/* Hover */
/* Focus */
@selectionFocusBorderColor: @selectedBorderColor;
@selectionFocusBoxShadow: none;
@selectionFocusMenuBoxShadow: @raisedShadow;
Expand All @@ -206,11 +210,14 @@
@selectionVisibleConnectingBorder: 0em;
@selectionVisibleIconOpacity: 1;

/* Search */
/*--------------
Search
--------------*/

@searchMinWidth: '';

/* Search Selection */
@searchSelectionLineHeight: @defaultInputLineHeight;
@searchSelectionLineHeight: @inputLineHeight;
@searchSelectionLineHeightOffset: ((@searchSelectionLineHeight - 1em) / 2);
@searchSelectionVerticalPadding: (@selectionVerticalPadding - @searchSelectionLineHeightOffset);
@searchSelectionHorizontalPadding: @selectionHorizontalPadding;
Expand All @@ -229,7 +236,9 @@
@inlineMenuBorderRadius: @borderRadius;


/* Multiple */
/*--------------
Multiple
--------------*/

/* Split Actual Padding Between Child and Parent (allows for label spacing) */
@multipleSelectionVerticalPadding: (@searchSelectionVerticalPadding * (1/3));
Expand All @@ -239,8 +248,8 @@

/* Child Elements */
@multipleSelectionChildVerticalMargin: (@searchSelectionVerticalPadding * (2/3));
@multipleSelectionChildSpacing: @relative6px;
@multipleSelectionChildMargin: @multipleSelectionChildVerticalMargin 0em @multipleSelectionChildVerticalMargin @multipleSelectionChildSpacing;
@multipleSelectionChildLeftMargin: (@inputHorizontalPadding - @multipleSelectionLeftPadding);
@multipleSelectionChildMargin: @multipleSelectionChildVerticalMargin 0em @multipleSelectionChildVerticalMargin @multipleSelectionChildLeftMargin;
@multipleSelectionChildLineHeight: @searchSelectionLineHeight;
@multipleSelectionSearchStartWidth: (@glyphWidth * 2);

Expand All @@ -250,17 +259,16 @@

/* Selection Label */
@labelSize: @relativeMedium;
@labelHorizontalSpacing: @4px;
@labelVerticalSpacing: (@relative4px / 2);
@labelMargin: @labelVerticalSpacing @labelHorizontalSpacing @labelVerticalSpacing 0em;
@labelHorizontalMargin: @4px;
@labelVerticalMargin: (@relative6px / 2);
@labelMargin: @labelVerticalMargin @labelHorizontalMargin @labelVerticalMargin 0em;
@labelBorderWidth: 1px;
@labelBoxShadow: 0px 0px 0px @labelBorderWidth @borderColor inset;

@labelVerticalPadding: @relative5px;
@labelHorizontalPadding: @relativeMini;
@labelPadding: @labelVerticalPadding @labelHorizontalPadding;


/*-------------------
States
--------------------*/
Expand Down
6 changes: 3 additions & 3 deletions src/themes/default/modules/search.variables
Expand Up @@ -3,12 +3,12 @@
*******************************/

/* Search Prompt */
@promptFontSize: @relativeMedium;
@promptBackground: @inputBackground;
@promptVerticalPadding: @inputVerticalPadding;
@promptHorizontalPadding: @inputHorizontalPadding;
@promptLineHeight: @defaultInputLineHeight;
@promptLineHeight: @inputLineHeight;
@promptFontSize: @relativeMedium;
@promptPadding: (@promptVerticalPadding + ((1em - @promptLineHeight) / 2)) @promptHorizontalPadding;
@promptBackground: @white;
@promptBorder: 1px solid @borderColor;
@promptBorderRadius: @circularRadius;
@promptColor: @textColor;
Expand Down

0 comments on commit 12b27c1

Please sign in to comment.