Skip to content

Commit 15a7606

Browse files
author
AMJones
committed
Updates dist files, version, dependencies.
1 parent 3767e16 commit 15a7606

File tree

5 files changed

+33
-8
lines changed

5 files changed

+33
-8
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/display",
13-
"version": "1.0.2",
13+
"version": "1.0.3",
1414
"authors": [
1515
{
1616
"name": "Aaron M Jones",

dist/css/strapless-display.css

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Strapless Display v1.0.2 (http://github.com/strapless/display)
2+
* Strapless Display v1.0.3 (http://github.com/strapless/display)
33
* Influenced by Bootstrap v4.0 (http://getbootstrap.com)
44
* Licensed under MIT (https://github.com/strapless/display/blob/master/LICENSE)
55
*/
@@ -72,6 +72,11 @@
7272
display: inline-block !important;
7373
}
7474

75+
body::before {
76+
content: "xs";
77+
display: none !important;
78+
}
79+
7580
.d-xs-none {
7681
display: none !important;
7782
}
@@ -109,6 +114,10 @@
109114
}
110115

111116
@media screen and (min-width: 576px) {
117+
body::before {
118+
content: "sm";
119+
display: none !important;
120+
}
112121
.d-sm-none {
113122
display: none !important;
114123
}
@@ -140,6 +149,10 @@
140149
}
141150

142151
@media screen and (min-width: 768px) {
152+
body::before {
153+
content: "md";
154+
display: none !important;
155+
}
143156
.d-md-none {
144157
display: none !important;
145158
}
@@ -171,6 +184,10 @@
171184
}
172185

173186
@media screen and (min-width: 992px) {
187+
body::before {
188+
content: "lg";
189+
display: none !important;
190+
}
174191
.d-lg-none {
175192
display: none !important;
176193
}
@@ -202,6 +219,10 @@
202219
}
203220

204221
@media screen and (min-width: 1200px) {
222+
body::before {
223+
content: "xl";
224+
display: none !important;
225+
}
205226
.d-xl-none {
206227
display: none !important;
207228
}

dist/css/strapless-display.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/strapless-display.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
/**
2-
* Determines which breakpoint is currently active.
2+
* Determines which breakpoint is currently active, either by querying for a psuedo element on the body
3+
* or by injecting an element with display classes.
34
*
45
* @returns {jQuery}
56
*/
67
jQuery.fn.extend( {
78
isBreakpoint: function ( points ) {
9+
var query = window.getComputedStyle(document.querySelector('body'), ':before').getPropertyValue('content') || null;
10+
if ( !points.constructor === Array ) { points = [ points ]; }
11+
if (null !== query) { return (points.indexOf(query) !== -1); }
812
var test = false;
913
var $body = $( 'body' );
1014
var cls = ' d-none d-sm-none d-md-none d-lg-none d-xl-none';
11-
if ( !points.constructor === Array ) { points = [ points ]; }
1215
$.each( points, function ( index, alias ) {
1316
if ( !$body.find( '.detect-' + alias ).length ) {
1417
var tCls = 'detect-' + alias + cls;

dist/js/strapless-display.min.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)