Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
afc9cae3
Commit
afc9cae3
authored
5 years ago
by
ysds
Committed by
XhmikosR
5 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Allow override default col width
parent
d0856779
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
scss/_grid.scss
+0
-10
scss/_grid.scss
scss/mixins/_grid-framework.scss
+7
-0
scss/mixins/_grid-framework.scss
scss/mixins/_grid.scss
+3
-2
scss/mixins/_grid.scss
site/docs/4.3/layout/grid.md
+14
-0
site/docs/4.3/layout/grid.md
with
24 additions
and
12 deletions
+24
-12
scss/_grid.scss
+
0
-
10
View file @
afc9cae3
...
@@ -46,16 +46,6 @@
...
@@ -46,16 +46,6 @@
@include
make-row
();
@include
make-row
();
}
}
@each
$breakpoint
in
map-keys
(
$grid-breakpoints
)
{
$infix
:
breakpoint-infix
(
$breakpoint
,
$grid-breakpoints
);
@for
$i
from
1
through
$grid-row-columns
{
.row-cols
#{
$infix
}
-
#{
$i
}
{
@include
row-cols
(
$i
);
}
}
}
// Remove the negative margin from default .row, then the horizontal padding
// Remove the negative margin from default .row, then the horizontal padding
// from all immediate children columns (to prevent runaway style inheritance).
// from all immediate children columns (to prevent runaway style inheritance).
.no-gutters
{
.no-gutters
{
...
...
This diff is collapsed.
Click to expand it.
scss/mixins/_grid-framework.scss
+
7
-
0
View file @
afc9cae3
...
@@ -33,6 +33,13 @@
...
@@ -33,6 +33,13 @@
flex-grow
:
1
;
flex-grow
:
1
;
max-width
:
100%
;
max-width
:
100%
;
}
}
@for
$i
from
1
through
$grid-row-columns
{
.row-cols
#{
$infix
}
-
#{
$i
}
{
@include
row-cols
(
$i
);
}
}
.col
#{
$infix
}
-auto
{
.col
#{
$infix
}
-auto
{
flex
:
0
0
auto
;
flex
:
0
0
auto
;
width
:
auto
;
width
:
auto
;
...
...
This diff is collapsed.
Click to expand it.
scss/mixins/_grid.scss
+
3
-
2
View file @
afc9cae3
...
@@ -56,7 +56,8 @@
...
@@ -56,7 +56,8 @@
// numberof columns. Supports wrapping to new lines, but does not do a Masonry
// numberof columns. Supports wrapping to new lines, but does not do a Masonry
// style grid.
// style grid.
@mixin
row-cols
(
$count
)
{
@mixin
row-cols
(
$count
)
{
&
>
[
class
^=
"col"
]
{
&
>
*
{
flex
:
0
0
calc
(
100%
/
#{
$count
}
);
flex
:
0
0
100%
/
$count
;
max-width
:
100%
/
$count
;
}
}
}
}
This diff is collapsed.
Click to expand it.
site/docs/4.3/layout/grid.md
+
14
-
0
View file @
afc9cae3
...
@@ -381,6 +381,20 @@ Use these row columns classes to quickly create basic grid layouts or to control
...
@@ -381,6 +381,20 @@ Use these row columns classes to quickly create basic grid layouts or to control
{% include example.html content=example %}
{% include example.html content=example %}
</div>
</div>
<div
class=
"bd-example-row"
>
{% capture example %}
<div
class=
"container"
>
<div
class=
"row row-cols-4"
>
<div
class=
"col"
>
Column
</div>
<div
class=
"col"
>
Column
</div>
<div
class=
"col-6"
>
Column
</div>
<div
class=
"col"
>
Column
</div>
</div>
</div>
{% endcapture %}
{% include example.html content=example %}
</div>
You can also use the accompanying Sass mixin,
`row-cols()`
:
You can also use the accompanying Sass mixin,
`row-cols()`
:
{% highlight scss %}
{% highlight scss %}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment