Skip to content

Commit e3daac3

Browse files
author
DNZ\darius
committed
Added g-float to replace deprecated grid-float.
Added g-equal-height to give children in grid items equal height.
1 parent e0e9a80 commit e3daac3

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "castlecss-core",
3-
"version": "2.3.1",
3+
"version": "2.4.0",
44
"description": "CastleCSS a SCSS framework with modular building blocks for the web",
55
"main": "index.js",
66
"scripts": {

sass/layout/grid.scss

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
padding: 0; list-style: none;
1616
margin-left: -$grid-gutter;
1717

18+
19+
1820
/* You can turn off flexbox by setting $flexbox-grid: 0; in the variables; */
1921
@if $flexbox-grid == true {
2022
display: flex;
@@ -23,7 +25,7 @@
2325
}
2426

2527
/* Clearfix for older browsers without flexbox */
26-
&:before, &:after {
28+
&:before, &:after {
2729
content: " ";
2830
visibility: hidden;
2931
display: block;
@@ -32,10 +34,32 @@
3234
}
3335

3436
/* Reset grid to floating */
37+
&-float {
38+
display: block;
39+
}
40+
41+
/* Make children of grid items equal height */
42+
&-equal-height {
43+
44+
> * {
45+
display: flex;
46+
47+
> * {
48+
flex: 1;
49+
50+
}
51+
}
52+
}
53+
/*
54+
DO NOT USE; Use g-float.
55+
Legacy class for reset grid to floating
56+
TODO: Remove in new major version
57+
*/
3558
&.grid-float {
3659
display: block;
3760
}
3861

62+
3963
&.dir-row { flex-direction: row; }
4064
&.dir-row-reverse { flex-direction: row-reverse; }
4165
&.dir-column { flex-direction: column; }

0 commit comments

Comments
 (0)