Skip to content

Commit

Permalink
[tools][settings] replaced $ekzo-spacing-unit variables and its var…
Browse files Browse the repository at this point in the history
…iations with `ekzo-spacing()` function
  • Loading branch information
ArmorDarks committed Feb 29, 2016
1 parent f878624 commit b296784
Show file tree
Hide file tree
Showing 19 changed files with 166 additions and 153 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
- `$ekzo-bg` now expects everything normal for `background` property, except color, wich from now injected into `html` directly from `$ekzo-theme(base: ( bg-color: _value_ ) )`
- Updated `normalize.scss`, dropped some older normalizations. Currently it's based on v3.0.3 (head commit: https://github.com/necolas/normalize.css/commit/f41ef9b4918759dabc35599e014aaf3cfae3d8a1)
- `reset.scss` is now part of `normalize.scss`
- [BREAKING] replaced `$ekzo-spacing-unit` variable and its variations with `ekzo-spacing()` (`ekzo-spacing(.25)`, `ekzo-spacing(2)`, etc.) function
- [BREAKING] renamed `ekzo-font()` mixin to `ekzo-font-face()`
- [BREAKING] Renamed `_framework.scss` to `_index.scss` for better clarity
- [BREAKING] All classes by default namespaced by its type. For example: `o-grid` instead of `grid`
Expand Down
8 changes: 1 addition & 7 deletions _settings.framework.defaults.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,4 @@ $ekzo-helpers-ns: 'h-' !default;
// Spacing units
// ---------------------------------------

$ekzo-spacing-unit: $ekzo-line-height !default;

$ekzo-spacing-unit--quarter: $ekzo-spacing-unit / 4 !default;
$ekzo-spacing-unit--half: $ekzo-spacing-unit / 2 !default;
$ekzo-spacing-unit--double: $ekzo-spacing-unit * 2 !default;
$ekzo-spacing-unit--triple: $ekzo-spacing-unit * 3 !default;
$ekzo-spacing-unit--quad: $ekzo-spacing-unit * 3 !default;
$ekzo-spacing-unit: $ekzo-line-height !default;
2 changes: 1 addition & 1 deletion generic/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}


fieldset + fieldset { margin-top: $ekzo-spacing-unit--double; }
fieldset + fieldset { margin-top: ekzo-spacing(2); }


.#{$ekzo-ns}#{$ekzo-generics-ns}text-input,
Expand Down
10 changes: 5 additions & 5 deletions generic/_images.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ img[height] { max-width: none; }
.#{$ekzo-ns}#{$ekzo-generics-ns}image--right {
float: right;

margin-bottom: $ekzo-spacing-unit--half;
margin-left: $ekzo-spacing-unit;
margin-bottom: ekzo-spacing(.5);
margin-left: ekzo-spacing(1);
}

.#{$ekzo-ns}#{$ekzo-generics-ns}image--left {
float: left;

margin-right: $ekzo-spacing-unit;
margin-bottom: $ekzo-spacing-unit--half;
margin-right: ekzo-spacing(1);
margin-bottom: ekzo-spacing(.5);
}

.#{$ekzo-ns}#{$ekzo-generics-ns}image--center {
display: block;

