Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
9d4d6ef3
Commit
9d4d6ef3
authored
Apr 27, 2015
by
Mark Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stub out flexbox grid variation via -flex
parent
b9ed6185
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
3 deletions
+45
-3
scss/_grid.scss
scss/_grid.scss
+25
-0
scss/_variables.scss
scss/_variables.scss
+1
-0
scss/mixins/_grid-framework.scss
scss/mixins/_grid-framework.scss
+5
-1
scss/mixins/_grid.scss
scss/mixins/_grid.scss
+14
-2
No files found.
scss/_grid.scss
View file @
9d4d6ef3
...
@@ -44,3 +44,28 @@
...
@@ -44,3 +44,28 @@
@include
make-grid-columns
();
@include
make-grid-columns
();
// Flex column reordering
@if
$enable-flex
{
.col-xs-first
{
order
:
-1
;
}
.col-xs-last
{
order
:
1
;
}
@include
media-breakpoint-up
(
sm
)
{
.col-sm-first
{
order
:
-1
;
}
.col-sm-last
{
order
:
1
;
}
}
@include
media-breakpoint-up
(
md
)
{
.col-md-first
{
order
:
-1
;
}
.col-md-last
{
order
:
1
;
}
}
@include
media-breakpoint-up
(
lg
)
{
.col-lg-first
{
order
:
-1
;
}
.col-lg-last
{
order
:
1
;
}
}
@include
media-breakpoint-up
(
xl
)
{
.col-xl-first
{
order
:
-1
;
}
.col-xl-last
{
order
:
1
;
}
}
}
scss/_variables.scss
View file @
9d4d6ef3
...
@@ -37,6 +37,7 @@ $link-hover-decoration: underline !default;
...
@@ -37,6 +37,7 @@ $link-hover-decoration: underline !default;
//
//
// Quickly modify global styling by enabling or disabling features.
// Quickly modify global styling by enabling or disabling features.
$enable-flex
:
true
!
default
;
$enable-rounded
:
true
!
default
;
$enable-rounded
:
true
!
default
;
$enable-shadows
:
false
!
default
;
$enable-shadows
:
false
!
default
;
$enable-gradients
:
false
!
default
;
$enable-gradients
:
false
!
default
;
...
...
scss/mixins/_grid-framework.scss
View file @
9d4d6ef3
...
@@ -22,7 +22,11 @@
...
@@ -22,7 +22,11 @@
@include
media-breakpoint-up
(
$breakpoint
)
{
@include
media-breakpoint-up
(
$breakpoint
)
{
// Work around cross-media @extend (https://github.com/sass/sass/issues/1050)
// Work around cross-media @extend (https://github.com/sass/sass/issues/1050)
%grid-column-float-
#{
$breakpoint
}
{
%grid-column-float-
#{
$breakpoint
}
{
float
:
left
;
@if
$enable-flex
{
// Do nothing
}
@else
{
float
:
left
;
}
}
}
@for
$i
from
1
through
$columns
{
@for
$i
from
1
through
$columns
{
.col-
#{
$breakpoint
}
-
#{
$i
}
{
.col-
#{
$breakpoint
}
-
#{
$i
}
{
...
...
scss/mixins/_grid.scss
View file @
9d4d6ef3
...
@@ -11,6 +11,10 @@
...
@@ -11,6 +11,10 @@
}
}
@mixin
make-row
(
$gutter
:
$grid-gutter-width
)
{
@mixin
make-row
(
$gutter
:
$grid-gutter-width
)
{
@if
$enable-flex
{
display
:
flex
;
flex-wrap
:
wrap
;
}
margin-left
:
(
$gutter
/
-2
);
margin-left
:
(
$gutter
/
-2
);
margin-right
:
(
$gutter
/
-2
);
margin-right
:
(
$gutter
/
-2
);
@include
clearfix
();
@include
clearfix
();
...
@@ -18,14 +22,22 @@
...
@@ -18,14 +22,22 @@
@mixin
make-col
(
$gutter
:
$grid-gutter-width
)
{
@mixin
make-col
(
$gutter
:
$grid-gutter-width
)
{
position
:
relative
;
position
:
relative
;
float
:
left
;
@if
$enable-flex
{
// Do nothing
}
@else
{
float
:
left
;
}
min-height
:
1px
;
min-height
:
1px
;
padding-left
:
(
$gutter
/
2
);
padding-left
:
(
$gutter
/
2
);
padding-right
:
(
$gutter
/
2
);
padding-right
:
(
$gutter
/
2
);
}
}
@mixin
make-col-span
(
$size
,
$columns
:
$grid-columns
)
{
@mixin
make-col-span
(
$size
,
$columns
:
$grid-columns
)
{
width
:
percentage
(
$size
/
$columns
);
@if
$enable-flex
{
flex
:
0
0
percentage
(
$size
/
$columns
);
}
@else
{
width
:
percentage
(
$size
/
$columns
);
}
}
}
@mixin
make-col-offset
(
$size
,
$columns
:
$grid-columns
)
{
@mixin
make-col-offset
(
$size
,
$columns
:
$grid-columns
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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