Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
ac96ecbe
Commit
ac96ecbe
authored
7 years ago
by
Mark Otto
Browse files
Options
Download
Email Patches
Plain Diff
rearrange, add comments
parent
5da5a38f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scss/_functions.scss
+18
-8
scss/_functions.scss
with
18 additions
and
8 deletions
+18
-8
scss/_functions.scss
+
18
-
8
View file @
ac96ecbe
// Bootstrap functions
//
// Utility mixins and functions for evalutating source code across our variables, maps, and mixins.
// Ascending
// Used to evaluate Sass maps like our grid breakpoints.
@mixin
_assert-ascending
(
$map
,
$map-name
)
{
@mixin
_assert-ascending
(
$map
,
$map-name
)
{
$prev-key
:
null
;
$prev-key
:
null
;
$prev-num
:
null
;
$prev-num
:
null
;
...
@@ -14,7 +20,19 @@
...
@@ -14,7 +20,19 @@
}
}
}
}
// Starts at zero
// Another grid mixin that ensures the min-width of the lowest breakpoint starts at 0.
@mixin
_assert-starts-at-zero
(
$map
)
{
$values
:
map-values
(
$map
);
$first-value
:
nth
(
$values
,
1
);
@if
$first-value
!=
0
{
@warn
"First breakpoint in `$grid-breakpoints` must start at 0, but starts at
#{
$first-value
}
."
;
}
}
// Replace `$search` with `$replace` in `$string`
// Replace `$search` with `$replace` in `$string`
// Used on our SVG icon backgrounds for custom forms.
//
// @author Hugo Giraudel
// @author Hugo Giraudel
// @param {String} $string - Initial string
// @param {String} $string - Initial string
// @param {String} $search - Substring to replace
// @param {String} $search - Substring to replace
...
@@ -29,11 +47,3 @@
...
@@ -29,11 +47,3 @@
@return
$string
;
@return
$string
;
}
}
@mixin
_assert-starts-at-zero
(
$map
)
{
$values
:
map-values
(
$map
);
$first-value
:
nth
(
$values
,
1
);
@if
$first-value
!=
0
{
@warn
"First breakpoint in `$grid-breakpoints` must start at 0, but starts at
#{
$first-value
}
."
;
}
}
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
Menu
Explore
Projects
Groups
Snippets