margin-right: auto;
margin-left: auto;
margin-bottom: $ekzo-spacing-unit--half;
margin-bottom: ekzo-spacing(.5);
}
16 changes: 8 additions & 8 deletions generic/_lists.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ ol {
* Applies margin between ul's elements
*/

.#{$ekzo-ns}#{$ekzo-generics-ns}list--indent-- > li + li { margin-top: $ekzo-spacing-unit--quarter; }
.#{$ekzo-ns}#{$ekzo-generics-ns}list--indent- > li + li { margin-top: $ekzo-spacing-unit--half; }
.#{$ekzo-ns}#{$ekzo-generics-ns}list--indent > li + li { margin-top: $ekzo-spacing-unit; }
.#{$ekzo-ns}#{$ekzo-generics-ns}list--indent\+ > li + li { margin-top: $ekzo-spacing-unit--double; }
.#{$ekzo-ns}#{$ekzo-generics-ns}list--indent-- > li + li { margin-top: ekzo-spacing(.25); }
.#{$ekzo-ns}#{$ekzo-generics-ns}list--indent- > li + li { margin-top: ekzo-spacing(.5); }
.#{$ekzo-ns}#{$ekzo-generics-ns}list--indent > li + li { margin-top: ekzo-spacing(1); }
.#{$ekzo-ns}#{$ekzo-generics-ns}list--indent\+ > li + li { margin-top: ekzo-spacing(2); }
.#{$ekzo-ns}#{$ekzo-generics-ns}list--indent-flush > li + li { margin-top: 0; }

.#{$ekzo-ns}#{$ekzo-generics-ns}list--margin- > li { margin: $ekzo-spacing-unit--half; }
.#{$ekzo-ns}#{$ekzo-generics-ns}list--margin\+ > li { margin: $ekzo-spacing-unit--double; }
.#{$ekzo-ns}#{$ekzo-generics-ns}list--margin- > li { margin: ekzo-spacing(.5); }
.#{$ekzo-ns}#{$ekzo-generics-ns}list--margin\+ > li { margin: ekzo-spacing(2); }
.#{$ekzo-ns}#{$ekzo-generics-ns}list--margin--flush > li { margin: 0; }

.#{$ekzo-ns}#{$ekzo-generics-ns}list--padding- > li { padding: $ekzo-spacing-unit--half; }
.#{$ekzo-ns}#{$ekzo-generics-ns}list--padding\+ > li { padding: $ekzo-spacing-unit--double; }
.#{$ekzo-ns}#{$ekzo-generics-ns}list--padding- > li { padding: ekzo-spacing(.5); }
.#{$ekzo-ns}#{$ekzo-generics-ns}list--padding\+ > li { padding: ekzo-spacing(2); }
.#{$ekzo-ns}#{$ekzo-generics-ns}list--padding--flush > li { padding: 0; }


Expand Down
6 changes: 3 additions & 3 deletions generic/_shared.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fieldset, figure,
pre,
.#{$ekzo-ns}#{$ekzo-generics-ns}media,
.#{$ekzo-ns}#{$ekzo-generics-ns}flag,
.#{$ekzo-ns}#{$ekzo-generics-ns}island { margin-bottom: $ekzo-spacing-unit; }
.#{$ekzo-ns}#{$ekzo-generics-ns}island { margin-bottom: ekzo-spacing(1); }



Expand All @@ -32,7 +32,7 @@ pre,
* treatment regarding vertical rhythm.
*/

hr { margin-bottom: $ekzo-spacing-unit - 2px; }
hr { margin-bottom: ekzo-spacing(1) - 2px; }



Expand All @@ -43,4 +43,4 @@ hr { margin-bottom: $ekzo-spacing-unit - 2px; }

ul,
ol,
dd { padding-left: $ekzo-spacing-unit--double; }
dd { padding-left: ekzo-spacing(2); }
8 changes: 4 additions & 4 deletions generic/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,28 @@ table { width: 100%; }
.#{$ekzo-ns}#{$ekzo-generics-ns}table--padding--#{$postfix} {

th,
td { padding: $ekzo-spacing-unit--quarter; }
td { padding: ekzo-spacing(.25); }

}

.#{$ekzo-ns}#{$ekzo-generics-ns}table--padding-#{$postfix} {

th,
td { padding: $ekzo-spacing-unit--half; }
td { padding: ekzo-spacing(.5); }

}

.#{$ekzo-ns}#{$ekzo-generics-ns}table--padding#{$postfix} {

th,
td { padding: $ekzo-spacing-unit; }
td { padding: ekzo-spacing(1); }

}

.#{$ekzo-ns}#{$ekzo-generics-ns}table--padding\+#{$postfix} {

th,
td { padding: $ekzo-spacing-unit--double; }
td { padding: ekzo-spacing(2); }

}

Expand Down
Loading

0 comments on commit b296784

Please sign in to comment.