Skip to content

Commit b5d0dd7

Browse files
committed
tweaks to follow wordpress css cs
1 parent dfef09e commit b5d0dd7

File tree

4 files changed

+143
-133
lines changed

4 files changed

+143
-133
lines changed

LICENSE

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
MIT License
22

3-
Copyright (c) 2016 Garrett W.
3+
Copyright © Nicolas Gallagher and Jonathan Neal and John Albin Wilkins
4+
Copyright (c) 2016 Garrett Whitehorn
5+
46

57
Permission is hereby granted, free of charge, to any person obtaining a copy
68
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ![Vitals](https://raw.githubusercontent.com/garrettw/vitals/master/vitals-logo-b.png)
22

3-
A few tools for building modern, flexible websites.
3+
A few Sass tools for building modern, flexible websites.
44

55
The goal is to be compatible with the most common browsers and versions currently
66
in use. For example, older versions of IE (like 6-8) are intentionally not
@@ -45,6 +45,11 @@ resembled Bootstrap.
4545
I figured surely it wouldn't take much to adapt Batch into something that would
4646
allow better semantics. So that's what I've done here.
4747

48+
You'll notice that there's no compiled version of the grid system.
49+
That's intentional; my entire purpose for making it was for it to be used with
50+
Sass to generate grid code for semantic CSS selectors. That's just not possible
51+
with pure CSS. So if you want a pure CSS flexbox grid system, check out [Batch](http://martskin.github.io/batch/).
52+
4853
# Is that it?
4954

5055
Yes, for now. I think there are some existing projects that adequately address

scss/_grid.scss

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ $vg-border-color: #666 !default;
1212

1313
// Grid wrapper
1414
%vitals-grid {
15-
display: flex;
16-
align-items: stretch;
17-
flex-flow: row wrap;
15+
display: flex;
16+
flex-flow: row wrap;
17+
align-items: stretch;
1818
}
1919

2020
// Grid modifiers
@@ -23,58 +23,58 @@ $vg-border-color: #666 !default;
2323
}
2424

2525
@mixin vg-reverse {
26-
flex-direction: row-reverse;
26+
flex-direction: row-reverse;
2727
}
2828

2929
@mixin vg-valign-top {
30-
align-items: flex-start;
30+
align-items: flex-start;
3131
}
3232

3333
@mixin vg-valign-center {
34-
align-items: center;
34+
align-items: center;
3535
}
3636

3737
@mixin vg-valign-bottom {
38-
align-items: flex-end;
38+
align-items: flex-end;
3939
}
4040

4141
@mixin vg-align-left {
42-
justify-content: flex-start;
42+
justify-content: flex-start;
4343
}
4444

4545
@mixin vg-align-center {
46-
justify-content: center;
46+
justify-content: center;
4747
}
4848

4949
@mixin vg-align-right {
50-
justify-content: flex-end;
50+
justify-content: flex-end;
5151
}
5252

5353
// Cell setup/modifiers
5454
@mixin vg-cell($num, $denom, $gutter: false, $guttersize: $vg-gutter) {
55-
$cell-size-percentage: (percentage($num / $denom));
56-
flex: 1 0 auto; /* forces usage of min-width, width, max-width instead */
57-
58-
@if $gutter == true {
59-
margin: ($guttersize / 2);
60-
width: calc(#{$cell-size-percentage} - #{$guttersize});
61-
} @else {
62-
width: $cell-size-percentage;
63-
}
55+
$cell-size-percentage: (percentage($num / $denom));
56+
flex: 1 0 auto; /* forces usage of min-width, width, max-width instead */
57+
58+
@if $gutter == true {
59+
margin: ($guttersize / 2);
60+
width: calc(#{$cell-size-percentage} - #{$guttersize});
61+
} @else {
62+
width: $cell-size-percentage;
63+
}
6464
}
6565

6666
@mixin vg-cell-border($size: $vg-border, $color: $vg-border-color) {
67-
border: $size solid $color;
67+
border: $size solid $color;
6868
}
6969

7070
@mixin vg-cell-valign-top {
71-
align-self: flex-start;
71+
align-self: flex-start;
7272
}
7373

7474
@mixin vg-cell-valign-bottom {
75-
align-self: flex-end;
75+
align-self: flex-end;
7676
}
7777

7878
@mixin vg-cell-valign-center {
79-
align-self: center;
79+
align-self: center;
8080
}

0 commit comments

Comments
 (0)