Skip to content

Commit f355b4f

Browse files
author
AMJones
committed
Adds breakpoint-infix function.
1 parent a95c23b commit f355b4f

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"css"
1111
],
1212
"homepage": "https://www.github.com/strapless/base",
13-
"version": "1.1.8",
13+
"version": "1.1.9",
1414
"authors": [
1515
{
1616
"name": "Aaron M Jones",

scss/functions/_functions.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,22 @@
9797
}
9898

9999
// endregion //////////////////////////////////////////////////////////// End SVG String
100+
101+
// region /////////////////////////////////////////////////////////////// Other Functions
102+
103+
@function breakpoint-infix($bp) {
104+
@if variable-exists(grid-breakpoints) == false {
105+
@error 'You must set the $grid-breakpoints map prior to the first usage of the `breakpoint-infix` function.';
106+
}
107+
@if map-has-key($grid-breakpoints, $bp) {
108+
$min: strip-unit(map-get($grid-breakpoints, $bp));
109+
@if $min > 0 {
110+
@return -#{$bp};
111+
}
112+
}
113+
114+
@return null;
115+
}
116+
117+
// endregion //////////////////////////////////////////////////////////// End Other Functions
118+

0 commit comments

Comments
 (0)