This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getScrollBarWidth() { | |
| const inner = document.createElement('p'); | |
| inner.style.width = "100%"; | |
| inner.style.height = "200px"; | |
| const outer = document.createElement('div'); | |
| outer.style.position = "absolute"; | |
| outer.style.top = "0px"; | |
| outer.style.left = "0px"; | |
| outer.style.visibility = "hidden"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var touchstartX = 0; | |
| var touchstartY = 0; | |
| var touchendX = 0; | |
| var touchendY = 0; | |
| var gesuredZone = document.getElementById('gesuredZone'); | |
| gesuredZone.addEventListener('touchstart', function(event) { | |
| touchstartX = event.screenX; | |
| touchstartY = event.screenY; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @mixin content-columns($columnCount, $columnGap: $gridGutterWidth) { | |
| -webkit-column-count: $columnCount; | |
| -moz-column-count: $columnCount; | |
| column-count: $columnCount; | |
| -webkit-column-gap: $columnGap; | |
| -moz-column-gap: $columnGap; | |
| column-gap: $columnGap; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function mobBrowser(name, arr) { | |
| var temp = new RegExp(name, "i"); | |
| return arr.map(function(br, i) { | |
| if (temp.test(br)) { | |
| let nav = br.split('/'); | |
| return { | |
| name: name, | |
| version: parseFloat(nav[1]) | |
| }; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @breakpoints: sm, md, lg; | |
| .for(@list, @code) { | |
| & { | |
| .loop(@i:1) when (@i =< length(@list)) { | |
| @value: extract(@list, @i); | |
| @code(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .columns(@count, @minwidth, @gap, @rule:~'medium none'){ | |
| -webkit-columns: ~'@{count} @{minwidth}'; | |
| -moz-columns: ~'@{count} @{minwidth}'; | |
| columns: ~'@{count} @{minwidth}'; | |
| -webkit-column-gap: @gap; | |
| -moz-column-gap: @gap; | |
| column-gap: @gap; | |
| -webkit-column-rule: @rule; | |
| -moz-column-rule: @rule; | |
| column-rule: @rule; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var BrowserDetect = { | |
| init: function () { | |
| this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; | |
| this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; | |
| this.OS = this.searchString(this.dataOS) || "an unknown OS"; | |
| }, | |
| searchString: function (data) { | |
| for (var i = 0; i < data.length; i++) { | |
| var dataString = data[i].string; | |
| var dataProp = data[i].prop; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .noselect { | |
| -webkit-touch-callout: none; | |
| -webkit-user-select: none; | |
| -khtml-user-select: none; | |
| -moz-user-select: none; | |
| -ms-user-select: none; | |
| user-select: none; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .table{ | |
| width: 200px; | |
| } | |
| .col-wided{ | |
| white-space: nowrap; | |
| } | |
| .col-thined{ | |
| width: 100%; | |
| min-width: 0; | |
| } |