├── .babelrc ├── .bowerrc ├── .eslintrc ├── .gitignore ├── .jscsrc ├── .npmrc ├── .nvmrc ├── .stylelintrc ├── README.md ├── bower.json ├── docs └── scss │ ├── assets │ ├── css │ │ └── main.css │ └── js │ │ ├── main.js │ │ ├── main.min.js │ │ ├── search.js │ │ ├── sidebar.js │ │ └── vendor │ │ ├── fuse.min.js │ │ ├── jquery.min.js │ │ └── prism.min.js │ └── index.html ├── fonts └── .gitkeep ├── gulpfile.js ├── js └── global.js ├── package.json ├── src ├── components │ ├── bourbon │ │ ├── .bower.json │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── app │ │ │ └── assets │ │ │ │ └── stylesheets │ │ │ │ ├── _bourbon-deprecated-upcoming.scss │ │ │ │ ├── _bourbon.scss │ │ │ │ ├── addons │ │ │ │ ├── _border-color.scss │ │ │ │ ├── _border-radius.scss │ │ │ │ ├── _border-style.scss │ │ │ │ ├── _border-width.scss │ │ │ │ ├── _buttons.scss │ │ │ │ ├── _clearfix.scss │ │ │ │ ├── _ellipsis.scss │ │ │ │ ├── _font-stacks.scss │ │ │ │ ├── _hide-text.scss │ │ │ │ ├── _margin.scss │ │ │ │ ├── _padding.scss │ │ │ │ ├── _position.scss │ │ │ │ ├── _prefixer.scss │ │ │ │ ├── _retina-image.scss │ │ │ │ ├── _size.scss │ │ │ │ ├── _text-inputs.scss │ │ │ │ ├── _timing-functions.scss │ │ │ │ ├── _triangle.scss │ │ │ │ └── _word-wrap.scss │ │ │ │ ├── css3 │ │ │ │ ├── _animation.scss │ │ │ │ ├── _appearance.scss │ │ │ │ ├── _backface-visibility.scss │ │ │ │ ├── _background-image.scss │ │ │ │ ├── _background.scss │ │ │ │ ├── _border-image.scss │ │ │ │ ├── _calc.scss │ │ │ │ ├── _columns.scss │ │ │ │ ├── _filter.scss │ │ │ │ ├── _flex-box.scss │ │ │ │ ├── _font-face.scss │ │ │ │ ├── _font-feature-settings.scss │ │ │ │ ├── _hidpi-media-query.scss │ │ │ │ ├── _hyphens.scss │ │ │ │ ├── _image-rendering.scss │ │ │ │ ├── _keyframes.scss │ │ │ │ ├── _linear-gradient.scss │ │ │ │ ├── _perspective.scss │ │ │ │ ├── _placeholder.scss │ │ │ │ ├── _radial-gradient.scss │ │ │ │ ├── _selection.scss │ │ │ │ ├── _text-decoration.scss │ │ │ │ ├── _transform.scss │ │ │ │ ├── _transition.scss │ │ │ │ └── _user-select.scss │ │ │ │ ├── functions │ │ │ │ ├── _assign-inputs.scss │ │ │ │ ├── _contains-falsy.scss │ │ │ │ ├── _contains.scss │ │ │ │ ├── _is-length.scss │ │ │ │ ├── _is-light.scss │ │ │ │ ├── _is-number.scss │ │ │ │ ├── _is-size.scss │ │ │ │ ├── _modular-scale.scss │ │ │ │ ├── _px-to-em.scss │ │ │ │ ├── _px-to-rem.scss │ │ │ │ ├── _shade.scss │ │ │ │ ├── _strip-units.scss │ │ │ │ ├── _tint.scss │ │ │ │ ├── _transition-property-name.scss │ │ │ │ └── _unpack.scss │ │ │ │ ├── helpers │ │ │ │ ├── _convert-units.scss │ │ │ │ ├── _directional-values.scss │ │ │ │ ├── _font-source-declaration.scss │ │ │ │ ├── _gradient-positions-parser.scss │ │ │ │ ├── _linear-angle-parser.scss │ │ │ │ ├── _linear-gradient-parser.scss │ │ │ │ ├── _linear-positions-parser.scss │ │ │ │ ├── _linear-side-corner-parser.scss │ │ │ │ ├── _radial-arg-parser.scss │ │ │ │ ├── _radial-gradient-parser.scss │ │ │ │ ├── _radial-positions-parser.scss │ │ │ │ ├── _render-gradients.scss │ │ │ │ ├── _shape-size-stripper.scss │ │ │ │ └── _str-to-num.scss │ │ │ │ └── settings │ │ │ │ ├── _asset-pipeline.scss │ │ │ │ ├── _prefixer.scss │ │ │ │ └── _px-to-em.scss │ │ └── bower.json │ ├── fontfaceobserver │ │ ├── .bower.json │ │ ├── .gitignore │ │ ├── Gruntfile.js │ │ ├── LICENSE │ │ ├── README.md │ │ ├── exports.js │ │ ├── externs.js │ │ ├── fontfaceobserver.js │ │ ├── fontfaceobserver.standalone.js │ │ ├── package.json │ │ ├── src │ │ │ ├── descriptors.js │ │ │ ├── observer.js │ │ │ └── ruler.js │ │ ├── test │ │ │ ├── assets │ │ │ │ ├── index.html │ │ │ │ ├── sourcesanspro-regular.eot │ │ │ │ ├── sourcesanspro-regular.woff │ │ │ │ ├── subset.eot │ │ │ │ └── subset.woff │ │ │ ├── deps.js │ │ │ ├── index.html │ │ │ ├── observer-test.js │ │ │ └── ruler-test.js │ │ └── vendor │ │ │ └── google │ │ │ └── base.js │ ├── inuit-normalize │ │ ├── .bower.json │ │ ├── README.md │ │ ├── _generic.normalize.scss │ │ ├── bower.json │ │ └── package.json │ ├── js-throttle-debounce │ │ ├── .bower.json │ │ ├── .covignore │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── bower.json │ │ ├── build │ │ │ └── js-throttle-debounce.min.js │ │ ├── package.json │ │ └── src │ │ │ └── js-throttle-debounce.js │ └── neat │ │ ├── .bower.json │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── app │ │ └── assets │ │ │ └── stylesheets │ │ │ ├── _neat-helpers.scss │ │ │ ├── _neat.scss │ │ │ ├── functions │ │ │ ├── _new-breakpoint.scss │ │ │ └── _private.scss │ │ │ ├── grid │ │ │ ├── _box-sizing.scss │ │ │ ├── _direction-context.scss │ │ │ ├── _display-context.scss │ │ │ ├── _fill-parent.scss │ │ │ ├── _media.scss │ │ │ ├── _omega.scss │ │ │ ├── _outer-container.scss │ │ │ ├── _pad.scss │ │ │ ├── _private.scss │ │ │ ├── _row.scss │ │ │ ├── _shift.scss │ │ │ ├── _span-columns.scss │ │ │ ├── _to-deprecate.scss │ │ │ └── _visual-grid.scss │ │ │ └── settings │ │ │ ├── _disable-warnings.scss │ │ │ ├── _grid.scss │ │ │ └── _visual-grid.scss │ │ ├── bower.json │ │ └── package.json ├── images │ ├── sprites │ │ └── .gitkeep │ └── template │ │ └── ie │ │ └── .gitkeep ├── js │ ├── es6 │ │ └── .gitkeep │ └── prototype │ │ ├── .gitkeep │ │ └── lib │ │ └── .gitkeep └── scss │ ├── _config.scss │ ├── _core.scss │ ├── _state.scss │ ├── application-ie9.scss │ ├── application.scss │ ├── base │ ├── _elements.scss │ └── _fonts.scss │ ├── layouts │ └── _layout.scss │ ├── pages │ ├── _account.scss │ ├── _cart.scss │ ├── _category.scss │ ├── _checkout.scss │ ├── _product-listing.scss │ ├── _product.scss │ └── _search-results.scss │ ├── utils │ ├── animations │ │ └── .gitkeep │ ├── functions │ │ └── .gitkeep │ ├── mixins │ │ ├── _before-ie-10.scss │ │ ├── _before-ie-9.scss │ │ ├── _breakpoint.scss │ │ └── _rem.scss │ └── placeholders │ │ ├── .gitkeep │ │ └── _accessible-hide.scss │ └── vendor │ └── .gitkeep └── theme-requirements.md /.babelrc: -------------------------------------------------------------------------------- 1 | { "presets": ["es2015"] } 2 | -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory" : "src/components" 3 | } -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "ecmaVersion": 6 4 | }, 5 | 6 | "rules": { 7 | "indent": 2, 8 | "brace-style": [2, "1tbs"], 9 | "comma-style": [2, "last"], 10 | "default-case": 2, 11 | "func-style": [2, "declaration"], 12 | "guard-for-in": 2, 13 | "no-floating-decimal": 2, 14 | "no-nested-ternary": 2, 15 | "no-undefined": 2, 16 | "quotes": [2, 'single'], 17 | "radix": 2, 18 | "keyword-spacing": [2], 19 | "space-before-blocks": 2, 20 | "spaced-comment": [2, "always", { exceptions: ["-"]}], 21 | "strict": [2, "global"], 22 | "valid-jsdoc": [2, { prefer: { "return": "returns"}}], 23 | "wrap-iife": [2, "inside"] 24 | } 25 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/* 2 | *.sass-cache/ 3 | *.idea 4 | *.DS_Store 5 | npm-debug.log -------------------------------------------------------------------------------- /.jscsrc: -------------------------------------------------------------------------------- 1 | { 2 | } -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 5.1.0 2 | -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "color-no-invalid-hex": true, 4 | "color-hex-case": "lower", 5 | "color-hex-length": "short", 6 | "function-calc-no-unspaced-operator": true, 7 | "declaration-colon-space-after": "always", 8 | "declaration-colon-space-before": "never", 9 | "function-url-quotes": "single", 10 | "function-whitespace-after": "always", 11 | "number-leading-zero": "never", 12 | "number-no-trailing-zeros": true, 13 | "number-zero-length-no-unit": true, 14 | "custom-property-no-outside-root": true, 15 | "declaration-bang-space-after": "never", 16 | "declaration-bang-space-before": "always", 17 | "declaration-block-no-single-line": true, 18 | "declaration-block-semicolon-newline-after": "always", 19 | "declaration-block-single-line-max-declarations": 1, 20 | "block-closing-brace-newline-after": "always", 21 | "block-closing-brace-newline-before": "always-multi-line", 22 | "block-opening-brace-newline-after": "always", 23 | "selector-combinator-space-after": "always", 24 | "selector-combinator-space-before": "always", 25 | "selector-list-comma-newline-after": "always", 26 | "rule-no-duplicate-properties": true, 27 | "rule-properties-order": "alphabetical", 28 | "rule-trailing-semicolon": "always", 29 | "at-rule-no-vendor-prefix": true, 30 | "comment-whitespace-inside": "always", 31 | "no-missing-eof-newline": true, 32 | "block-no-empty": true, 33 | "max-empty-lines": 2, 34 | "indentation": [4, { 35 | "except": ["value"] 36 | } 37 | ] 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontendBuildTools", 3 | "version": "0.0.0", 4 | "homepage": "https://github.com/meanbee/magento-boilerplate-fe-build-tools", 5 | "authors": [ 6 | "Darren Belding " 7 | ], 8 | "license": "MIT", 9 | "private": true, 10 | "ignore": [ 11 | "**/.*", 12 | "node_modules", 13 | "bower_components", 14 | "test", 15 | "tests" 16 | ], 17 | "devDependencies": { 18 | "neat": "~1.7.2", 19 | "bourbon": "~4.2.1", 20 | "inuit-normalize": "~3.0.2", 21 | "fontfaceobserver": "~1.4.9", 22 | "js-throttle-debounce": "~0.1.1" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /docs/scss/assets/js/main.js: -------------------------------------------------------------------------------- 1 | /* global document */ 2 | 3 | (function ($, global) { 4 | 'use strict'; 5 | 6 | // Constructor 7 | var App = function (conf) { 8 | this.conf = $.extend({ 9 | // Search module 10 | search: new global.Search(), 11 | 12 | // Sidebar module 13 | sidebar: new global.Sidebar(), 14 | 15 | // Initialisation 16 | init: true 17 | }, conf || {}); 18 | 19 | // Launch the module 20 | if (this.conf.init !== false) { 21 | this.initialize(); 22 | } 23 | }; 24 | 25 | // Initialisation method 26 | App.prototype.initialize = function () { 27 | this.codePreview(); 28 | }; 29 | 30 | // Toggle code preview collapsed/expanded modes 31 | App.prototype.codePreview = function () { 32 | var $item; 33 | var $code; 34 | var switchTo; 35 | 36 | $('.item__code--togglable').on('click', function () { 37 | $item = $(this); 38 | $code = $item.find('code'); 39 | switchTo = $item.attr('data-current-state') === 'expanded' ? 'collapsed' : 'expanded'; 40 | 41 | $item.attr('data-current-state', switchTo); 42 | $code.html($item.attr('data-' + switchTo)); 43 | Prism.highlightElement($code[0]); 44 | }); 45 | }; 46 | 47 | global.App = App; 48 | }(window.jQuery, window)); 49 | 50 | (function ($, global) { 51 | 52 | $(document).ready(function () { 53 | var app = new global.App(); 54 | }); 55 | 56 | }(window.jQuery, window)); -------------------------------------------------------------------------------- /docs/scss/assets/js/search.js: -------------------------------------------------------------------------------- 1 | (function ($, global) { 2 | 3 | var Search = function (conf) { 4 | this.conf = $.extend({ 5 | // Search DOM 6 | search: { 7 | items: '.sassdoc__item', 8 | input: '#js-search-input', 9 | form: '#js-search', 10 | suggestionsWrapper: '#js-search-suggestions' 11 | }, 12 | 13 | // Fuse options 14 | fuse: { 15 | keys: ['name'], 16 | threshold: 0.3 17 | }, 18 | 19 | init: true 20 | }, conf || {}); 21 | 22 | if (this.conf.init === true) { 23 | this.initialize(); 24 | } 25 | }; 26 | 27 | Search.prototype.initialize = function () { 28 | // Fuse engine instanciation 29 | this.index = new Fuse($.map($(this.conf.search.items), function (item) { 30 | var $item = $(item); 31 | 32 | return { 33 | name: $item.data('name'), 34 | type: $item.data('type'), 35 | node: $item 36 | }; 37 | }), this.conf.fuse); 38 | 39 | this.initializeSearch(); 40 | }; 41 | 42 | // Fill DOM with search suggestions 43 | Search.prototype.fillSuggestions = function (items) { 44 | var searchSuggestions = $(this.conf.search.suggestionsWrapper); 45 | searchSuggestions.html(''); 46 | 47 | var suggestions = $.map(items.slice(0, 10), function (item) { 48 | var $li = $('
  • ', { 49 | 'data-type': item.type, 50 | 'data-name': item.name, 51 | 'html': '' + item.type.slice(0, 3) + ' ' + item.name + '' 52 | }); 53 | 54 | searchSuggestions.append($li); 55 | return $li; 56 | }); 57 | 58 | return suggestions; 59 | }; 60 | 61 | // Perform a search on a given term 62 | Search.prototype.search = function (term) { 63 | return this.fillSuggestions(this.index.search(term)); 64 | }; 65 | 66 | // Search logic 67 | Search.prototype.initializeSearch = function () { 68 | var searchForm = $(this.conf.search.form); 69 | var searchInput = $(this.conf.search.input); 70 | var searchSuggestions = $(this.conf.search.suggestionsWrapper); 71 | 72 | var currentSelection = -1; 73 | var suggestions = []; 74 | var selected; 75 | 76 | var self = this; 77 | 78 | // Clicking on a suggestion 79 | searchSuggestions.on('click', function (e) { 80 | var target = $(event.target); 81 | 82 | if (target.nodeName === 'A') { 83 | searchInput.val(target.parent().data('name')); 84 | suggestions = self.fillSuggestions([]); 85 | } 86 | }); 87 | 88 | // Filling the form 89 | searchForm.on('keyup', function (e) { 90 | e.preventDefault(); 91 | 92 | // Enter 93 | if (e.keyCode === 13) { 94 | if (selected) { 95 | suggestions = self.fillSuggestions([]); 96 | searchInput.val(selected.data('name')); 97 | window.location = selected.children().first().attr('href'); 98 | } 99 | 100 | e.stopPropagation(); 101 | } 102 | 103 | // KeyDown 104 | if (e.keyCode === 40) { 105 | currentSelection = (currentSelection + 1) % suggestions.length; 106 | } 107 | 108 | // KeyUp 109 | if (e.keyCode === 38) { 110 | currentSelection = currentSelection - 1; 111 | 112 | if (currentSelection < 0) { 113 | currentSelection = suggestions.length - 1; 114 | } 115 | } 116 | 117 | if (suggestions[currentSelection]) { 118 | if (selected) { 119 | selected.removeClass('selected'); 120 | } 121 | 122 | selected = suggestions[currentSelection]; 123 | selected.addClass('selected'); 124 | } 125 | 126 | }); 127 | 128 | searchInput.on('keyup', function (e) { 129 | if (e.keyCode !== 40 && e.keyCode !== 38) { 130 | currentSelection = -1; 131 | suggestions = self.search($(this).val()); 132 | } 133 | 134 | else { 135 | e.preventDefault(); 136 | } 137 | }).on('search', function () { 138 | suggestions = self.search($(this).val()); 139 | }); 140 | }; 141 | 142 | global.Search = Search; 143 | 144 | }(window.jQuery, window)); -------------------------------------------------------------------------------- /docs/scss/assets/js/sidebar.js: -------------------------------------------------------------------------------- 1 | (function ($, global) { 2 | 3 | var Sidebar = function (conf) { 4 | this.conf = $.extend({ 5 | 6 | // Collapsed class 7 | collapsedClass: 'is-collapsed', 8 | 9 | // Storage key 10 | storageKey: '_sassdoc_sidebar_index', 11 | 12 | // Index attribute 13 | indexAttribute: 'data-slug', 14 | 15 | // Toggle button 16 | toggleBtn: '.js-btn-toggle', 17 | 18 | // Automatic initialization 19 | init: true 20 | }, conf || {}); 21 | 22 | if (this.conf.init === true) { 23 | this.initialize(); 24 | } 25 | }; 26 | 27 | /** 28 | * Initialize module 29 | */ 30 | Sidebar.prototype.initialize = function () { 31 | this.conf.nodes = $('[' + this.conf.indexAttribute + ']'); 32 | 33 | this.load(); 34 | this.updateDOM(); 35 | this.bind(); 36 | }; 37 | 38 | /** 39 | * Load data from storage or create fresh index 40 | */ 41 | Sidebar.prototype.load = function () { 42 | var index = 'localStorage' in global ? 43 | global.localStorage.getItem(this.conf.storageKey) : 44 | null; 45 | 46 | this.index = index ? JSON.parse(index) : this.buildIndex(); 47 | }; 48 | 49 | /** 50 | * Build a fresh index 51 | */ 52 | Sidebar.prototype.buildIndex = function () { 53 | var index = {}; 54 | var $item; 55 | 56 | this.conf.nodes.each($.proxy(function (index, item) { 57 | $item = $(item); 58 | 59 | index[$item.attr(this.conf.indexAttribute)] = !$item.hasClass(this.conf.collapsedClass); 60 | }, this)); 61 | 62 | return index; 63 | }; 64 | 65 | /** 66 | * Update DOM based on index 67 | */ 68 | Sidebar.prototype.updateDOM = function () { 69 | var item; 70 | 71 | for (item in this.index) { 72 | if (this.index[item] === false) { 73 | $('[' + this.conf.indexAttribute + '="' + item + '"]').addClass(this.conf.collapsedClass); 74 | } 75 | } 76 | }; 77 | 78 | /** 79 | * Save index in storage 80 | */ 81 | Sidebar.prototype.save = function () { 82 | if (!('localStorage' in global)) { 83 | return; 84 | } 85 | 86 | global.localStorage.setItem(this.conf.storageKey, JSON.stringify(this.index)); 87 | }; 88 | 89 | /** 90 | * Bind UI events 91 | */ 92 | Sidebar.prototype.bind = function () { 93 | var $item, slug, fn, text; 94 | var collapsed = false; 95 | 96 | // Save index in localStorage 97 | global.onbeforeunload = $.proxy(function () { 98 | this.save(); 99 | }, this); 100 | 101 | // Toggle all 102 | $(this.conf.toggleBtn).on('click', $.proxy(function (event) { 103 | $node = $(event.target); 104 | 105 | text = $node.attr('data-alt'); 106 | $node.attr('data-alt', $node.text()); 107 | $node.text(text); 108 | 109 | fn = collapsed === true ? 'removeClass' : 'addClass'; 110 | 111 | this.conf.nodes.each($.proxy(function (index, item) { 112 | $item = $(item); 113 | slug = $item.attr(this.conf.indexAttribute); 114 | 115 | this.index[slug] = collapsed; 116 | 117 | $('[' + this.conf.indexAttribute + '="' + slug + '"]')[fn](this.conf.collapsedClass); 118 | }, this)); 119 | 120 | collapsed = !collapsed; 121 | this.save(); 122 | }, this)); 123 | 124 | // Toggle item 125 | this.conf.nodes.on('click', $.proxy(function (event) { 126 | $item = $(event.target); 127 | slug = $item.attr(this.conf.indexAttribute); 128 | 129 | // Update index 130 | this.index[slug] = !this.index[slug]; 131 | 132 | // Update DOM 133 | $item.toggleClass(this.conf.collapsedClass); 134 | }, this)); 135 | }; 136 | 137 | global.Sidebar = Sidebar; 138 | 139 | }(window.jQuery, window)); 140 | -------------------------------------------------------------------------------- /docs/scss/assets/js/vendor/fuse.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Fuse - Lightweight fuzzy-search 4 | * 5 | * Copyright (c) 2012 Kirollos Risk . 6 | * All Rights Reserved. Apache Software License 2.0 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | !function(t){function e(t,n){this.list=t,this.options=n=n||{};var i,o,s;for(i=0,keys=["sort","includeScore","shouldSort"],o=keys.length;o>i;i++)s=keys[i],this.options[s]=s in n?n[s]:e.defaultOptions[s];for(i=0,keys=["searchFn","sortFn","keys","getFn"],o=keys.length;o>i;i++)s=keys[i],this.options[s]=n[s]||e.defaultOptions[s]}var n=function(t,e){if(e=e||{},this.options=e,this.options.location=e.location||n.defaultOptions.location,this.options.distance="distance"in e?e.distance:n.defaultOptions.distance,this.options.threshold="threshold"in e?e.threshold:n.defaultOptions.threshold,this.options.maxPatternLength=e.maxPatternLength||n.defaultOptions.maxPatternLength,this.pattern=e.caseSensitive?t:t.toLowerCase(),this.patternLen=t.length,this.patternLen>this.options.maxPatternLength)throw new Error("Pattern length is too long");this.matchmask=1<i;)this._bitapScore(e,l+o)<=u?i=o:d=o,o=Math.floor((d-i)/2+i);for(d=o,s=Math.max(1,l-o+1),r=Math.min(l+o,c)+this.patternLen,a=Array(r+2),a[r+1]=(1<=s;n--)if(p=this.patternAlphabet[t.charAt(n-1)],a[n]=0===e?(a[n+1]<<1|1)&p:(a[n+1]<<1|1)&p|((h[n+1]|h[n])<<1|1)|h[n+1],a[n]&this.matchmask&&(g=this._bitapScore(e,n-1),u>=g)){if(u=g,f=n-1,m.push(f),!(f>l))break;s=Math.max(1,2*l-f)}if(this._bitapScore(e+1,l)>u)break;h=a}return{isMatch:f>=0,score:g}};var i={deepValue:function(t,e){for(var n=0,e=e.split("."),i=e.length;i>n;n++){if(!t)return null;t=t[e[n]]}return t}};e.defaultOptions={id:null,caseSensitive:!1,includeScore:!1,shouldSort:!0,searchFn:n,sortFn:function(t,e){return t.score-e.score},getFn:i.deepValue,keys:[]},e.prototype.search=function(t){var e,n,o,s,r,a=new this.options.searchFn(t,this.options),h=this.list,p=h.length,c=this.options,l=this.options.keys,u=l.length,f=[],d={},g=[],m=function(t,e,n){void 0!==t&&null!==t&&"string"==typeof t&&(s=a.search(t),s.isMatch&&(r=d[n],r?r.score=Math.min(r.score,s.score):(d[n]={item:e,score:s.score},f.push(d[n]))))};if("string"==typeof h[0])for(var e=0;p>e;e++)m(h[e],e,e);else for(var e=0;p>e;e++)for(o=h[e],n=0;u>n;n++)m(this.options.getFn(o,l[n]),o,e);c.shouldSort&&f.sort(c.sortFn);for(var y=c.includeScore?function(t){return f[t]}:function(t){return f[t].item},L=c.id?function(t){return i.deepValue(y(t),c.id)}:function(t){return y(t)},e=0,v=f.length;v>e;e++)g.push(L(e));return g},"object"==typeof exports?module.exports=e:"function"==typeof define&&define.amd?define(function(){return e}):t.Fuse=e}(this); -------------------------------------------------------------------------------- /fonts/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/fonts/.gitkeep -------------------------------------------------------------------------------- /js/global.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/js/global.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontendBuildTools", 3 | "version": "1.0.0", 4 | "description": "Frontend Build tools for the Modular Magento Boilerplate", 5 | "main": "gulpfile.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "Darren Belding", 10 | "license": "ISC", 11 | "devDependencies": { 12 | "babel-preset-es2015": "^6.5.0", 13 | "browser-sync": "^2.7.1", 14 | "gulp": "^3.9.0", 15 | "gulp-autoprefixer": "^3.1.0", 16 | "gulp-babel": "^6.1.2", 17 | "gulp-changed": "^1.1.0", 18 | "gulp-eslint": "^2.0.0", 19 | "gulp-imagemin": "^2.0.0", 20 | "gulp-jscs": "^3.0.2", 21 | "gulp-load-plugins": "^1.1.0", 22 | "gulp-plumber": "^1.0.1", 23 | "gulp-postcss": "^6.1.0", 24 | "gulp-sass": "^2.1.0", 25 | "gulp-size": "^2.0.0", 26 | "gulp-sourcemaps": "^1.6.0", 27 | "gulp-util": "^3.0.1", 28 | "gulp.spritesmith": "^6.0.0", 29 | "imagemin-pngquant": "^4.0.0", 30 | "merge-stream": "^1.0.0", 31 | "postcss-scss": "^0.1.5", 32 | "run-sequence": "^1.0.2", 33 | "sassdoc": "^2.1.16", 34 | "stylelint": "^4.3.5" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/components/bourbon/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bourbon", 3 | "description": "A simple and lightweight mixin library for Sass.", 4 | "version": "4.2.1", 5 | "main": "app/assets/stylesheets/_bourbon.scss", 6 | "license": "MIT", 7 | "ignore": [ 8 | "**/.*", 9 | "CONTRIBUTING.md", 10 | "Gemfile", 11 | "Gemfile.lock", 12 | "Rakefile", 13 | "_site", 14 | "bin", 15 | "bourbon.gemspec", 16 | "features", 17 | "lib", 18 | "package.json", 19 | "sache.json", 20 | "spec" 21 | ], 22 | "keywords": [ 23 | "css", 24 | "mixins", 25 | "sass", 26 | "scss" 27 | ], 28 | "authors": [ 29 | "thoughtbot (http://thoughtbot.com)" 30 | ], 31 | "homepage": "http://bourbon.io", 32 | "repository": { 33 | "type": "git", 34 | "url": "https://github.com/thoughtbot/bourbon.git" 35 | }, 36 | "_release": "4.2.1", 37 | "_resolution": { 38 | "type": "version", 39 | "tag": "v4.2.1", 40 | "commit": "d274f7980d7b34c6e5ba197a658e2024f5f41156" 41 | }, 42 | "_source": "git://github.com/thoughtbot/bourbon.git", 43 | "_target": ">=4.0", 44 | "_originalSource": "bourbon" 45 | } -------------------------------------------------------------------------------- /src/components/bourbon/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright © 2011–2015 [thoughtbot, inc.](http://thoughtbot.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the “Software”), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/_bourbon.scss: -------------------------------------------------------------------------------- 1 | // Bourbon 4.2.1 2 | // http://bourbon.io 3 | // Copyright 2011-2015 thoughtbot, inc. 4 | // MIT License 5 | 6 | @import "settings/prefixer"; 7 | @import "settings/px-to-em"; 8 | @import "settings/asset-pipeline"; 9 | 10 | @import "functions/assign-inputs"; 11 | @import "functions/contains"; 12 | @import "functions/contains-falsy"; 13 | @import "functions/is-length"; 14 | @import "functions/is-light"; 15 | @import "functions/is-number"; 16 | @import "functions/is-size"; 17 | @import "functions/px-to-em"; 18 | @import "functions/px-to-rem"; 19 | @import "functions/shade"; 20 | @import "functions/strip-units"; 21 | @import "functions/tint"; 22 | @import "functions/transition-property-name"; 23 | @import "functions/unpack"; 24 | @import "functions/modular-scale"; 25 | 26 | @import "helpers/convert-units"; 27 | @import "helpers/directional-values"; 28 | @import "helpers/font-source-declaration"; 29 | @import "helpers/gradient-positions-parser"; 30 | @import "helpers/linear-angle-parser"; 31 | @import "helpers/linear-gradient-parser"; 32 | @import "helpers/linear-positions-parser"; 33 | @import "helpers/linear-side-corner-parser"; 34 | @import "helpers/radial-arg-parser"; 35 | @import "helpers/radial-positions-parser"; 36 | @import "helpers/radial-gradient-parser"; 37 | @import "helpers/render-gradients"; 38 | @import "helpers/shape-size-stripper"; 39 | @import "helpers/str-to-num"; 40 | 41 | @import "css3/animation"; 42 | @import "css3/appearance"; 43 | @import "css3/backface-visibility"; 44 | @import "css3/background"; 45 | @import "css3/background-image"; 46 | @import "css3/border-image"; 47 | @import "css3/calc"; 48 | @import "css3/columns"; 49 | @import "css3/filter"; 50 | @import "css3/flex-box"; 51 | @import "css3/font-face"; 52 | @import "css3/font-feature-settings"; 53 | @import "css3/hidpi-media-query"; 54 | @import "css3/hyphens"; 55 | @import "css3/image-rendering"; 56 | @import "css3/keyframes"; 57 | @import "css3/linear-gradient"; 58 | @import "css3/perspective"; 59 | @import "css3/placeholder"; 60 | @import "css3/radial-gradient"; 61 | @import "css3/selection"; 62 | @import "css3/text-decoration"; 63 | @import "css3/transform"; 64 | @import "css3/transition"; 65 | @import "css3/user-select"; 66 | 67 | @import "addons/border-color"; 68 | @import "addons/border-radius"; 69 | @import "addons/border-style"; 70 | @import "addons/border-width"; 71 | @import "addons/buttons"; 72 | @import "addons/clearfix"; 73 | @import "addons/ellipsis"; 74 | @import "addons/font-stacks"; 75 | @import "addons/hide-text"; 76 | @import "addons/margin"; 77 | @import "addons/padding"; 78 | @import "addons/position"; 79 | @import "addons/prefixer"; 80 | @import "addons/retina-image"; 81 | @import "addons/size"; 82 | @import "addons/text-inputs"; 83 | @import "addons/timing-functions"; 84 | @import "addons/triangle"; 85 | @import "addons/word-wrap"; 86 | 87 | @import "bourbon-deprecated-upcoming"; 88 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_border-color.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a quick method for targeting `border-color` on specific sides of a box. Use a `null` value to “skip” a side. 4 | /// 5 | /// @param {Arglist} $vals 6 | /// List of arguments 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include border-color(#a60b55 #76cd9c null #e8ae1a); 11 | /// } 12 | /// 13 | /// @example css - CSS Output 14 | /// .element { 15 | /// border-left-color: #e8ae1a; 16 | /// border-right-color: #76cd9c; 17 | /// border-top-color: #a60b55; 18 | /// } 19 | /// 20 | /// @require {mixin} directional-property 21 | /// 22 | /// @output `border-color` 23 | 24 | @mixin border-color($vals...) { 25 | @include directional-property(border, color, $vals...); 26 | } 27 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_border-radius.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a quick method for targeting `border-radius` on both corners on the side of a box. 4 | /// 5 | /// @param {Number} $radii 6 | /// List of arguments 7 | /// 8 | /// @example scss - Usage 9 | /// .element-one { 10 | /// @include border-top-radius(5px); 11 | /// } 12 | /// 13 | /// .element-two { 14 | /// @include border-left-radius(3px); 15 | /// } 16 | /// 17 | /// @example css - CSS Output 18 | /// .element-one { 19 | /// border-top-left-radius: 5px; 20 | /// border-top-right-radius: 5px; 21 | /// } 22 | /// 23 | /// .element-two { 24 | /// border-bottom-left-radius: 3px; 25 | /// border-top-left-radius: 3px; 26 | /// } 27 | /// 28 | /// @output `border-radius` 29 | 30 | @mixin border-top-radius($radii) { 31 | border-top-left-radius: $radii; 32 | border-top-right-radius: $radii; 33 | } 34 | 35 | @mixin border-right-radius($radii) { 36 | border-bottom-right-radius: $radii; 37 | border-top-right-radius: $radii; 38 | } 39 | 40 | @mixin border-bottom-radius($radii) { 41 | border-bottom-left-radius: $radii; 42 | border-bottom-right-radius: $radii; 43 | } 44 | 45 | @mixin border-left-radius($radii) { 46 | border-bottom-left-radius: $radii; 47 | border-top-left-radius: $radii; 48 | } 49 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_border-style.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a quick method for targeting `border-style` on specific sides of a box. Use a `null` value to “skip” a side. 4 | /// 5 | /// @param {Arglist} $vals 6 | /// List of arguments 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include border-style(dashed null solid); 11 | /// } 12 | /// 13 | /// @example css - CSS Output 14 | /// .element { 15 | /// border-bottom-style: solid; 16 | /// border-top-style: dashed; 17 | /// } 18 | /// 19 | /// @require {mixin} directional-property 20 | /// 21 | /// @output `border-style` 22 | 23 | @mixin border-style($vals...) { 24 | @include directional-property(border, style, $vals...); 25 | } 26 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_border-width.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a quick method for targeting `border-width` on specific sides of a box. Use a `null` value to “skip” a side. 4 | /// 5 | /// @param {Arglist} $vals 6 | /// List of arguments 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include border-width(1em null 20px); 11 | /// } 12 | /// 13 | /// @example css - CSS Output 14 | /// .element { 15 | /// border-bottom-width: 20px; 16 | /// border-top-width: 1em; 17 | /// } 18 | /// 19 | /// @require {mixin} directional-property 20 | /// 21 | /// @output `border-width` 22 | 23 | @mixin border-width($vals...) { 24 | @include directional-property(border, width, $vals...); 25 | } 26 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_buttons.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Generates variables for all buttons. Please note that you must use interpolation on the variable: `#{$all-buttons}`. 4 | /// 5 | /// @example scss - Usage 6 | /// #{$all-buttons} { 7 | /// background-color: #f00; 8 | /// } 9 | /// 10 | /// #{$all-buttons-focus}, 11 | /// #{$all-buttons-hover} { 12 | /// background-color: #0f0; 13 | /// } 14 | /// 15 | /// #{$all-buttons-active} { 16 | /// background-color: #00f; 17 | /// } 18 | /// 19 | /// @example css - CSS Output 20 | /// button, 21 | /// input[type="button"], 22 | /// input[type="reset"], 23 | /// input[type="submit"] { 24 | /// background-color: #f00; 25 | /// } 26 | /// 27 | /// button:focus, 28 | /// input[type="button"]:focus, 29 | /// input[type="reset"]:focus, 30 | /// input[type="submit"]:focus, 31 | /// button:hover, 32 | /// input[type="button"]:hover, 33 | /// input[type="reset"]:hover, 34 | /// input[type="submit"]:hover { 35 | /// background-color: #0f0; 36 | /// } 37 | /// 38 | /// button:active, 39 | /// input[type="button"]:active, 40 | /// input[type="reset"]:active, 41 | /// input[type="submit"]:active { 42 | /// background-color: #00f; 43 | /// } 44 | /// 45 | /// @require assign-inputs 46 | /// 47 | /// @type List 48 | /// 49 | /// @todo Remove double assigned variables (Lines 59–62) in v5.0.0 50 | 51 | $buttons-list: 'button', 52 | 'input[type="button"]', 53 | 'input[type="reset"]', 54 | 'input[type="submit"]'; 55 | 56 | $all-buttons: assign-inputs($buttons-list); 57 | $all-buttons-active: assign-inputs($buttons-list, active); 58 | $all-buttons-focus: assign-inputs($buttons-list, focus); 59 | $all-buttons-hover: assign-inputs($buttons-list, hover); 60 | 61 | $all-button-inputs: $all-buttons; 62 | $all-button-inputs-active: $all-buttons-active; 63 | $all-button-inputs-focus: $all-buttons-focus; 64 | $all-button-inputs-hover: $all-buttons-hover; 65 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_clearfix.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides an easy way to include a clearfix for containing floats. 4 | /// 5 | /// @link http://cssmojo.com/latest_new_clearfix_so_far/ 6 | /// 7 | /// @example scss - Usage 8 | /// .element { 9 | /// @include clearfix; 10 | /// } 11 | /// 12 | /// @example css - CSS Output 13 | /// .element::after { 14 | /// clear: both; 15 | /// content: ""; 16 | /// display: table; 17 | /// } 18 | 19 | @mixin clearfix { 20 | &::after { 21 | clear: both; 22 | content: ""; 23 | display: table; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_ellipsis.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Truncates text and adds an ellipsis to represent overflow. 4 | /// 5 | /// @param {Number} $width [100%] 6 | /// Max-width for the string to respect before being truncated 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include ellipsis; 11 | /// } 12 | /// 13 | /// @example css - CSS Output 14 | /// .element { 15 | /// display: inline-block; 16 | /// max-width: 100%; 17 | /// overflow: hidden; 18 | /// text-overflow: ellipsis; 19 | /// white-space: nowrap; 20 | /// word-wrap: normal; 21 | /// } 22 | 23 | @mixin ellipsis($width: 100%) { 24 | display: inline-block; 25 | max-width: $width; 26 | overflow: hidden; 27 | text-overflow: ellipsis; 28 | white-space: nowrap; 29 | word-wrap: normal; 30 | } 31 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_font-stacks.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Georgia font stack. 4 | /// 5 | /// @type List 6 | 7 | $georgia: "Georgia", "Cambria", "Times New Roman", "Times", serif; 8 | 9 | /// Helvetica font stack. 10 | /// 11 | /// @type List 12 | 13 | $helvetica: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif; 14 | 15 | /// Lucida Grande font stack. 16 | /// 17 | /// @type List 18 | 19 | $lucida-grande: "Lucida Grande", "Tahoma", "Verdana", "Arial", sans-serif; 20 | 21 | /// Monospace font stack. 22 | /// 23 | /// @type List 24 | 25 | $monospace: "Bitstream Vera Sans Mono", "Consolas", "Courier", monospace; 26 | 27 | /// Verdana font stack. 28 | /// 29 | /// @type List 30 | 31 | $verdana: "Verdana", "Geneva", sans-serif; 32 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_hide-text.scss: -------------------------------------------------------------------------------- 1 | /// Hides the text in an element, commonly used to show an image. Some elements will need block-level styles applied. 2 | /// 3 | /// @link http://zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement 4 | /// 5 | /// @example scss - Usage 6 | /// .element { 7 | /// @include hide-text; 8 | /// } 9 | /// 10 | /// @example css - CSS Output 11 | /// .element { 12 | /// overflow: hidden; 13 | /// text-indent: 101%; 14 | /// white-space: nowrap; 15 | /// } 16 | /// 17 | /// @todo Remove height argument in v5.0.0 18 | 19 | @mixin hide-text($height: null) { 20 | overflow: hidden; 21 | text-indent: 101%; 22 | white-space: nowrap; 23 | 24 | @if $height { 25 | @warn "The `hide-text` mixin has changed and no longer requires a height. The height argument will no longer be accepted in v5.0.0"; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_margin.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a quick method for targeting `margin` on specific sides of a box. Use a `null` value to “skip” a side. 4 | /// 5 | /// @param {Arglist} $vals 6 | /// List of arguments 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include margin(null 10px 3em 20vh); 11 | /// } 12 | /// 13 | /// @example css - CSS Output 14 | /// .element { 15 | /// margin-bottom: 3em; 16 | /// margin-left: 20vh; 17 | /// margin-right: 10px; 18 | /// } 19 | /// 20 | /// @require {mixin} directional-property 21 | /// 22 | /// @output `margin` 23 | 24 | @mixin margin($vals...) { 25 | @include directional-property(margin, false, $vals...); 26 | } 27 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_padding.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a quick method for targeting `padding` on specific sides of a box. Use a `null` value to “skip” a side. 4 | /// 5 | /// @param {Arglist} $vals 6 | /// List of arguments 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include padding(12vh null 10px 5%); 11 | /// } 12 | /// 13 | /// @example css - CSS Output 14 | /// .element { 15 | /// padding-bottom: 10px; 16 | /// padding-left: 5%; 17 | /// padding-top: 12vh; 18 | /// } 19 | /// 20 | /// @require {mixin} directional-property 21 | /// 22 | /// @output `padding` 23 | 24 | @mixin padding($vals...) { 25 | @include directional-property(padding, false, $vals...); 26 | } 27 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_position.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides a quick method for setting an element’s position. Use a `null` value to “skip” a side. 4 | /// 5 | /// @param {Position} $position [relative] 6 | /// A CSS position value 7 | /// 8 | /// @param {Arglist} $coordinates [null null null null] 9 | /// List of values that correspond to the 4-value syntax for the edges of a box 10 | /// 11 | /// @example scss - Usage 12 | /// .element { 13 | /// @include position(absolute, 0 null null 10em); 14 | /// } 15 | /// 16 | /// @example css - CSS Output 17 | /// .element { 18 | /// left: 10em; 19 | /// position: absolute; 20 | /// top: 0; 21 | /// } 22 | /// 23 | /// @require {function} is-length 24 | /// @require {function} unpack 25 | 26 | @mixin position($position: relative, $coordinates: null null null null) { 27 | @if type-of($position) == list { 28 | $coordinates: $position; 29 | $position: relative; 30 | } 31 | 32 | $coordinates: unpack($coordinates); 33 | 34 | $offsets: ( 35 | top: nth($coordinates, 1), 36 | right: nth($coordinates, 2), 37 | bottom: nth($coordinates, 3), 38 | left: nth($coordinates, 4) 39 | ); 40 | 41 | position: $position; 42 | 43 | @each $offset, $value in $offsets { 44 | @if is-length($value) { 45 | #{$offset}: $value; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_prefixer.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// A mixin for generating vendor prefixes on non-standardized properties. 4 | /// 5 | /// @param {String} $property 6 | /// Property to prefix 7 | /// 8 | /// @param {*} $value 9 | /// Value to use 10 | /// 11 | /// @param {List} $prefixes 12 | /// Prefixes to define 13 | /// 14 | /// @example scss - Usage 15 | /// .element { 16 | /// @include prefixer(border-radius, 10px, webkit ms spec); 17 | /// } 18 | /// 19 | /// @example css - CSS Output 20 | /// .element { 21 | /// -webkit-border-radius: 10px; 22 | /// -moz-border-radius: 10px; 23 | /// border-radius: 10px; 24 | /// } 25 | /// 26 | /// @require {variable} $prefix-for-webkit 27 | /// @require {variable} $prefix-for-mozilla 28 | /// @require {variable} $prefix-for-microsoft 29 | /// @require {variable} $prefix-for-opera 30 | /// @require {variable} $prefix-for-spec 31 | 32 | @mixin prefixer($property, $value, $prefixes) { 33 | @each $prefix in $prefixes { 34 | @if $prefix == webkit { 35 | @if $prefix-for-webkit { 36 | -webkit-#{$property}: $value; 37 | } 38 | } @else if $prefix == moz { 39 | @if $prefix-for-mozilla { 40 | -moz-#{$property}: $value; 41 | } 42 | } @else if $prefix == ms { 43 | @if $prefix-for-microsoft { 44 | -ms-#{$property}: $value; 45 | } 46 | } @else if $prefix == o { 47 | @if $prefix-for-opera { 48 | -o-#{$property}: $value; 49 | } 50 | } @else if $prefix == spec { 51 | @if $prefix-for-spec { 52 | #{$property}: $value; 53 | } 54 | } @else { 55 | @warn "Unrecognized prefix: #{$prefix}"; 56 | } 57 | } 58 | } 59 | 60 | @mixin disable-prefix-for-all() { 61 | $prefix-for-webkit: false !global; 62 | $prefix-for-mozilla: false !global; 63 | $prefix-for-microsoft: false !global; 64 | $prefix-for-opera: false !global; 65 | $prefix-for-spec: false !global; 66 | } 67 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_retina-image.scss: -------------------------------------------------------------------------------- 1 | @mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $retina-suffix: _2x, $asset-pipeline: $asset-pipeline) { 2 | @if $asset-pipeline { 3 | background-image: image-url("#{$filename}.#{$extension}"); 4 | } @else { 5 | background-image: url("#{$filename}.#{$extension}"); 6 | } 7 | 8 | @include hidpi { 9 | @if $asset-pipeline { 10 | @if $retina-filename { 11 | background-image: image-url("#{$retina-filename}.#{$extension}"); 12 | } @else { 13 | background-image: image-url("#{$filename}#{$retina-suffix}.#{$extension}"); 14 | } 15 | } @else { 16 | @if $retina-filename { 17 | background-image: url("#{$retina-filename}.#{$extension}"); 18 | } @else { 19 | background-image: url("#{$filename}#{$retina-suffix}.#{$extension}"); 20 | } 21 | } 22 | 23 | background-size: $background-size; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_size.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Sets the `width` and `height` of the element. 4 | /// 5 | /// @param {List} $size 6 | /// A list of at most 2 size values. 7 | /// 8 | /// If there is only a single value in `$size` it is used for both width and height. All units are supported. 9 | /// 10 | /// @example scss - Usage 11 | /// .first-element { 12 | /// @include size(2em); 13 | /// } 14 | /// 15 | /// .second-element { 16 | /// @include size(auto 10em); 17 | /// } 18 | /// 19 | /// @example css - CSS Output 20 | /// .first-element { 21 | /// width: 2em; 22 | /// height: 2em; 23 | /// } 24 | /// 25 | /// .second-element { 26 | /// width: auto; 27 | /// height: 10em; 28 | /// } 29 | /// 30 | /// @todo Refactor in 5.0.0 to use a comma-separated argument 31 | 32 | @mixin size($value) { 33 | $width: nth($value, 1); 34 | $height: $width; 35 | 36 | @if length($value) > 1 { 37 | $height: nth($value, 2); 38 | } 39 | 40 | @if is-size($height) { 41 | height: $height; 42 | } @else { 43 | @warn "`#{$height}` is not a valid length for the `$height` parameter in the `size` mixin."; 44 | } 45 | 46 | @if is-size($width) { 47 | width: $width; 48 | } @else { 49 | @warn "`#{$width}` is not a valid length for the `$width` parameter in the `size` mixin."; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_text-inputs.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Generates variables for all text-based inputs. Please note that you must use interpolation on the variable: `#{$all-text-inputs}`. 4 | /// 5 | /// @example scss - Usage 6 | /// #{$all-text-inputs} { 7 | /// border: 1px solid #f00; 8 | /// } 9 | /// 10 | /// #{$all-text-inputs-focus}, 11 | /// #{$all-text-inputs-hover} { 12 | /// border: 1px solid #0f0; 13 | /// } 14 | /// 15 | /// #{$all-text-inputs-active} { 16 | /// border: 1px solid #00f; 17 | /// } 18 | /// 19 | /// @example css - CSS Output 20 | /// input[type="color"], 21 | /// input[type="date"], 22 | /// input[type="datetime"], 23 | /// input[type="datetime-local"], 24 | /// input[type="email"], 25 | /// input[type="month"], 26 | /// input[type="number"], 27 | /// input[type="password"], 28 | /// input[type="search"], 29 | /// input[type="tel"], 30 | /// input[type="text"], 31 | /// input[type="time"], 32 | /// input[type="url"], 33 | /// input[type="week"], 34 | /// textarea { 35 | /// border: 1px solid #f00; 36 | /// } 37 | /// 38 | /// input[type="color"]:focus, 39 | /// input[type="date"]:focus, 40 | /// input[type="datetime"]:focus, 41 | /// input[type="datetime-local"]:focus, 42 | /// input[type="email"]:focus, 43 | /// input[type="month"]:focus, 44 | /// input[type="number"]:focus, 45 | /// input[type="password"]:focus, 46 | /// input[type="search"]:focus, 47 | /// input[type="tel"]:focus, 48 | /// input[type="text"]:focus, 49 | /// input[type="time"]:focus, 50 | /// input[type="url"]:focus, 51 | /// input[type="week"]:focus, 52 | /// textarea:focus, 53 | /// input[type="color"]:hover, 54 | /// input[type="date"]:hover, 55 | /// input[type="datetime"]:hover, 56 | /// input[type="datetime-local"]:hover, 57 | /// input[type="email"]:hover, 58 | /// input[type="month"]:hover, 59 | /// input[type="number"]:hover, 60 | /// input[type="password"]:hover, 61 | /// input[type="search"]:hover, 62 | /// input[type="tel"]:hover, 63 | /// input[type="text"]:hover, 64 | /// input[type="time"]:hover, 65 | /// input[type="url"]:hover, 66 | /// input[type="week"]:hover, 67 | /// textarea:hover { 68 | /// border: 1px solid #0f0; 69 | /// } 70 | /// 71 | /// input[type="color"]:active, 72 | /// input[type="date"]:active, 73 | /// input[type="datetime"]:active, 74 | /// input[type="datetime-local"]:active, 75 | /// input[type="email"]:active, 76 | /// input[type="month"]:active, 77 | /// input[type="number"]:active, 78 | /// input[type="password"]:active, 79 | /// input[type="search"]:active, 80 | /// input[type="tel"]:active, 81 | /// input[type="text"]:active, 82 | /// input[type="time"]:active, 83 | /// input[type="url"]:active, 84 | /// input[type="week"]:active, 85 | /// textarea:active { 86 | /// border: 1px solid #00f; 87 | /// } 88 | /// 89 | /// @require assign-inputs 90 | /// 91 | /// @type List 92 | 93 | $text-inputs-list: 'input[type="color"]', 94 | 'input[type="date"]', 95 | 'input[type="datetime"]', 96 | 'input[type="datetime-local"]', 97 | 'input[type="email"]', 98 | 'input[type="month"]', 99 | 'input[type="number"]', 100 | 'input[type="password"]', 101 | 'input[type="search"]', 102 | 'input[type="tel"]', 103 | 'input[type="text"]', 104 | 'input[type="time"]', 105 | 'input[type="url"]', 106 | 'input[type="week"]', 107 | 'textarea'; 108 | 109 | $all-text-inputs: assign-inputs($text-inputs-list); 110 | $all-text-inputs-active: assign-inputs($text-inputs-list, active); 111 | $all-text-inputs-focus: assign-inputs($text-inputs-list, focus); 112 | $all-text-inputs-hover: assign-inputs($text-inputs-list, hover); 113 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_timing-functions.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// CSS cubic-bezier timing functions. Timing functions courtesy of jquery.easie (github.com/jaukia/easie) 4 | /// 5 | /// Timing functions are the same as demoed here: http://jqueryui.com/resources/demos/effect/easing.html 6 | /// 7 | /// @type cubic-bezier 8 | 9 | $ease-in-quad: cubic-bezier(0.550, 0.085, 0.680, 0.530); 10 | $ease-in-cubic: cubic-bezier(0.550, 0.055, 0.675, 0.190); 11 | $ease-in-quart: cubic-bezier(0.895, 0.030, 0.685, 0.220); 12 | $ease-in-quint: cubic-bezier(0.755, 0.050, 0.855, 0.060); 13 | $ease-in-sine: cubic-bezier(0.470, 0.000, 0.745, 0.715); 14 | $ease-in-expo: cubic-bezier(0.950, 0.050, 0.795, 0.035); 15 | $ease-in-circ: cubic-bezier(0.600, 0.040, 0.980, 0.335); 16 | $ease-in-back: cubic-bezier(0.600, -0.280, 0.735, 0.045); 17 | 18 | $ease-out-quad: cubic-bezier(0.250, 0.460, 0.450, 0.940); 19 | $ease-out-cubic: cubic-bezier(0.215, 0.610, 0.355, 1.000); 20 | $ease-out-quart: cubic-bezier(0.165, 0.840, 0.440, 1.000); 21 | $ease-out-quint: cubic-bezier(0.230, 1.000, 0.320, 1.000); 22 | $ease-out-sine: cubic-bezier(0.390, 0.575, 0.565, 1.000); 23 | $ease-out-expo: cubic-bezier(0.190, 1.000, 0.220, 1.000); 24 | $ease-out-circ: cubic-bezier(0.075, 0.820, 0.165, 1.000); 25 | $ease-out-back: cubic-bezier(0.175, 0.885, 0.320, 1.275); 26 | 27 | $ease-in-out-quad: cubic-bezier(0.455, 0.030, 0.515, 0.955); 28 | $ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1.000); 29 | $ease-in-out-quart: cubic-bezier(0.770, 0.000, 0.175, 1.000); 30 | $ease-in-out-quint: cubic-bezier(0.860, 0.000, 0.070, 1.000); 31 | $ease-in-out-sine: cubic-bezier(0.445, 0.050, 0.550, 0.950); 32 | $ease-in-out-expo: cubic-bezier(1.000, 0.000, 0.000, 1.000); 33 | $ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.150, 0.860); 34 | $ease-in-out-back: cubic-bezier(0.680, -0.550, 0.265, 1.550); 35 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_triangle.scss: -------------------------------------------------------------------------------- 1 | @mixin triangle($size, $color, $direction) { 2 | $width: nth($size, 1); 3 | $height: nth($size, length($size)); 4 | $foreground-color: nth($color, 1); 5 | $background-color: if(length($color) == 2, nth($color, 2), transparent); 6 | height: 0; 7 | width: 0; 8 | 9 | @if ($direction == up) or ($direction == down) or ($direction == right) or ($direction == left) { 10 | $width: $width / 2; 11 | $height: if(length($size) > 1, $height, $height/2); 12 | 13 | @if $direction == up { 14 | border-bottom: $height solid $foreground-color; 15 | border-left: $width solid $background-color; 16 | border-right: $width solid $background-color; 17 | } @else if $direction == right { 18 | border-bottom: $width solid $background-color; 19 | border-left: $height solid $foreground-color; 20 | border-top: $width solid $background-color; 21 | } @else if $direction == down { 22 | border-left: $width solid $background-color; 23 | border-right: $width solid $background-color; 24 | border-top: $height solid $foreground-color; 25 | } @else if $direction == left { 26 | border-bottom: $width solid $background-color; 27 | border-right: $height solid $foreground-color; 28 | border-top: $width solid $background-color; 29 | } 30 | } @else if ($direction == up-right) or ($direction == up-left) { 31 | border-top: $height solid $foreground-color; 32 | 33 | @if $direction == up-right { 34 | border-left: $width solid $background-color; 35 | } @else if $direction == up-left { 36 | border-right: $width solid $background-color; 37 | } 38 | } @else if ($direction == down-right) or ($direction == down-left) { 39 | border-bottom: $height solid $foreground-color; 40 | 41 | @if $direction == down-right { 42 | border-left: $width solid $background-color; 43 | } @else if $direction == down-left { 44 | border-right: $width solid $background-color; 45 | } 46 | } @else if ($direction == inset-up) { 47 | border-color: $background-color $background-color $foreground-color; 48 | border-style: solid; 49 | border-width: $height $width; 50 | } @else if ($direction == inset-down) { 51 | border-color: $foreground-color $background-color $background-color; 52 | border-style: solid; 53 | border-width: $height $width; 54 | } @else if ($direction == inset-right) { 55 | border-color: $background-color $background-color $background-color $foreground-color; 56 | border-style: solid; 57 | border-width: $width $height; 58 | } @else if ($direction == inset-left) { 59 | border-color: $background-color $foreground-color $background-color $background-color; 60 | border-style: solid; 61 | border-width: $width $height; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/addons/_word-wrap.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Provides an easy way to change the `word-wrap` property. 4 | /// 5 | /// @param {String} $wrap [break-word] 6 | /// Value for the `word-break` property. 7 | /// 8 | /// @example scss - Usage 9 | /// .wrapper { 10 | /// @include word-wrap(break-word); 11 | /// } 12 | /// 13 | /// @example css - CSS Output 14 | /// .wrapper { 15 | /// overflow-wrap: break-word; 16 | /// word-break: break-all; 17 | /// word-wrap: break-word; 18 | /// } 19 | 20 | @mixin word-wrap($wrap: break-word) { 21 | overflow-wrap: $wrap; 22 | word-wrap: $wrap; 23 | 24 | @if $wrap == break-word { 25 | word-break: break-all; 26 | } @else { 27 | word-break: $wrap; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/css3/_animation.scss: -------------------------------------------------------------------------------- 1 | // http://www.w3.org/TR/css3-animations/#the-animation-name-property- 2 | // Each of these mixins support comma separated lists of values, which allows different transitions for individual properties to be described in a single style rule. Each value in the list corresponds to the value at that same position in the other properties. 3 | 4 | @mixin animation($animations...) { 5 | @include prefixer(animation, $animations, webkit moz spec); 6 | } 7 | 8 | @mixin animation-name($names...) { 9 | @include prefixer(animation-name, $names, webkit moz spec); 10 | } 11 | 12 | @mixin animation-duration($times...) { 13 | @include prefixer(animation-duration, $times, webkit moz spec); 14 | } 15 | 16 | @mixin animation-timing-function($motions...) { 17 | // ease | linear | ease-in | ease-out | ease-in-out 18 | @include prefixer(animation-timing-function, $motions, webkit moz spec); 19 | } 20 | 21 | @mixin animation-iteration-count($values...) { 22 | // infinite | 23 | @include prefixer(animation-iteration-count, $values, webkit moz spec); 24 | } 25 | 26 | @mixin animation-direction($directions...) { 27 | // normal | alternate 28 | @include prefixer(animation-direction, $directions, webkit moz spec); 29 | } 30 | 31 | @mixin animation-play-state($states...) { 32 | // running | paused 33 | @include prefixer(animation-play-state, $states, webkit moz spec); 34 | } 35 | 36 | @mixin animation-delay($times...) { 37 | @include prefixer(animation-delay, $times, webkit moz spec); 38 | } 39 | 40 | @mixin animation-fill-mode($modes...) { 41 | // none | forwards | backwards | both 42 | @include prefixer(animation-fill-mode, $modes, webkit moz spec); 43 | } 44 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/css3/_appearance.scss: -------------------------------------------------------------------------------- 1 | @mixin appearance($value) { 2 | @include prefixer(appearance, $value, webkit moz ms o spec); 3 | } 4 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/css3/_backface-visibility.scss: -------------------------------------------------------------------------------- 1 | @mixin backface-visibility($visibility) { 2 | @include prefixer(backface-visibility, $visibility, webkit spec); 3 | } 4 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/css3/_background-image.scss: -------------------------------------------------------------------------------- 1 | //************************************************************************// 2 | // Background-image property for adding multiple background images with 3 | // gradients, or for stringing multiple gradients together. 4 | //************************************************************************// 5 | 6 | @mixin background-image($images...) { 7 | $webkit-images: (); 8 | $spec-images: (); 9 | 10 | @each $image in $images { 11 | $webkit-image: (); 12 | $spec-image: (); 13 | 14 | @if (type-of($image) == string) { 15 | $url-str: str-slice($image, 0, 3); 16 | $gradient-type: str-slice($image, 0, 6); 17 | 18 | @if $url-str == "url" { 19 | $webkit-image: $image; 20 | $spec-image: $image; 21 | } 22 | 23 | @else if $gradient-type == "linear" { 24 | $gradients: _linear-gradient-parser($image); 25 | $webkit-image: map-get($gradients, webkit-image); 26 | $spec-image: map-get($gradients, spec-image); 27 | } 28 | 29 | @else if $gradient-type == "radial" { 30 | $gradients: _radial-gradient-parser($image); 31 | $webkit-image: map-get($gradients, webkit-image); 32 | $spec-image: map-get($gradients, spec-image); 33 | } 34 | } 35 | 36 | $webkit-images: append($webkit-images, $webkit-image, comma); 37 | $spec-images: append($spec-images, $spec-image, comma); 38 | } 39 | 40 | background-image: $webkit-images; 41 | background-image: $spec-images; 42 | } 43 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/css3/_background.scss: -------------------------------------------------------------------------------- 1 | //************************************************************************// 2 | // Background property for adding multiple backgrounds using shorthand 3 | // notation. 4 | //************************************************************************// 5 | 6 | @mixin background($backgrounds...) { 7 | $webkit-backgrounds: (); 8 | $spec-backgrounds: (); 9 | 10 | @each $background in $backgrounds { 11 | $webkit-background: (); 12 | $spec-background: (); 13 | $background-type: type-of($background); 14 | 15 | @if $background-type == string or $background-type == list { 16 | $background-str: if($background-type == list, nth($background, 1), $background); 17 | 18 | $url-str: str-slice($background-str, 0, 3); 19 | $gradient-type: str-slice($background-str, 0, 6); 20 | 21 | @if $url-str == "url" { 22 | $webkit-background: $background; 23 | $spec-background: $background; 24 | } 25 | 26 | @else if $gradient-type == "linear" { 27 | $gradients: _linear-gradient-parser("#{$background}"); 28 | $webkit-background: map-get($gradients, webkit-image); 29 | $spec-background: map-get($gradients, spec-image); 30 | } 31 | 32 | @else if $gradient-type == "radial" { 33 | $gradients: _radial-gradient-parser("#{$background}"); 34 | $webkit-background: map-get($gradients, webkit-image); 35 | $spec-background: map-get($gradients, spec-image); 36 | } 37 | 38 | @else { 39 | $webkit-background: $background; 40 | $spec-background: $background; 41 | } 42 | } 43 | 44 | @else { 45 | $webkit-background: $background; 46 | $spec-background: $background; 47 | } 48 | 49 | $webkit-backgrounds: append($webkit-backgrounds, $webkit-background, comma); 50 | $spec-backgrounds: append($spec-backgrounds, $spec-background, comma); 51 | } 52 | 53 | background: $webkit-backgrounds; 54 | background: $spec-backgrounds; 55 | } 56 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/css3/_border-image.scss: -------------------------------------------------------------------------------- 1 | @mixin border-image($borders...) { 2 | $webkit-borders: (); 3 | $spec-borders: (); 4 | 5 | @each $border in $borders { 6 | $webkit-border: (); 7 | $spec-border: (); 8 | $border-type: type-of($border); 9 | 10 | @if $border-type == string or list { 11 | $border-str: if($border-type == list, nth($border, 1), $border); 12 | 13 | $url-str: str-slice($border-str, 0, 3); 14 | $gradient-type: str-slice($border-str, 0, 6); 15 | 16 | @if $url-str == "url" { 17 | $webkit-border: $border; 18 | $spec-border: $border; 19 | } 20 | 21 | @else if $gradient-type == "linear" { 22 | $gradients: _linear-gradient-parser("#{$border}"); 23 | $webkit-border: map-get($gradients, webkit-image); 24 | $spec-border: map-get($gradients, spec-image); 25 | } 26 | 27 | @else if $gradient-type == "radial" { 28 | $gradients: _radial-gradient-parser("#{$border}"); 29 | $webkit-border: map-get($gradients, webkit-image); 30 | $spec-border: map-get($gradients, spec-image); 31 | } 32 | 33 | @else { 34 | $webkit-border: $border; 35 | $spec-border: $border; 36 | } 37 | } 38 | 39 | @else { 40 | $webkit-border: $border; 41 | $spec-border: $border; 42 | } 43 | 44 | $webkit-borders: append($webkit-borders, $webkit-border, comma); 45 | $spec-borders: append($spec-borders, $spec-border, comma); 46 | } 47 | 48 | -webkit-border-image: $webkit-borders; 49 | border-image: $spec-borders; 50 | border-style: solid; 51 | } 52 | 53 | //Examples: 54 | // @include border-image(url("image.png")); 55 | // @include border-image(url("image.png") 20 stretch); 56 | // @include border-image(linear-gradient(45deg, orange, yellow)); 57 | // @include border-image(linear-gradient(45deg, orange, yellow) stretch); 58 | // @include border-image(linear-gradient(45deg, orange, yellow) 20 30 40 50 stretch round); 59 | // @include border-image(radial-gradient(top, cover, orange, yellow, orange)); 60 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/css3/_calc.scss: -------------------------------------------------------------------------------- 1 | @mixin calc($property, $value) { 2 | #{$property}: -webkit-calc(#{$value}); 3 | #{$property}: calc(#{$value}); 4 | } 5 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/css3/_columns.scss: -------------------------------------------------------------------------------- 1 | @mixin columns($arg: auto) { 2 | // || 3 | @include prefixer(columns, $arg, webkit moz spec); 4 | } 5 | 6 | @mixin column-count($int: auto) { 7 | // auto || integer 8 | @include prefixer(column-count, $int, webkit moz spec); 9 | } 10 | 11 | @mixin column-gap($length: normal) { 12 | // normal || length 13 | @include prefixer(column-gap, $length, webkit moz spec); 14 | } 15 | 16 | @mixin column-fill($arg: auto) { 17 | // auto || length 18 | @include prefixer(column-fill, $arg, webkit moz spec); 19 | } 20 | 21 | @mixin column-rule($arg) { 22 | // || || 23 | @include prefixer(column-rule, $arg, webkit moz spec); 24 | } 25 | 26 | @mixin column-rule-color($color) { 27 | @include prefixer(column-rule-color, $color, webkit moz spec); 28 | } 29 | 30 | @mixin column-rule-style($style: none) { 31 | // none | hidden | dashed | dotted | double | groove | inset | inset | outset | ridge | solid 32 | @include prefixer(column-rule-style, $style, webkit moz spec); 33 | } 34 | 35 | @mixin column-rule-width ($width: none) { 36 | @include prefixer(column-rule-width, $width, webkit moz spec); 37 | } 38 | 39 | @mixin column-span($arg: none) { 40 | // none || all 41 | @include prefixer(column-span, $arg, webkit moz spec); 42 | } 43 | 44 | @mixin column-width($length: auto) { 45 | // auto || length 46 | @include prefixer(column-width, $length, webkit moz spec); 47 | } 48 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/css3/_filter.scss: -------------------------------------------------------------------------------- 1 | @mixin filter($function: none) { 2 | // [ 3 | @include prefixer(perspective, $depth, webkit moz spec); 4 | } 5 | 6 | @mixin perspective-origin($value: 50% 50%) { 7 | @include prefixer(perspective-origin, $value, webkit moz spec); 8 | } 9 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/css3/_placeholder.scss: -------------------------------------------------------------------------------- 1 | @mixin placeholder { 2 | $placeholders: ":-webkit-input" ":-moz" "-moz" "-ms-input"; 3 | @each $placeholder in $placeholders { 4 | &:#{$placeholder}-placeholder { 5 | @content; 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/css3/_radial-gradient.scss: -------------------------------------------------------------------------------- 1 | // Requires Sass 3.1+ 2 | @mixin radial-gradient($g1, $g2, 3 | $g3: null, $g4: null, 4 | $g5: null, $g6: null, 5 | $g7: null, $g8: null, 6 | $g9: null, $g10: null, 7 | $pos: null, 8 | $shape-size: null, 9 | $fallback: null) { 10 | 11 | $data: _radial-arg-parser($g1, $g2, $pos, $shape-size); 12 | $g1: nth($data, 1); 13 | $g2: nth($data, 2); 14 | $pos: nth($data, 3); 15 | $shape-size: nth($data, 4); 16 | 17 | $full: $g1, $g2, $g3, $g4, $g5, $g6, $g7, $g8, $g9, $g10; 18 | 19 | // Strip deprecated cover/contain for spec 20 | $shape-size-spec: _shape-size-stripper($shape-size); 21 | 22 | // Set $g1 as the default fallback color 23 | $first-color: nth($full, 1); 24 | $fallback-color: nth($first-color, 1); 25 | 26 | @if (type-of($fallback) == color) or ($fallback == "transparent") { 27 | $fallback-color: $fallback; 28 | } 29 | 30 | // Add Commas and spaces 31 | $shape-size: if($shape-size, "#{$shape-size}, ", null); 32 | $pos: if($pos, "#{$pos}, ", null); 33 | $pos-spec: if($pos, "at #{$pos}", null); 34 | $shape-size-spec: if(($shape-size-spec != " ") and ($pos == null), "#{$shape-size-spec}, ", "#{$shape-size-spec} "); 35 | 36 | background-color: $fallback-color; 37 | background-image: -webkit-radial-gradient(unquote(#{$pos}#{$shape-size}#{$full})); 38 | background-image: unquote("radial-gradient(#{$shape-size-spec}#{$pos-spec}#{$full})"); 39 | } 40 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/css3/_selection.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Outputs the spec and prefixed versions of the `::selection` pseudo-element. 4 | /// 5 | /// @param {Bool} $current-selector [false] 6 | /// If set to `true`, it takes the current element into consideration. 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include selection(true) { 11 | /// background-color: #ffbb52; 12 | /// } 13 | /// } 14 | /// 15 | /// @example css - CSS Output 16 | /// .element::-moz-selection { 17 | /// background-color: #ffbb52; 18 | /// } 19 | /// 20 | /// .element::selection { 21 | /// background-color: #ffbb52; 22 | /// } 23 | 24 | @mixin selection($current-selector: false) { 25 | @if $current-selector { 26 | &::-moz-selection { 27 | @content; 28 | } 29 | 30 | &::selection { 31 | @content; 32 | } 33 | } @else { 34 | ::-moz-selection { 35 | @content; 36 | } 37 | 38 | ::selection { 39 | @content; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/css3/_text-decoration.scss: -------------------------------------------------------------------------------- 1 | @mixin text-decoration($value) { 2 | // || || 3 | @include prefixer(text-decoration, $value, moz); 4 | } 5 | 6 | @mixin text-decoration-line($line: none) { 7 | // none || underline || overline || line-through 8 | @include prefixer(text-decoration-line, $line, moz); 9 | } 10 | 11 | @mixin text-decoration-style($style: solid) { 12 | // solid || double || dotted || dashed || wavy 13 | @include prefixer(text-decoration-style, $style, moz webkit); 14 | } 15 | 16 | @mixin text-decoration-color($color: currentColor) { 17 | // currentColor || 18 | @include prefixer(text-decoration-color, $color, moz); 19 | } 20 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/css3/_transform.scss: -------------------------------------------------------------------------------- 1 | @mixin transform($property: none) { 2 | // none | 3 | @include prefixer(transform, $property, webkit moz ms o spec); 4 | } 5 | 6 | @mixin transform-origin($axes: 50%) { 7 | // x-axis - left | center | right | length | % 8 | // y-axis - top | center | bottom | length | % 9 | // z-axis - length 10 | @include prefixer(transform-origin, $axes, webkit moz ms o spec); 11 | } 12 | 13 | @mixin transform-style($style: flat) { 14 | @include prefixer(transform-style, $style, webkit moz ms o spec); 15 | } 16 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/css3/_transition.scss: -------------------------------------------------------------------------------- 1 | // Shorthand mixin. Supports multiple parentheses-deliminated values for each variable. 2 | // Example: @include transition (all 2s ease-in-out); 3 | // @include transition (opacity 1s ease-in 2s, width 2s ease-out); 4 | // @include transition-property (transform, opacity); 5 | 6 | @mixin transition($properties...) { 7 | // Fix for vendor-prefix transform property 8 | $needs-prefixes: false; 9 | $webkit: (); 10 | $moz: (); 11 | $spec: (); 12 | 13 | // Create lists for vendor-prefixed transform 14 | @each $list in $properties { 15 | @if nth($list, 1) == "transform" { 16 | $needs-prefixes: true; 17 | $list1: -webkit-transform; 18 | $list2: -moz-transform; 19 | $list3: (); 20 | 21 | @each $var in $list { 22 | $list3: join($list3, $var); 23 | 24 | @if $var != "transform" { 25 | $list1: join($list1, $var); 26 | $list2: join($list2, $var); 27 | } 28 | } 29 | 30 | $webkit: append($webkit, $list1); 31 | $moz: append($moz, $list2); 32 | $spec: append($spec, $list3); 33 | } @else { 34 | $webkit: append($webkit, $list, comma); 35 | $moz: append($moz, $list, comma); 36 | $spec: append($spec, $list, comma); 37 | } 38 | } 39 | 40 | @if $needs-prefixes { 41 | -webkit-transition: $webkit; 42 | -moz-transition: $moz; 43 | transition: $spec; 44 | } @else { 45 | @if length($properties) >= 1 { 46 | @include prefixer(transition, $properties, webkit moz spec); 47 | } @else { 48 | $properties: all 0.15s ease-out 0s; 49 | @include prefixer(transition, $properties, webkit moz spec); 50 | } 51 | } 52 | } 53 | 54 | @mixin transition-property($properties...) { 55 | -webkit-transition-property: transition-property-names($properties, "webkit"); 56 | -moz-transition-property: transition-property-names($properties, "moz"); 57 | transition-property: transition-property-names($properties, false); 58 | } 59 | 60 | @mixin transition-duration($times...) { 61 | @include prefixer(transition-duration, $times, webkit moz spec); 62 | } 63 | 64 | @mixin transition-timing-function($motions...) { 65 | // ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier() 66 | @include prefixer(transition-timing-function, $motions, webkit moz spec); 67 | } 68 | 69 | @mixin transition-delay($times...) { 70 | @include prefixer(transition-delay, $times, webkit moz spec); 71 | } 72 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/css3/_user-select.scss: -------------------------------------------------------------------------------- 1 | @mixin user-select($value: none) { 2 | @include prefixer(user-select, $value, webkit moz ms spec); 3 | } 4 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/functions/_assign-inputs.scss: -------------------------------------------------------------------------------- 1 | @function assign-inputs($inputs, $pseudo: null) { 2 | $list: (); 3 | 4 | @each $input in $inputs { 5 | $input: unquote($input); 6 | $input: if($pseudo, $input + ":" + $pseudo, $input); 7 | $list: append($list, $input, comma); 8 | } 9 | 10 | @return $list; 11 | } 12 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/functions/_contains-falsy.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Checks if a list does not contains a value. 4 | /// 5 | /// @access private 6 | /// 7 | /// @param {List} $list 8 | /// The list to check against. 9 | /// 10 | /// @return {Bool} 11 | 12 | @function contains-falsy($list) { 13 | @each $item in $list { 14 | @if not $item { 15 | @return true; 16 | } 17 | } 18 | 19 | @return false; 20 | } 21 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/functions/_contains.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Checks if a list contains a value(s). 4 | /// 5 | /// @access private 6 | /// 7 | /// @param {List} $list 8 | /// The list to check against. 9 | /// 10 | /// @param {List} $values 11 | /// A single value or list of values to check for. 12 | /// 13 | /// @example scss - Usage 14 | /// contains($list, $value) 15 | /// 16 | /// @return {Bool} 17 | 18 | @function contains($list, $values...) { 19 | @each $value in $values { 20 | @if type-of(index($list, $value)) != "number" { 21 | @return false; 22 | } 23 | } 24 | 25 | @return true; 26 | } 27 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/functions/_is-length.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Checks for a valid CSS length. 4 | /// 5 | /// @param {String} $value 6 | 7 | @function is-length($value) { 8 | @return type-of($value) != "null" and (str-slice($value + "", 1, 4) == "calc" 9 | or index(auto inherit initial 0, $value) 10 | or (type-of($value) == "number" and not(unitless($value)))); 11 | } 12 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/functions/_is-light.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Programatically determines whether a color is light or dark. 4 | /// 5 | /// @link http://robots.thoughtbot.com/closer-look-color-lightness 6 | /// 7 | /// @param {Color (Hex)} $color 8 | /// 9 | /// @example scss - Usage 10 | /// is-light($color) 11 | /// 12 | /// @return {Bool} 13 | 14 | @function is-light($hex-color) { 15 | $-local-red: red(rgba($hex-color, 1)); 16 | $-local-green: green(rgba($hex-color, 1)); 17 | $-local-blue: blue(rgba($hex-color, 1)); 18 | $-local-lightness: ($-local-red * 0.2126 + $-local-green * 0.7152 + $-local-blue * 0.0722) / 255; 19 | 20 | @return $-local-lightness > 0.6; 21 | } 22 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/functions/_is-number.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Checks for a valid number. 4 | /// 5 | /// @param {Number} $value 6 | /// 7 | /// @require {function} contains 8 | 9 | @function is-number($value) { 10 | @return contains("0" "1" "2" "3" "4" "5" "6" "7" "8" "9" 0 1 2 3 4 5 6 7 8 9, $value); 11 | } 12 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/functions/_is-size.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Checks for a valid CSS size. 4 | /// 5 | /// @param {String} $value 6 | /// 7 | /// @require {function} contains 8 | /// @require {function} is-length 9 | 10 | @function is-size($value) { 11 | @return is-length($value) 12 | or contains("fill" "fit-content" "min-content" "max-content", $value); 13 | } 14 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/functions/_modular-scale.scss: -------------------------------------------------------------------------------- 1 | // Scaling Variables 2 | $golden: 1.618; 3 | $minor-second: 1.067; 4 | $major-second: 1.125; 5 | $minor-third: 1.2; 6 | $major-third: 1.25; 7 | $perfect-fourth: 1.333; 8 | $augmented-fourth: 1.414; 9 | $perfect-fifth: 1.5; 10 | $minor-sixth: 1.6; 11 | $major-sixth: 1.667; 12 | $minor-seventh: 1.778; 13 | $major-seventh: 1.875; 14 | $octave: 2; 15 | $major-tenth: 2.5; 16 | $major-eleventh: 2.667; 17 | $major-twelfth: 3; 18 | $double-octave: 4; 19 | 20 | $modular-scale-ratio: $perfect-fourth !default; 21 | $modular-scale-base: em($em-base) !default; 22 | 23 | @function modular-scale($increment, $value: $modular-scale-base, $ratio: $modular-scale-ratio) { 24 | $v1: nth($value, 1); 25 | $v2: nth($value, length($value)); 26 | $value: $v1; 27 | 28 | // scale $v2 to just above $v1 29 | @while $v2 > $v1 { 30 | $v2: ($v2 / $ratio); // will be off-by-1 31 | } 32 | @while $v2 < $v1 { 33 | $v2: ($v2 * $ratio); // will fix off-by-1 34 | } 35 | 36 | // check AFTER scaling $v2 to prevent double-counting corner-case 37 | $double-stranded: $v2 > $v1; 38 | 39 | @if $increment > 0 { 40 | @for $i from 1 through $increment { 41 | @if $double-stranded and ($v1 * $ratio) > $v2 { 42 | $value: $v2; 43 | $v2: ($v2 * $ratio); 44 | } @else { 45 | $v1: ($v1 * $ratio); 46 | $value: $v1; 47 | } 48 | } 49 | } 50 | 51 | @if $increment < 0 { 52 | // adjust $v2 to just below $v1 53 | @if $double-stranded { 54 | $v2: ($v2 / $ratio); 55 | } 56 | 57 | @for $i from $increment through -1 { 58 | @if $double-stranded and ($v1 / $ratio) < $v2 { 59 | $value: $v2; 60 | $v2: ($v2 / $ratio); 61 | } @else { 62 | $v1: ($v1 / $ratio); 63 | $value: $v1; 64 | } 65 | } 66 | } 67 | 68 | @return $value; 69 | } 70 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/functions/_px-to-em.scss: -------------------------------------------------------------------------------- 1 | // Convert pixels to ems 2 | // eg. for a relational value of 12px write em(12) when the parent is 16px 3 | // if the parent is another value say 24px write em(12, 24) 4 | 5 | @function em($pxval, $base: $em-base) { 6 | @if not unitless($pxval) { 7 | $pxval: strip-units($pxval); 8 | } 9 | @if not unitless($base) { 10 | $base: strip-units($base); 11 | } 12 | @return ($pxval / $base) * 1em; 13 | } 14 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/functions/_px-to-rem.scss: -------------------------------------------------------------------------------- 1 | // Convert pixels to rems 2 | // eg. for a relational value of 12px write rem(12) 3 | // Assumes $em-base is the font-size of 4 | 5 | @function rem($pxval) { 6 | @if not unitless($pxval) { 7 | $pxval: strip-units($pxval); 8 | } 9 | 10 | $base: $em-base; 11 | @if not unitless($base) { 12 | $base: strip-units($base); 13 | } 14 | @return ($pxval / $base) * 1rem; 15 | } 16 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/functions/_shade.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Mixes a color with black. 4 | /// 5 | /// @param {Color} $color 6 | /// 7 | /// @param {Number (Percentage)} $percent 8 | /// The amount of black to be mixed in. 9 | /// 10 | /// @example scss - Usage 11 | /// .element { 12 | /// background-color: shade(#ffbb52, 60%); 13 | /// } 14 | /// 15 | /// @example css - CSS Output 16 | /// .element { 17 | /// background-color: #664a20; 18 | /// } 19 | /// 20 | /// @return {Color} 21 | 22 | @function shade($color, $percent) { 23 | @return mix(#000, $color, $percent); 24 | } 25 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/functions/_strip-units.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Strips the unit from a number. 4 | /// 5 | /// @param {Number (With Unit)} $value 6 | /// 7 | /// @example scss - Usage 8 | /// $dimension: strip-units(10em); 9 | /// 10 | /// @example css - CSS Output 11 | /// $dimension: 10; 12 | /// 13 | /// @return {Number (Unitless)} 14 | 15 | @function strip-units($value) { 16 | @return ($value / ($value * 0 + 1)); 17 | } 18 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/functions/_tint.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Mixes a color with white. 4 | /// 5 | /// @param {Color} $color 6 | /// 7 | /// @param {Number (Percentage)} $percent 8 | /// The amount of white to be mixed in. 9 | /// 10 | /// @example scss - Usage 11 | /// .element { 12 | /// background-color: tint(#6ecaa6, 40%); 13 | /// } 14 | /// 15 | /// @example css - CSS Output 16 | /// .element { 17 | /// background-color: #a8dfc9; 18 | /// } 19 | /// 20 | /// @return {Color} 21 | 22 | @function tint($color, $percent) { 23 | @return mix(#fff, $color, $percent); 24 | } 25 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/functions/_transition-property-name.scss: -------------------------------------------------------------------------------- 1 | // Return vendor-prefixed property names if appropriate 2 | // Example: transition-property-names((transform, color, background), moz) -> -moz-transform, color, background 3 | //************************************************************************// 4 | @function transition-property-names($props, $vendor: false) { 5 | $new-props: (); 6 | 7 | @each $prop in $props { 8 | $new-props: append($new-props, transition-property-name($prop, $vendor), comma); 9 | } 10 | 11 | @return $new-props; 12 | } 13 | 14 | @function transition-property-name($prop, $vendor: false) { 15 | // put other properties that need to be prefixed here aswell 16 | @if $vendor and $prop == transform { 17 | @return unquote('-'+$vendor+'-'+$prop); 18 | } 19 | @else { 20 | @return $prop; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/functions/_unpack.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Converts shorthand to the 4-value syntax. 4 | /// 5 | /// @param {List} $shorthand 6 | /// 7 | /// @example scss - Usage 8 | /// .element { 9 | /// margin: unpack(1em 2em); 10 | /// } 11 | /// 12 | /// @example css - CSS Output 13 | /// .element { 14 | /// margin: 1em 2em 1em 2em; 15 | /// } 16 | 17 | @function unpack($shorthand) { 18 | @if length($shorthand) == 1 { 19 | @return nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1); 20 | } @else if length($shorthand) == 2 { 21 | @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 1) nth($shorthand, 2); 22 | } @else if length($shorthand) == 3 { 23 | @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 3) nth($shorthand, 2); 24 | } @else { 25 | @return $shorthand; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/helpers/_convert-units.scss: -------------------------------------------------------------------------------- 1 | //************************************************************************// 2 | // Helper function for str-to-num fn. 3 | // Source: http://sassmeister.com/gist/9647408 4 | //************************************************************************// 5 | @function _convert-units($number, $unit) { 6 | $strings: "px" "cm" "mm" "%" "ch" "pica" "in" "em" "rem" "pt" "pc" "ex" "vw" "vh" "vmin" "vmax", "deg", "rad", "grad", "turn"; 7 | $units: 1px 1cm 1mm 1% 1ch 1pica 1in 1em 1rem 1pt 1pc 1ex 1vw 1vh 1vmin 1vmax, 1deg, 1rad, 1grad, 1turn; 8 | $index: index($strings, $unit); 9 | 10 | @if not $index { 11 | @warn "Unknown unit `#{$unit}`."; 12 | @return false; 13 | } 14 | @return $number * nth($units, $index); 15 | } 16 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/helpers/_directional-values.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Directional-property mixins are shorthands for writing properties like the following 4 | /// 5 | /// @ignore You can also use `false` instead of `null`. 6 | /// 7 | /// @param {List} $vals 8 | /// List of directional values 9 | /// 10 | /// @example scss - Usage 11 | /// .element { 12 | /// @include border-style(dotted null); 13 | /// @include margin(null 0 10px); 14 | /// } 15 | /// 16 | /// @example css - CSS Output 17 | /// .element { 18 | /// border-bottom-style: dotted; 19 | /// border-top-style: dotted; 20 | /// margin-bottom: 10px; 21 | /// margin-left: 0; 22 | /// margin-right: 0; 23 | /// } 24 | /// 25 | /// @require {function} contains-falsy 26 | /// 27 | /// @return {List} 28 | 29 | @function collapse-directionals($vals) { 30 | $output: null; 31 | 32 | $a: nth($vals, 1); 33 | $b: if(length($vals) < 2, $a, nth($vals, 2)); 34 | $c: if(length($vals) < 3, $a, nth($vals, 3)); 35 | $d: if(length($vals) < 2, $a, nth($vals, if(length($vals) < 4, 2, 4))); 36 | 37 | @if $a == 0 { $a: 0; } 38 | @if $b == 0 { $b: 0; } 39 | @if $c == 0 { $c: 0; } 40 | @if $d == 0 { $d: 0; } 41 | 42 | @if $a == $b and $a == $c and $a == $d { $output: $a; } 43 | @else if $a == $c and $b == $d { $output: $a $b; } 44 | @else if $b == $d { $output: $a $b $c; } 45 | @else { $output: $a $b $c $d; } 46 | 47 | @return $output; 48 | } 49 | 50 | /// Output directional properties, for instance `margin`. 51 | /// 52 | /// @access private 53 | /// 54 | /// @param {String} $pre 55 | /// Prefix to use 56 | /// @param {String} $suf 57 | /// Suffix to use 58 | /// @param {List} $vals 59 | /// List of values 60 | /// 61 | /// @require {function} collapse-directionals 62 | /// @require {function} contains-falsy 63 | 64 | @mixin directional-property($pre, $suf, $vals) { 65 | // Property Names 66 | $top: $pre + "-top" + if($suf, "-#{$suf}", ""); 67 | $bottom: $pre + "-bottom" + if($suf, "-#{$suf}", ""); 68 | $left: $pre + "-left" + if($suf, "-#{$suf}", ""); 69 | $right: $pre + "-right" + if($suf, "-#{$suf}", ""); 70 | $all: $pre + if($suf, "-#{$suf}", ""); 71 | 72 | $vals: collapse-directionals($vals); 73 | 74 | @if contains-falsy($vals) { 75 | @if nth($vals, 1) { #{$top}: nth($vals, 1); } 76 | 77 | @if length($vals) == 1 { 78 | @if nth($vals, 1) { #{$right}: nth($vals, 1); } 79 | } @else { 80 | @if nth($vals, 2) { #{$right}: nth($vals, 2); } 81 | } 82 | 83 | @if length($vals) == 2 { 84 | @if nth($vals, 1) { #{$bottom}: nth($vals, 1); } 85 | @if nth($vals, 2) { #{$left}: nth($vals, 2); } 86 | } @else if length($vals) == 3 { 87 | @if nth($vals, 3) { #{$bottom}: nth($vals, 3); } 88 | @if nth($vals, 2) { #{$left}: nth($vals, 2); } 89 | } @else if length($vals) == 4 { 90 | @if nth($vals, 3) { #{$bottom}: nth($vals, 3); } 91 | @if nth($vals, 4) { #{$left}: nth($vals, 4); } 92 | } 93 | } @else { 94 | #{$all}: $vals; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/helpers/_font-source-declaration.scss: -------------------------------------------------------------------------------- 1 | // Used for creating the source string for fonts using @font-face 2 | // Reference: http://goo.gl/Ru1bKP 3 | 4 | @function font-url-prefixer($asset-pipeline) { 5 | @if $asset-pipeline == true { 6 | @return font-url; 7 | } @else { 8 | @return url; 9 | } 10 | } 11 | 12 | @function font-source-declaration( 13 | $font-family, 14 | $file-path, 15 | $asset-pipeline, 16 | $file-formats, 17 | $font-url) { 18 | 19 | $src: null; 20 | 21 | $formats-map: ( 22 | eot: "#{$file-path}.eot?#iefix" format("embedded-opentype"), 23 | woff2: "#{$file-path}.woff2" format("woff2"), 24 | woff: "#{$file-path}.woff" format("woff"), 25 | ttf: "#{$file-path}.ttf" format("truetype"), 26 | svg: "#{$file-path}.svg##{$font-family}" format("svg") 27 | ); 28 | 29 | @each $key, $values in $formats-map { 30 | @if contains($file-formats, $key) { 31 | $file-path: nth($values, 1); 32 | $font-format: nth($values, 2); 33 | 34 | @if $asset-pipeline == true { 35 | $src: append($src, font-url($file-path) $font-format, comma); 36 | } @else { 37 | $src: append($src, url($file-path) $font-format, comma); 38 | } 39 | } 40 | } 41 | 42 | @return $src; 43 | } 44 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/helpers/_gradient-positions-parser.scss: -------------------------------------------------------------------------------- 1 | @function _gradient-positions-parser($gradient-type, $gradient-positions) { 2 | @if $gradient-positions 3 | and ($gradient-type == linear) 4 | and (type-of($gradient-positions) != color) { 5 | $gradient-positions: _linear-positions-parser($gradient-positions); 6 | } 7 | @else if $gradient-positions 8 | and ($gradient-type == radial) 9 | and (type-of($gradient-positions) != color) { 10 | $gradient-positions: _radial-positions-parser($gradient-positions); 11 | } 12 | @return $gradient-positions; 13 | } 14 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/helpers/_linear-angle-parser.scss: -------------------------------------------------------------------------------- 1 | // Private function for linear-gradient-parser 2 | @function _linear-angle-parser($image, $first-val, $prefix, $suffix) { 3 | $offset: null; 4 | $unit-short: str-slice($first-val, str-length($first-val) - 2, str-length($first-val)); 5 | $unit-long: str-slice($first-val, str-length($first-val) - 3, str-length($first-val)); 6 | 7 | @if ($unit-long == "grad") or 8 | ($unit-long == "turn") { 9 | $offset: if($unit-long == "grad", -100grad * 3, -0.75turn); 10 | } 11 | 12 | @else if ($unit-short == "deg") or 13 | ($unit-short == "rad") { 14 | $offset: if($unit-short == "deg", -90 * 3, 1.6rad); 15 | } 16 | 17 | @if $offset { 18 | $num: _str-to-num($first-val); 19 | 20 | @return ( 21 | webkit-image: -webkit- + $prefix + ($offset - $num) + $suffix, 22 | spec-image: $image 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/helpers/_linear-gradient-parser.scss: -------------------------------------------------------------------------------- 1 | @function _linear-gradient-parser($image) { 2 | $image: unquote($image); 3 | $gradients: (); 4 | $start: str-index($image, "("); 5 | $end: str-index($image, ","); 6 | $first-val: str-slice($image, $start + 1, $end - 1); 7 | 8 | $prefix: str-slice($image, 0, $start); 9 | $suffix: str-slice($image, $end, str-length($image)); 10 | 11 | $has-multiple-vals: str-index($first-val, " "); 12 | $has-single-position: unquote(_position-flipper($first-val) + ""); 13 | $has-angle: is-number(str-slice($first-val, 0, 0)); 14 | 15 | @if $has-multiple-vals { 16 | $gradients: _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals); 17 | } 18 | 19 | @else if $has-single-position != "" { 20 | $pos: unquote($has-single-position + ""); 21 | 22 | $gradients: ( 23 | webkit-image: -webkit- + $image, 24 | spec-image: $prefix + "to " + $pos + $suffix 25 | ); 26 | } 27 | 28 | @else if $has-angle { 29 | // Rotate degree for webkit 30 | $gradients: _linear-angle-parser($image, $first-val, $prefix, $suffix); 31 | } 32 | 33 | @else { 34 | $gradients: ( 35 | webkit-image: -webkit- + $image, 36 | spec-image: $image 37 | ); 38 | } 39 | 40 | @return $gradients; 41 | } 42 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/helpers/_linear-positions-parser.scss: -------------------------------------------------------------------------------- 1 | @function _linear-positions-parser($pos) { 2 | $type: type-of(nth($pos, 1)); 3 | $spec: null; 4 | $degree: null; 5 | $side: null; 6 | $corner: null; 7 | $length: length($pos); 8 | // Parse Side and corner positions 9 | @if ($length > 1) { 10 | @if nth($pos, 1) == "to" { // Newer syntax 11 | $side: nth($pos, 2); 12 | 13 | @if $length == 2 { // eg. to top 14 | // Swap for backwards compatability 15 | $degree: _position-flipper(nth($pos, 2)); 16 | } 17 | @else if $length == 3 { // eg. to top left 18 | $corner: nth($pos, 3); 19 | } 20 | } 21 | @else if $length == 2 { // Older syntax ("top left") 22 | $side: _position-flipper(nth($pos, 1)); 23 | $corner: _position-flipper(nth($pos, 2)); 24 | } 25 | 26 | @if ("#{$side} #{$corner}" == "left top") or ("#{$side} #{$corner}" == "top left") { 27 | $degree: _position-flipper(#{$side}) _position-flipper(#{$corner}); 28 | } 29 | @else if ("#{$side} #{$corner}" == "right top") or ("#{$side} #{$corner}" == "top right") { 30 | $degree: _position-flipper(#{$side}) _position-flipper(#{$corner}); 31 | } 32 | @else if ("#{$side} #{$corner}" == "right bottom") or ("#{$side} #{$corner}" == "bottom right") { 33 | $degree: _position-flipper(#{$side}) _position-flipper(#{$corner}); 34 | } 35 | @else if ("#{$side} #{$corner}" == "left bottom") or ("#{$side} #{$corner}" == "bottom left") { 36 | $degree: _position-flipper(#{$side}) _position-flipper(#{$corner}); 37 | } 38 | $spec: to $side $corner; 39 | } 40 | @else if $length == 1 { 41 | // Swap for backwards compatability 42 | @if $type == string { 43 | $degree: $pos; 44 | $spec: to _position-flipper($pos); 45 | } 46 | @else { 47 | $degree: -270 - $pos; //rotate the gradient opposite from spec 48 | $spec: $pos; 49 | } 50 | } 51 | $degree: unquote($degree + ","); 52 | $spec: unquote($spec + ","); 53 | @return $degree $spec; 54 | } 55 | 56 | @function _position-flipper($pos) { 57 | @return if($pos == left, right, null) 58 | if($pos == right, left, null) 59 | if($pos == top, bottom, null) 60 | if($pos == bottom, top, null); 61 | } 62 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/helpers/_linear-side-corner-parser.scss: -------------------------------------------------------------------------------- 1 | // Private function for linear-gradient-parser 2 | @function _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals) { 3 | $val-1: str-slice($first-val, 0, $has-multiple-vals - 1 ); 4 | $val-2: str-slice($first-val, $has-multiple-vals + 1, str-length($first-val)); 5 | $val-3: null; 6 | $has-val-3: str-index($val-2, " "); 7 | 8 | @if $has-val-3 { 9 | $val-3: str-slice($val-2, $has-val-3 + 1, str-length($val-2)); 10 | $val-2: str-slice($val-2, 0, $has-val-3 - 1); 11 | } 12 | 13 | $pos: _position-flipper($val-1) _position-flipper($val-2) _position-flipper($val-3); 14 | $pos: unquote($pos + ""); 15 | 16 | // Use old spec for webkit 17 | @if $val-1 == "to" { 18 | @return ( 19 | webkit-image: -webkit- + $prefix + $pos + $suffix, 20 | spec-image: $image 21 | ); 22 | } 23 | 24 | // Bring the code up to spec 25 | @else { 26 | @return ( 27 | webkit-image: -webkit- + $image, 28 | spec-image: $prefix + "to " + $pos + $suffix 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/helpers/_radial-arg-parser.scss: -------------------------------------------------------------------------------- 1 | @function _radial-arg-parser($g1, $g2, $pos, $shape-size) { 2 | @each $value in $g1, $g2 { 3 | $first-val: nth($value, 1); 4 | $pos-type: type-of($first-val); 5 | $spec-at-index: null; 6 | 7 | // Determine if spec was passed to mixin 8 | @if type-of($value) == list { 9 | $spec-at-index: if(index($value, at), index($value, at), false); 10 | } 11 | @if $spec-at-index { 12 | @if $spec-at-index > 1 { 13 | @for $i from 1 through ($spec-at-index - 1) { 14 | $shape-size: $shape-size nth($value, $i); 15 | } 16 | @for $i from ($spec-at-index + 1) through length($value) { 17 | $pos: $pos nth($value, $i); 18 | } 19 | } 20 | @else if $spec-at-index == 1 { 21 | @for $i from ($spec-at-index + 1) through length($value) { 22 | $pos: $pos nth($value, $i); 23 | } 24 | } 25 | $g1: null; 26 | } 27 | 28 | // If not spec calculate correct values 29 | @else { 30 | @if ($pos-type != color) or ($first-val != "transparent") { 31 | @if ($pos-type == number) 32 | or ($first-val == "center") 33 | or ($first-val == "top") 34 | or ($first-val == "right") 35 | or ($first-val == "bottom") 36 | or ($first-val == "left") { 37 | 38 | $pos: $value; 39 | 40 | @if $pos == $g1 { 41 | $g1: null; 42 | } 43 | } 44 | 45 | @else if 46 | ($first-val == "ellipse") 47 | or ($first-val == "circle") 48 | or ($first-val == "closest-side") 49 | or ($first-val == "closest-corner") 50 | or ($first-val == "farthest-side") 51 | or ($first-val == "farthest-corner") 52 | or ($first-val == "contain") 53 | or ($first-val == "cover") { 54 | 55 | $shape-size: $value; 56 | 57 | @if $value == $g1 { 58 | $g1: null; 59 | } 60 | 61 | @else if $value == $g2 { 62 | $g2: null; 63 | } 64 | } 65 | } 66 | } 67 | } 68 | @return $g1, $g2, $pos, $shape-size; 69 | } 70 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/helpers/_radial-gradient-parser.scss: -------------------------------------------------------------------------------- 1 | @function _radial-gradient-parser($image) { 2 | $image: unquote($image); 3 | $gradients: (); 4 | $start: str-index($image, "("); 5 | $end: str-index($image, ","); 6 | $first-val: str-slice($image, $start + 1, $end - 1); 7 | 8 | $prefix: str-slice($image, 0, $start); 9 | $suffix: str-slice($image, $end, str-length($image)); 10 | 11 | $is-spec-syntax: str-index($first-val, "at"); 12 | 13 | @if $is-spec-syntax and $is-spec-syntax > 1 { 14 | $keyword: str-slice($first-val, 1, $is-spec-syntax - 2); 15 | $pos: str-slice($first-val, $is-spec-syntax + 3, str-length($first-val)); 16 | $pos: append($pos, $keyword, comma); 17 | 18 | $gradients: ( 19 | webkit-image: -webkit- + $prefix + $pos + $suffix, 20 | spec-image: $image 21 | ); 22 | } 23 | 24 | @else if $is-spec-syntax == 1 { 25 | $pos: str-slice($first-val, $is-spec-syntax + 3, str-length($first-val)); 26 | 27 | $gradients: ( 28 | webkit-image: -webkit- + $prefix + $pos + $suffix, 29 | spec-image: $image 30 | ); 31 | } 32 | 33 | @else if str-index($image, "cover") or str-index($image, "contain") { 34 | @warn "Radial-gradient needs to be updated to conform to latest spec."; 35 | 36 | $gradients: ( 37 | webkit-image: null, 38 | spec-image: $image 39 | ); 40 | } 41 | 42 | @else { 43 | $gradients: ( 44 | webkit-image: -webkit- + $image, 45 | spec-image: $image 46 | ); 47 | } 48 | 49 | @return $gradients; 50 | } 51 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/helpers/_radial-positions-parser.scss: -------------------------------------------------------------------------------- 1 | @function _radial-positions-parser($gradient-pos) { 2 | $shape-size: nth($gradient-pos, 1); 3 | $pos: nth($gradient-pos, 2); 4 | $shape-size-spec: _shape-size-stripper($shape-size); 5 | 6 | $pre-spec: unquote(if($pos, "#{$pos}, ", null)) 7 | unquote(if($shape-size, "#{$shape-size},", null)); 8 | $pos-spec: if($pos, "at #{$pos}", null); 9 | 10 | $spec: "#{$shape-size-spec} #{$pos-spec}"; 11 | 12 | // Add comma 13 | @if ($spec != " ") { 14 | $spec: "#{$spec},"; 15 | } 16 | 17 | @return $pre-spec $spec; 18 | } 19 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/helpers/_render-gradients.scss: -------------------------------------------------------------------------------- 1 | // User for linear and radial gradients within background-image or border-image properties 2 | 3 | @function _render-gradients($gradient-positions, $gradients, $gradient-type, $vendor: false) { 4 | $pre-spec: null; 5 | $spec: null; 6 | $vendor-gradients: null; 7 | @if $gradient-type == linear { 8 | @if $gradient-positions { 9 | $pre-spec: nth($gradient-positions, 1); 10 | $spec: nth($gradient-positions, 2); 11 | } 12 | } 13 | @else if $gradient-type == radial { 14 | $pre-spec: nth($gradient-positions, 1); 15 | $spec: nth($gradient-positions, 2); 16 | } 17 | 18 | @if $vendor { 19 | $vendor-gradients: -#{$vendor}-#{$gradient-type}-gradient(#{$pre-spec} $gradients); 20 | } 21 | @else if $vendor == false { 22 | $vendor-gradients: "#{$gradient-type}-gradient(#{$spec} #{$gradients})"; 23 | $vendor-gradients: unquote($vendor-gradients); 24 | } 25 | @return $vendor-gradients; 26 | } 27 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/helpers/_shape-size-stripper.scss: -------------------------------------------------------------------------------- 1 | @function _shape-size-stripper($shape-size) { 2 | $shape-size-spec: null; 3 | @each $value in $shape-size { 4 | @if ($value == "cover") or ($value == "contain") { 5 | $value: null; 6 | } 7 | $shape-size-spec: "#{$shape-size-spec} #{$value}"; 8 | } 9 | @return $shape-size-spec; 10 | } 11 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/helpers/_str-to-num.scss: -------------------------------------------------------------------------------- 1 | //************************************************************************// 2 | // Helper function for linear/radial-gradient-parsers. 3 | // Source: http://sassmeister.com/gist/9647408 4 | //************************************************************************// 5 | @function _str-to-num($string) { 6 | // Matrices 7 | $strings: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"; 8 | $numbers: 0 1 2 3 4 5 6 7 8 9; 9 | 10 | // Result 11 | $result: 0; 12 | $divider: 0; 13 | $minus: false; 14 | 15 | // Looping through all characters 16 | @for $i from 1 through str-length($string) { 17 | $character: str-slice($string, $i, $i); 18 | $index: index($strings, $character); 19 | 20 | @if $character == "-" { 21 | $minus: true; 22 | } 23 | 24 | @else if $character == "." { 25 | $divider: 1; 26 | } 27 | 28 | @else { 29 | @if not $index { 30 | $result: if($minus, $result * -1, $result); 31 | @return _convert-units($result, str-slice($string, $i)); 32 | } 33 | 34 | $number: nth($numbers, $index); 35 | 36 | @if $divider == 0 { 37 | $result: $result * 10; 38 | } 39 | 40 | @else { 41 | // Move the decimal dot to the left 42 | $divider: $divider * 10; 43 | $number: $number / $divider; 44 | } 45 | 46 | $result: $result + $number; 47 | } 48 | } 49 | @return if($minus, $result * -1, $result); 50 | } 51 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/settings/_asset-pipeline.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// A global setting to enable or disable the `$asset-pipeline` variable for all functions that accept it. 4 | /// 5 | /// @type Bool 6 | 7 | $asset-pipeline: false !default; 8 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/settings/_prefixer.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Global variables to enable or disable vendor prefixes 4 | 5 | $prefix-for-webkit: true !default; 6 | $prefix-for-mozilla: true !default; 7 | $prefix-for-microsoft: true !default; 8 | $prefix-for-opera: true !default; 9 | $prefix-for-spec: true !default; 10 | -------------------------------------------------------------------------------- /src/components/bourbon/app/assets/stylesheets/settings/_px-to-em.scss: -------------------------------------------------------------------------------- 1 | $em-base: 16px !default; 2 | -------------------------------------------------------------------------------- /src/components/bourbon/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bourbon", 3 | "description": "A simple and lightweight mixin library for Sass.", 4 | "version": "4.2.1", 5 | "main": "app/assets/stylesheets/_bourbon.scss", 6 | "license": "MIT", 7 | "ignore": [ 8 | "**/.*", 9 | "CONTRIBUTING.md", 10 | "Gemfile", 11 | "Gemfile.lock", 12 | "Rakefile", 13 | "_site", 14 | "bin", 15 | "bourbon.gemspec", 16 | "features", 17 | "lib", 18 | "package.json", 19 | "sache.json", 20 | "spec" 21 | ], 22 | "keywords": [ 23 | "css", 24 | "mixins", 25 | "sass", 26 | "scss" 27 | ], 28 | "authors": [ 29 | "thoughtbot (http://thoughtbot.com)" 30 | ], 31 | "homepage": "http://bourbon.io", 32 | "repository": { 33 | "type": "git", 34 | "url": "https://github.com/thoughtbot/bourbon.git" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/components/fontfaceobserver/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fontfaceobserver", 3 | "homepage": "https://github.com/bramstein/fontfaceobserver", 4 | "version": "1.4.9", 5 | "_release": "1.4.9", 6 | "_resolution": { 7 | "type": "version", 8 | "tag": "v1.4.9", 9 | "commit": "1369a796e00761401e2f1bea42ddd49c66df4039" 10 | }, 11 | "_source": "git://github.com/bramstein/fontfaceobserver.git", 12 | "_target": "~1.4.9", 13 | "_originalSource": "fontfaceobserver", 14 | "_direct": true 15 | } -------------------------------------------------------------------------------- /src/components/fontfaceobserver/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | node_modules 3 | -------------------------------------------------------------------------------- /src/components/fontfaceobserver/Gruntfile.js: -------------------------------------------------------------------------------- 1 | var extend = require('extend'); 2 | 3 | module.exports = function (grunt) { 4 | var compilerOptions = { 5 | compilation_level: 'ADVANCED_OPTIMIZATIONS', 6 | warning_level: 'VERBOSE', 7 | summary_detail_level: 3, 8 | language_in: 'ECMASCRIPT5_STRICT', 9 | output_wrapper: '(function(){%output%}());', 10 | use_types_for_optimization: true 11 | }; 12 | 13 | grunt.initConfig({ 14 | pkg: grunt.file.readJSON('package.json'), 15 | clean: ['build'], 16 | connect: { 17 | server: { 18 | options: { 19 | base: "", 20 | port: 9999 21 | } 22 | } 23 | }, 24 | watch: {}, 25 | exec: { 26 | test: { 27 | command: 'browserstack-test -u $BROWSERSTACK_USERNAME -p $BROWSERSTACK_PASSWORD -k $BROWSERSTACK_KEY -b browsers.json http://localhost:9999/test/index.html' 28 | }, 29 | deps: 'calcdeps -i src -i exports.js -p src -p ./vendor/google/base.js -p node_modules/promis/src/ -p node_modules/closure-dom/src/dom.js -o deps > test/deps.js' 30 | }, 31 | jshint: { 32 | all: ['src/**/*.js'], 33 | options: { 34 | // ... better written as dot notation 35 | "-W069": true, 36 | 37 | // type definitions 38 | "-W030": true, 39 | 40 | // Don't make functions within loops 41 | "-W083": true, 42 | 43 | // Wrap the /regexp/ literal in parens to disambiguate the slash operator 44 | "-W092": true 45 | } 46 | }, 47 | closurecompiler: { 48 | dist: { 49 | files: { 50 | "fontfaceobserver.js": ['src/**/*.js', 'exports.js', 'node_modules/closure-dom/src/dom.js', 'node_modules/promis/src/**/*.js'] 51 | }, 52 | options: extend({}, compilerOptions, { 53 | define: "DEBUG=false" 54 | }) 55 | }, 56 | compile: { 57 | files: { 58 | "build/fontfaceobserver.js": ['src/**/*.js', 'exports.js', 'node_modules/closure-dom/src/dom.js', 'node_modules/promis/src/**/*.js'], 59 | }, 60 | options: extend({}, compilerOptions, { 61 | define: "DEBUG=false" 62 | }) 63 | }, 64 | debug: { 65 | files: { 66 | "build/fontfaceobserver.debug.js": ['src/**/*.js', 'exports.js', 'node_modules/closure-dom/src/dom.js', 'node_modules/promis/src/**/*.js'] 67 | }, 68 | options: extend({}, compilerOptions, { 69 | debug: true, 70 | formatting: ['PRETTY_PRINT', 'PRINT_INPUT_DELIMITER'] 71 | }) 72 | } 73 | }, 74 | concat: { 75 | dist: { 76 | src: ['build/fontfaceobserver.js'], 77 | dest: 'fontfaceobserver.js' 78 | } 79 | } 80 | }); 81 | 82 | grunt.loadNpmTasks('grunt-closurecompiler'); 83 | grunt.loadNpmTasks('grunt-contrib-clean'); 84 | grunt.loadNpmTasks('grunt-contrib-jshint'); 85 | grunt.loadNpmTasks('grunt-contrib-connect'); 86 | grunt.loadNpmTasks('grunt-contrib-watch'); 87 | grunt.loadNpmTasks('grunt-contrib-concat'); 88 | grunt.loadNpmTasks('grunt-exec'); 89 | 90 | grunt.registerTask('compile', ['closurecompiler:compile']); 91 | grunt.registerTask('debug', ['closurecompiler:debug']); 92 | grunt.registerTask('default', ['compile']); 93 | grunt.registerTask('test', ['connect', 'exec:test']); 94 | grunt.registerTask('dev', ['connect', 'watch']); 95 | grunt.registerTask('dist', ['clean', 'closurecompiler:compile', 'concat:dist']); 96 | }; 97 | -------------------------------------------------------------------------------- /src/components/fontfaceobserver/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 - Bram Stein 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 15 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 16 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 17 | EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 19 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 22 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 23 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /src/components/fontfaceobserver/README.md: -------------------------------------------------------------------------------- 1 | # Font Face Observer 2 | 3 | Font Face Observer is a small `@font-face` loader and monitor (4.6KB minified and 1.7KB gzipped) compatible with any web font service. It will monitor when a web font is applied to the page and notify you. It does not limit you in any way in where, when, or how you load your web fonts. Unlike the [Web Font Loader](https://github.com/typekit/webfontloader) Font Face Observer uses scroll events to detect font loads efficiently and with minimum overhead. 4 | 5 | ## How to use 6 | 7 | Include your `@font-face` rules as usual. Fonts can be supplied by either a font service such as [Google Fonts](http://www.google.com/fonts), [Typekit](http://typekit.com), and [Webtype](http://webtype.com) or be self-hosted. It doesn't matter where, when, or how you load your fonts. You can set up monitoring for a single font family at a time: 8 | 9 | var observer = new FontFaceObserver('My Family', { 10 | weight: 400 11 | }); 12 | 13 | observer.check().then(function () { 14 | console.log('Font is available'); 15 | }, function () { 16 | console.log('Font is not available'); 17 | }); 18 | 19 | The `FontFaceObserver` constructor takes two arguments: the font family name (required) and an object describing the variation (optional). The object can contain `weight`, `style`, `stretch`, `variant`, and `featureSettings` properties. If a property is not present it will default to `normal`. To start observing font loads, call the `check` method. It'll immediately return a new Promise that resolves when the font is available and rejected when the font is not available. 20 | 21 | If your font doesn't contain latin characters you can pass a custom test string to the `check` method. 22 | 23 | var observer = new FontFaceObserver('My Family', {}); 24 | 25 | observer.check('中国').then(function () { 26 | console.log('Font is available'); 27 | }, function () { 28 | console.log('Font is not available'); 29 | }); 30 | 31 | The default timeout for giving up on font loading is 3 seconds. You can increase or decrease this by passing a number of milliseconds as the second parameter to the `check` method. 32 | 33 | var observer = new FontFaceObserver('My Family', {}); 34 | 35 | observer.check(null, 5000).then(function () { 36 | console.log('Font is available'); 37 | }, function () { 38 | console.log('Font is not available after waiting 5 seconds'); 39 | }); 40 | 41 | ## Installation 42 | 43 | If you're using npm you can install Font Face Observer as a dependency: 44 | 45 | > npm install fontfaceobserver 46 | 47 | You can then include `node_modules/fontfaceobserver/fontfaceobserver.js`. If you're not using npm, grab `fontfaceobserver.js` and include it in your project. 48 | 49 | ## Browser support 50 | 51 | FontFaceObserver has been tested and works on the following browsers: 52 | 53 | * Chrome (desktop & Android) 54 | * Firefox 55 | * Opera 56 | * Safari (desktop & iOS) 57 | * IE9+ 58 | * Android WebKit 59 | 60 | ## License 61 | 62 | FontFaceObserver is licensed under the BSD License. Copyright 2014-2015 Bram Stein. All rights reserved. 63 | -------------------------------------------------------------------------------- /src/components/fontfaceobserver/exports.js: -------------------------------------------------------------------------------- 1 | goog.require('fontface.Observer'); 2 | 3 | /** 4 | * @define {boolean} DEBUG 5 | */ 6 | var DEBUG = true; 7 | 8 | window['FontFaceObserver'] = fontface.Observer; 9 | window['FontFaceObserver']['prototype']['check'] = fontface.Observer.prototype.check; 10 | -------------------------------------------------------------------------------- /src/components/fontfaceobserver/externs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @constructor 3 | * 4 | * @param {string} family 5 | * @param {Object} descriptors 6 | */ 7 | var FontFaceObserver = function (family, descriptors) {}; 8 | 9 | /** 10 | * @param {string=} opt_text 11 | * @param {number=} opt_timeout 12 | * 13 | * @return {Promise.} 14 | */ 15 | FontFaceObserver.prototype.check = function (opt_text, opt_timeout) {}; 16 | -------------------------------------------------------------------------------- /src/components/fontfaceobserver/fontfaceobserver.js: -------------------------------------------------------------------------------- 1 | (function(){'use strict';function e(a){function b(){document.body?a():setTimeout(b,0)}b()};function f(a){this.a=document.createElement("div");this.a.setAttribute("aria-hidden","true");this.a.appendChild(document.createTextNode(a));this.b=document.createElement("span");this.c=document.createElement("span");this.f=document.createElement("span");this.e=document.createElement("span");this.d=-1;this.b.style.cssText="display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;";this.c.style.cssText="display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;"; 2 | this.e.style.cssText="display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;";this.f.style.cssText="display:inline-block;width:200%;height:200%;";this.b.appendChild(this.f);this.c.appendChild(this.e);this.a.appendChild(this.b);this.a.appendChild(this.c)}function n(a,b,c){a.a.style.cssText="min-width:20px;min-height:20px;display:inline-block;position:absolute;width:auto;margin:0;padding:0;top:-999px;left:-999px;white-space:nowrap;font-size:100px;font-family:"+b+";"+c} 3 | function u(a){var b=a.a.offsetWidth,c=b+100;a.e.style.width=c+"px";a.c.scrollLeft=c;a.b.scrollLeft=a.b.scrollWidth+100;return a.d!==b?(a.d=b,!0):!1}function z(a,b){a.b.addEventListener("scroll",function(){u(a)&&null!==a.a.parentNode&&b(a.d)},!1);a.c.addEventListener("scroll",function(){u(a)&&null!==a.a.parentNode&&b(a.d)},!1);u(a)};function A(a){this.a=B;this.b=void 0;this.c=[];var b=this;try{a(function(a){b.resolve(a)},function(a){b.reject(a)})}catch(c){b.reject(c)}}var B=2;A.prototype.resolve=function(a){var b=this;if(b.a===B){if(a===b)throw new TypeError("Promise settled with itself.");var c=!1;try{var g=a&&a.then;if(null!==a&&"object"===typeof a&&"function"===typeof g){g.call(a,function(a){c||b.resolve(a);c=!0},function(a){c||b.reject(a);c=!0});return}}catch(d){c||b.reject(d);return}b.a=0;b.b=a;C(b)}}; 4 | A.prototype.reject=function(a){if(this.a===B){if(a===this)throw new TypeError("Promise settled with itself.");this.a=1;this.b=a;C(this)}};function C(a){setTimeout(function(){if(a.a!==B)for(;a.c.length;){var b=a.c.shift(),c=b[0],g=b[1],d=b[2],b=b[3];try{0===a.a?"function"===typeof c?d(c.call(void 0,a.b)):d(a.b):1===a.a&&("function"===typeof g?d(g.call(void 0,a.b)):b(a.b))}catch(h){b(h)}}},0)}A.prototype.catch=function(a){return this.then(void 0,a)}; 5 | A.prototype.then=function(a,b){var c=this;return new A(function(g,d){c.c.push([a,b,g,d]);C(c)})}; 6 | if(window.Promise){var D=window.Promise;D.prototype.then=window.Promise.prototype.then;D.prototype.catch=window.Promise.prototype["catch"];D.all=window.Promise.all;D.race=window.Promise.race;D.resolve=window.Promise.resolve;D.reject=window.Promise.reject}else D=A,D.prototype.then=A.prototype.then,D.prototype.catch=A.prototype.catch,D.all=A.prototype.all,D.race=A.prototype.race,D.resolve=A.prototype.resolve,D.reject=A.prototype.reject;function E(a,b){var c=b||{};this.family=a;this.style=c.style||"normal";this.variant=c.variant||"normal";this.weight=c.weight||"normal";this.stretch=c.stretch||"stretch";this.featureSettings=c.featureSettings||"normal"}var F=null; 7 | E.prototype.a=function(a,b){var c=a||"BESbswy",g=b||3E3,d="font-style:"+this.style+";font-variant:"+this.variant+";font-weight:"+this.weight+";font-stretch:"+this.stretch+";font-feature-settings:"+this.featureSettings+";-moz-font-feature-settings:"+this.featureSettings+";-webkit-font-feature-settings:"+this.featureSettings+";",h=document.createElement("div"),p=new f(c),q=new f(c),r=new f(c),k=-1,l=-1,m=-1,v=-1,w=-1,x=-1,t=this;return new D(function(a,b){function c(){null!==h.parentNode&&h.parentNode.removeChild(h)} 8 | function y(){if(-1!==k&&-1!==l||-1!==k&&-1!==m||-1!==l&&-1!==m)if(k===l||k===m||l===m){if(null===F){var b=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);F=!!b&&(536>parseInt(b[1],10)||536===parseInt(b[1],10)&&11>=parseInt(b[2],10))}F?k===v&&l===v&&m===v||k===w&&l===w&&m===w||k===x&&l===x&&m===x||(c(),a(t)):(c(),a(t))}}e(function(){function a(){if(Date.now()-G>=g)c(),b(t);else{var d=document.hidden;if(!0===d||void 0===d)k=p.a.offsetWidth,l=q.a.offsetWidth,m=r.a.offsetWidth, 9 | y();setTimeout(a,50)}}var G=Date.now();n(p,"sans-serif",d);n(q,"serif",d);n(r,"monospace",d);h.appendChild(p.a);h.appendChild(q.a);h.appendChild(r.a);document.body.appendChild(h);v=p.a.offsetWidth;w=q.a.offsetWidth;x=r.a.offsetWidth;a();z(p,function(a){k=a;y()});n(p,t.family+",sans-serif",d);z(q,function(a){l=a;y()});n(q,t.family+",serif",d);z(r,function(a){m=a;y()});n(r,t.family+",monospace",d)})})};window.FontFaceObserver=E;window.FontFaceObserver.prototype.check=E.prototype.a;}()); 10 | -------------------------------------------------------------------------------- /src/components/fontfaceobserver/fontfaceobserver.standalone.js: -------------------------------------------------------------------------------- 1 | (function(){'use strict';function f(a){this.a=k;this.b=void 0;this.d=[];var b=this;try{a(function(a){l(b,a)},function(a){m(b,a)})}catch(c){m(b,c)}}var k=2;function n(a){return new f(function(b,c){c(a)})}function p(a){return new f(function(b){b(a)})} 2 | function l(a,b){if(a.a===k){if(b===a)throw new TypeError("Promise settled with itself.");var c=!1;try{var d=b&&b.then;if(null!==b&&"object"===typeof b&&"function"===typeof d){d.call(b,function(b){c||l(a,b);c=!0},function(b){c||m(a,b);c=!0});return}}catch(e){c||m(a,e);return}a.a=0;a.b=b;q(a)}}function m(a,b){if(a.a===k){if(b===a)throw new TypeError("Promise settled with itself.");a.a=1;a.b=b;q(a)}} 3 | function q(a){setTimeout(function(){if(a.a!==k)for(;a.d.length;){var b=a.d.shift(),c=b[0],d=b[1],e=b[2],b=b[3];try{0===a.a?"function"===typeof c?e(c.call(void 0,a.b)):e(a.b):1===a.a&&("function"===typeof d?e(d.call(void 0,a.b)):b(a.b))}catch(g){b(g)}}},0)}f.prototype.e=function(a){return this.c(void 0,a)};f.prototype.c=function(a,b){var c=this;return new f(function(d,e){c.d.push([a,b,d,e]);q(c)})}; 4 | function r(a){return new f(function(b,c){function d(c){return function(d){g[c]=d;e+=1;e===a.length&&b(g)}}var e=0,g=[];0===a.length&&b(g);for(var h=0;hparseInt(b[1],10)||536===parseInt(b[1],10)&&11>=parseInt(b[2],10))}B?d===q&&e===q&&f===q||d===r&&e===r&&f===r||d===t&&e===t&&f===t||(c(),a(p)):(c(),a(p))}}h(function(){function a(){if(Date.now()-D>=C)c(),b(p);else{var A=document.hidden;if(!0===A||void 0===A)d=l.a.offsetWidth,e=m.a.offsetWidth,f=n.a.offsetWidth, 11 | u();setTimeout(a,50)}}var D=Date.now();w(l,"sans-serif",k);w(m,"serif",k);w(n,"monospace",k);g.appendChild(l.a);g.appendChild(m.a);g.appendChild(n.a);document.body.appendChild(g);q=l.a.offsetWidth;r=m.a.offsetWidth;t=n.a.offsetWidth;a();y(l,function(a){d=a;u()});w(l,p.family+",sans-serif",k);y(m,function(a){e=a;u()});w(m,p.family+",serif",k);y(n,function(a){f=a;u()});w(n,p.family+",monospace",k)})})};window.FontFaceObserver=z;window.FontFaceObserver.prototype.check=z.prototype.a;}()); 12 | -------------------------------------------------------------------------------- /src/components/fontfaceobserver/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fontfaceobserver", 3 | "version": "1.4.9", 4 | "description": "Detect if web fonts are available", 5 | "directories": { 6 | "test": "test" 7 | }, 8 | "repository": "https://github.com/bramstein/fontfaceobserver.git", 9 | "main": "fontfaceobserver.js", 10 | "keywords": [ 11 | "fontloader", 12 | "fonts", 13 | "font", 14 | "font-face", 15 | "web font", 16 | "font load", 17 | "font events" 18 | ], 19 | "author": "Bram Stein (http://www.bramstein.com/)", 20 | "license": "BSD", 21 | "dependencies": { 22 | "promis": "=1.0.4", 23 | "closure-dom": "=0.0.1" 24 | }, 25 | "devDependencies": { 26 | "mocha": "=2.2.1", 27 | "mocha-browserstack": "=0.2.2", 28 | "sinon": "=1.14.1", 29 | "grunt": "^0.4.5", 30 | "grunt-contrib-clean": "=0.6.0", 31 | "grunt-contrib-jshint": "^0.11.1", 32 | "grunt-contrib-connect": "~0.9.0", 33 | "grunt-contrib-watch": "~0.6.1", 34 | "grunt-contrib-concat": "^0.5.1", 35 | "grunt-exec": "~0.4.6", 36 | "grunt-closurecompiler": "^0.9.9", 37 | "extend": "^2.0.0", 38 | "unexpected": "^6.4.0" 39 | }, 40 | "scripts": { 41 | "test": "grunt test" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/components/fontfaceobserver/src/descriptors.js: -------------------------------------------------------------------------------- 1 | goog.provide('fontface.Descriptors'); 2 | 3 | /** 4 | * @typedef {{ 5 | * style: (string|undefined), 6 | * weight: (string|undefined), 7 | * stretch: (string|undefined), 8 | * variant: (string|undefined), 9 | * featureSettings: (string|undefined) 10 | * }} 11 | */ 12 | fontface.Descriptors; 13 | -------------------------------------------------------------------------------- /src/components/fontfaceobserver/src/ruler.js: -------------------------------------------------------------------------------- 1 | goog.provide('fontface.Ruler'); 2 | 3 | goog.require('dom'); 4 | 5 | goog.scope(function () { 6 | /** 7 | * @constructor 8 | * @param {string} text 9 | */ 10 | fontface.Ruler = function (text) { 11 | var style = 'display:inline-block;' + 12 | 'position:absolute;' + 13 | 'height:100%;' + 14 | 'width:100%;' + 15 | 'overflow:scroll;'; 16 | 17 | this.element = dom.createElement('div'); 18 | this.element.setAttribute('aria-hidden', 'true'); 19 | 20 | dom.append(this.element, dom.createText(text)); 21 | 22 | this.collapsible = dom.createElement('span'); 23 | this.expandable = dom.createElement('span'); 24 | this.collapsibleInner = dom.createElement('span'); 25 | this.expandableInner = dom.createElement('span'); 26 | 27 | this.lastOffsetWidth = -1; 28 | 29 | dom.style(this.collapsible, style); 30 | dom.style(this.expandable, style); 31 | dom.style(this.expandableInner, style); 32 | dom.style(this.collapsibleInner, 'display:inline-block;width:200%;height:200%;'); 33 | 34 | dom.append(this.collapsible, this.collapsibleInner); 35 | dom.append(this.expandable, this.expandableInner); 36 | 37 | dom.append(this.element, this.collapsible); 38 | dom.append(this.element, this.expandable); 39 | }; 40 | 41 | var Ruler = fontface.Ruler; 42 | 43 | /** 44 | * @return {Element} 45 | */ 46 | Ruler.prototype.getElement = function () { 47 | return this.element; 48 | }; 49 | 50 | /** 51 | * @param {string} family 52 | * @param {string} description 53 | */ 54 | Ruler.prototype.setFont = function (family, description) { 55 | dom.style(this.element, 'min-width:20px;' + 56 | 'min-height:20px;' + 57 | 'display:inline-block;' + 58 | 'position:absolute;' + 59 | 'width:auto;' + 60 | 'margin:0;' + 61 | 'padding:0;' + 62 | 'top:-999px;' + 63 | 'left:-999px;' + 64 | 'white-space:nowrap;' + 65 | 'font-size:100px;' + 66 | 'font-family:' + family + ';' + 67 | description); 68 | }; 69 | 70 | /** 71 | * @return {number} 72 | */ 73 | Ruler.prototype.getWidth = function () { 74 | return this.element.offsetWidth; 75 | }; 76 | 77 | /** 78 | * @param {string} width 79 | */ 80 | Ruler.prototype.setWidth = function (width) { 81 | this.element.style.width = width + 'px'; 82 | }; 83 | 84 | /** 85 | * @private 86 | * 87 | * @return {boolean} 88 | */ 89 | Ruler.prototype.reset = function () { 90 | var offsetWidth = this.getWidth(), 91 | width = offsetWidth + 100; 92 | 93 | this.expandableInner.style.width = width + 'px'; 94 | this.expandable.scrollLeft = width; 95 | this.collapsible.scrollLeft = this.collapsible.scrollWidth + 100; 96 | 97 | if (this.lastOffsetWidth !== offsetWidth) { 98 | this.lastOffsetWidth = offsetWidth; 99 | return true; 100 | } else { 101 | return false; 102 | } 103 | }; 104 | 105 | /** 106 | * @private 107 | * @param {function(number)} callback 108 | */ 109 | Ruler.prototype.onScroll = function (callback) { 110 | if (this.reset() && this.element.parentNode !== null) { 111 | callback(this.lastOffsetWidth); 112 | } 113 | }; 114 | 115 | /** 116 | * @param {function(number)} callback 117 | */ 118 | Ruler.prototype.onResize = function (callback) { 119 | var that = this; 120 | 121 | this.collapsible.addEventListener('scroll', function () { 122 | that.onScroll(callback); 123 | }, false); 124 | this.expandable.addEventListener('scroll', function () { 125 | that.onScroll(callback); 126 | }, false); 127 | this.reset(); 128 | }; 129 | }); 130 | -------------------------------------------------------------------------------- /src/components/fontfaceobserver/test/assets/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | hello 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/components/fontfaceobserver/test/assets/sourcesanspro-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/components/fontfaceobserver/test/assets/sourcesanspro-regular.eot -------------------------------------------------------------------------------- /src/components/fontfaceobserver/test/assets/sourcesanspro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/components/fontfaceobserver/test/assets/sourcesanspro-regular.woff -------------------------------------------------------------------------------- /src/components/fontfaceobserver/test/assets/subset.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/components/fontfaceobserver/test/assets/subset.eot -------------------------------------------------------------------------------- /src/components/fontfaceobserver/test/assets/subset.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/components/fontfaceobserver/test/assets/subset.woff -------------------------------------------------------------------------------- /src/components/fontfaceobserver/test/deps.js: -------------------------------------------------------------------------------- 1 | // This file was autogenerated by calcdeps.js 2 | goog.addDependency("../../node_modules/closure-dom/src/dom.js", ["dom"], []); 3 | goog.addDependency("../../src/descriptors.js", ["fontface.Descriptors"], []); 4 | goog.addDependency("../../src/main.js", [], ["fontface.Observer"]); 5 | goog.addDependency("../../src/observer.js", ["fontface.Observer"], ["fontface.Ruler","dom"]); 6 | goog.addDependency("../../src/ruler.js", ["fontface.Ruler"], []); 7 | -------------------------------------------------------------------------------- /src/components/fontfaceobserver/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | FontFaceObserver 6 | 7 | 8 | 48 | 49 | 50 |
    51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 66 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /src/components/fontfaceobserver/test/ruler-test.js: -------------------------------------------------------------------------------- 1 | describe('Ruler', function () { 2 | var Ruler = fontface.Ruler, 3 | ruler = null; 4 | 5 | beforeEach(function () { 6 | ruler = new Ruler('hello'); 7 | ruler.setFont('', ''); 8 | ruler.setWidth(100); 9 | document.body.appendChild(ruler.getElement()); 10 | }); 11 | 12 | afterEach(function () { 13 | document.body.removeChild(ruler.getElement()); 14 | ruler = null; 15 | }); 16 | 17 | describe('#constructor', function () { 18 | it('creates a new instance with the correct signature', function () { 19 | expect(ruler, 'not to be', null); 20 | expect(ruler.onResize, 'to be a function'); 21 | expect(ruler.setFont, 'to be a function'); 22 | }); 23 | }); 24 | 25 | describe('#onResize', function () { 26 | it('detects expansion', function (done) { 27 | ruler.onResize(function (width) { 28 | expect(width, 'to equal', 200); 29 | done(); 30 | }); 31 | 32 | ruler.setWidth(200); 33 | }); 34 | 35 | it('detects multiple expansions', function (done) { 36 | var first = true; 37 | 38 | ruler.onResize(function (width) { 39 | if (first) { 40 | expect(width, 'to equal', 200); 41 | ruler.setWidth(300); 42 | first = false; 43 | } else { 44 | expect(width, 'to equal', 300); 45 | done(); 46 | } 47 | }); 48 | 49 | ruler.setWidth(200); 50 | }); 51 | 52 | it('detects collapse', function (done) { 53 | ruler.onResize(function (width) { 54 | expect(width, 'to equal', 50); 55 | done(); 56 | }); 57 | 58 | ruler.setWidth(50); 59 | }); 60 | 61 | it('detects multiple collapses', function (done) { 62 | var first = true; 63 | 64 | ruler.onResize(function (width) { 65 | if (first) { 66 | expect(width, 'to equal', 70); 67 | ruler.setWidth(50); 68 | first = false; 69 | } else { 70 | expect(width, 'to equal', 50); 71 | done(); 72 | } 73 | }); 74 | 75 | ruler.setWidth(70); 76 | }); 77 | 78 | it('detects a collapse and an expansion', function (done) { 79 | var first = true; 80 | 81 | ruler.onResize(function (width) { 82 | if (first) { 83 | expect(width, 'to equal', 70); 84 | ruler.setWidth(100); 85 | first = false; 86 | } else { 87 | expect(width, 'to equal', 100); 88 | done(); 89 | } 90 | }); 91 | 92 | ruler.setWidth(70); 93 | }); 94 | 95 | it('detects an expansion and a collapse', function (done) { 96 | var first = true; 97 | 98 | ruler.onResize(function (width) { 99 | if (first) { 100 | expect(width, 'to equal', 200); 101 | ruler.setWidth(100); 102 | first = false; 103 | } else { 104 | expect(width, 'to equal', 100); 105 | done(); 106 | } 107 | }); 108 | 109 | ruler.setWidth(200); 110 | }); 111 | }); 112 | }); 113 | -------------------------------------------------------------------------------- /src/components/inuit-normalize/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inuit-normalize.css", 3 | "version": "3.0.2", 4 | "homepage": "https://github.com/inuitcss/generic.normalize", 5 | "authors": [ 6 | "Harry Roberts ", 7 | "Nicolas Gallagher " 8 | ], 9 | "description": "Nicolas Gallagher’s Normalize.css used in the inuitcss framework", 10 | "main": "_generic.normalize.scss", 11 | "keywords": [ 12 | "inuitcss", 13 | "oocss", 14 | "css", 15 | "normalize" 16 | ], 17 | "license": "MIT", 18 | "_release": "3.0.2", 19 | "_resolution": { 20 | "type": "version", 21 | "tag": "3.0.2", 22 | "commit": "518876f93dc2793d8e3e5c7f2e7bb4d0b7c47f80" 23 | }, 24 | "_source": "git://github.com/inuitcss/generic.normalize.git", 25 | "_target": "~3.0.2", 26 | "_originalSource": "inuit-normalize", 27 | "_direct": true 28 | } -------------------------------------------------------------------------------- /src/components/inuit-normalize/README.md: -------------------------------------------------------------------------------- 1 | # normalize.css v3.0.1 2 | 3 | The `normalize.css` module is an exact clone of normalize.css at version v3.0.1. 4 | normalize.css makes browsers render all elements more consistently and in 5 | line with modern standards. It is developed and maintained by [Nicolas 6 | Gallagher](https://twitter.com/necolas). 7 | 8 | Install using Bower: 9 | 10 | $ bower install --save inuit-normalize 11 | 12 | Install using npm: 13 | 14 | $ npm install --save inuit-normalize 15 | 16 | * Project homepage: [necolas.github.io/normalize.css](http://necolas.github.io/normalize.css/) 17 | * GitHub repo: [github.com/necolas/normalize.css](https://github.com/necolas/normalize.css/) 18 | -------------------------------------------------------------------------------- /src/components/inuit-normalize/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inuit-normalize.css", 3 | "version": "3.0.2", 4 | "homepage": "https://github.com/inuitcss/generic.normalize", 5 | "authors": [ 6 | "Harry Roberts ", 7 | "Nicolas Gallagher " 8 | ], 9 | "description": "Nicolas Gallagher’s Normalize.css used in the inuitcss framework", 10 | "main": "_generic.normalize.scss", 11 | "keywords": [ 12 | "inuitcss", 13 | "oocss", 14 | "css", 15 | "normalize" 16 | ], 17 | "license": "MIT" 18 | } 19 | -------------------------------------------------------------------------------- /src/components/inuit-normalize/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inuit-normalize", 3 | "version": "3.0.2", 4 | "description": "Nicolas Gallagher’s Normalize.css used in the inuitcss framework", 5 | "main": "_generic.normalize.scss", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/inuitcss/generic.normalize.git" 9 | }, 10 | "author": "Harry Roberts ", 11 | "contributors": [{ 12 | "name": "Nicolas Gallagher", 13 | "email": "nicolasgallagher@gmail.com" 14 | }], 15 | "license": "MIT", 16 | "bugs": { 17 | "url": "https://github.com/inuitcss/generic.normalize/issues" 18 | }, 19 | "homepage": "https://github.com/inuitcss/generic.normalize", 20 | "keywords": [ 21 | "inuitcss", 22 | "oocss", 23 | "css", 24 | "normalize" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /src/components/js-throttle-debounce/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js-throttle-debounce", 3 | "version": "0.1.1", 4 | "main": [ 5 | "build/js-throttle-debounce.min.js" 6 | ], 7 | "ignore": [ 8 | "samples", 9 | "tests" 10 | ], 11 | "homepage": "https://github.com/emn178/js-throttle-debounce", 12 | "_release": "0.1.1", 13 | "_resolution": { 14 | "type": "version", 15 | "tag": "v0.1.1", 16 | "commit": "cc4c53254ba1e4570ba4893c8a42efa0c570e293" 17 | }, 18 | "_source": "git://github.com/emn178/js-throttle-debounce.git", 19 | "_target": "~0.1.1", 20 | "_originalSource": "js-throttle-debounce", 21 | "_direct": true 22 | } -------------------------------------------------------------------------------- /src/components/js-throttle-debounce/.covignore: -------------------------------------------------------------------------------- 1 | /tests/ 2 | -------------------------------------------------------------------------------- /src/components/js-throttle-debounce/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.11" 4 | - "0.10" 5 | - "0.8" 6 | before_install: 7 | - npm install mocha -g 8 | - npm install coveralls -g 9 | - npm install mocha-lcov-reporter -g 10 | after_success: npm run-script coveralls 11 | branches: 12 | only: 13 | - master 14 | -------------------------------------------------------------------------------- /src/components/js-throttle-debounce/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # v0.1.1 / 2015-02-17 2 | 3 | Initial release 4 | -------------------------------------------------------------------------------- /src/components/js-throttle-debounce/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2015 emn178@gmail.com 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /src/components/js-throttle-debounce/README.md: -------------------------------------------------------------------------------- 1 | # js-throttle-debounce 2 | [![Build Status](https://travis-ci.org/emn178/js-throttle-debounce.svg?branch=master)](https://travis-ci.org/emn178/js-throttle-debounce) 3 | [![Coverage Status](https://coveralls.io/repos/emn178/js-throttle-debounce/badge.svg?branch=master)](https://coveralls.io/r/emn178/js-throttle-debounce?branch=master) 4 | [![NPM](https://nodei.co/npm/js-throttle-debounce.png?stars&downloads)](https://nodei.co/npm/js-throttle-debounce/) 5 | A javascript prototype plugin provides throttle and debounce methods. 6 | This refers to [jquery-throttle-debounce](https://github.com/cowboy/jquery-throttle-debounce) 7 | 8 | ## Download 9 | [Compress](https://raw.github.com/emn178/js-throttle-debounce/master/build/js-throttle-debounce.min.js) 10 | [Uncompress](https://raw.github.com/emn178/js-throttle-debounce/master/src/js-throttle-debounce.js) 11 | 12 | ## Installation 13 | You can also install js-throttle-debounce by using Bower. 14 | 15 | bower install js-throttle-debounce 16 | 17 | For node.js, you can use this command to install: 18 | 19 | npm install js-throttle-debounce 20 | 21 | ## Demo 22 | [Demo](http://emn178.github.io/js-throttle-debounce/samples/demo/) 23 | 24 | ## Usage 25 | You could use like this: 26 | JavaScript 27 | ```JavaScript 28 | function yourMethod() { 29 | // ... 30 | } 31 | var throttle = yourMethod.throttle(); 32 | var throttleIgnoreLast = yourMethod.throttle(500, true); 33 | var debounce = yourMethod.debounce(100); 34 | ``` 35 | 36 | ### Methods 37 | 38 | #### Function.throttle([delay], [ignoreLast]) 39 | 40 | Create a throttle method. 41 | 42 | ##### *delay: `Number` (default: `100`)* 43 | 44 | Set delay in milliseconds. 45 | 46 | ##### *ignoreLast: `Boolean` (default: `false`)* 47 | 48 | Set true that last trigger will not be executed. 49 | 50 | #### Function.debounce([delay]) 51 | 52 | Create a debounce method. 53 | 54 | ##### *delay: `Number` (default: `100`)* 55 | 56 | Set delay in milliseconds. 57 | 58 | ## Example 59 | ### AJAX Search 60 | HTML 61 | ```HTML 62 | 63 | ``` 64 | JavaScript 65 | ```JavaScript 66 | function ajaxSearch() { 67 | // ... do AJAX search by keyword 68 | } 69 | search = ajaxSearch.debounce(); 70 | ``` 71 | ### Resize 72 | JavaScript 73 | ```JavaScript 74 | function updateLayouts() { 75 | // ... render something when resizing 76 | } 77 | window.onresize = updateLayouts.throttle(); 78 | ``` 79 | 80 | ## License 81 | The project is released under the [MIT license](http://www.opensource.org/licenses/MIT). 82 | 83 | ## Contact 84 | The project's website is located at https://github.com/emn178/js-throttle-debounce 85 | Author: emn178@gmail.com 86 | -------------------------------------------------------------------------------- /src/components/js-throttle-debounce/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js-throttle-debounce", 3 | "version": "0.1.1", 4 | "main": ["build/js-throttle-debounce.min.js"], 5 | "ignore": [ 6 | "samples", 7 | "tests" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /src/components/js-throttle-debounce/build/js-throttle-debounce.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * js-throttle-debounce v0.1.1 3 | * https://github.com/emn178/js-throttle-debounce 4 | * 5 | * Copyright 2015, emn178@gmail.com 6 | * 7 | * Licensed under the MIT license: 8 | * http://www.opensource.org/licenses/MIT 9 | */ 10 | (function(l,b){Function.prototype.throttle=function(a,e){var c=this,f=0,d;a===b&&(a=100);return function(){var b=this,k=arguments,g=function(){f=new Date;c.apply(b,k)};d&&(clearTimeout(d),d=null);var h=new Date-f;h>a?g():e||(d=setTimeout(g,a-h))}};Function.prototype.debounce=function(a){var e=this,c;a===b&&(a=100);return function(){var b=this,d=arguments;c&&(clearTimeout(c),c=null);c=setTimeout(function(){e.apply(b,d)},a)}}})(this); 11 | -------------------------------------------------------------------------------- /src/components/js-throttle-debounce/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js-throttle-debounce", 3 | "version": "0.1.1", 4 | "description": "A javascript prototype plugin provides throttle and debounce methods.", 5 | "main": "src/js-throttle-debounce.js", 6 | "devDependencies": { 7 | "expect.js": "~0.3.1", 8 | "jscoverage": "~0.5.9" 9 | }, 10 | "scripts": { 11 | "test": "mocha tests/node-test.js -r jscoverage", 12 | "coveralls": "mocha tests/node-test.js -R mocha-lcov-reporter -r jscoverage | coveralls" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "https://github.com/emn178/js-throttle-debounce.git" 17 | }, 18 | "keywords": [ 19 | "throttle", 20 | "debounce" 21 | ], 22 | "license": "MIT", 23 | "author": "emn178 ", 24 | "homepage": "https://github.com/emn178/js-throttle-debounce", 25 | "bugs": { 26 | "url": "https://github.com/emn178/js-throttle-debounce/issues" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/components/js-throttle-debounce/src/js-throttle-debounce.js: -------------------------------------------------------------------------------- 1 | /* 2 | * js-throttle-debounce v0.1.1 3 | * https://github.com/emn178/js-throttle-debounce 4 | * 5 | * Copyright 2015, emn178@gmail.com 6 | * 7 | * Licensed under the MIT license: 8 | * http://www.opensource.org/licenses/MIT 9 | */ 10 | ;(function(root, undefined) { 11 | 'use strict'; 12 | 13 | Function.prototype.throttle = function(delay, ignoreLast) { 14 | var func = this; 15 | var lastTime = 0; 16 | var timer; 17 | if(delay === undefined) { 18 | delay = 100; 19 | } 20 | return function() { 21 | var self = this, args = arguments; 22 | var exec = function() { 23 | lastTime = new Date(); 24 | func.apply(self, args); 25 | }; 26 | if(timer) { 27 | clearTimeout(timer); 28 | timer = null; 29 | } 30 | var diff = new Date() - lastTime; 31 | if (diff > delay) { 32 | exec(); 33 | } else if(!ignoreLast) { 34 | timer = setTimeout(exec, delay - diff); 35 | } 36 | }; 37 | }; 38 | 39 | Function.prototype.debounce = function(delay) { 40 | var func = this; 41 | var timer; 42 | if(delay === undefined) { 43 | delay = 100; 44 | } 45 | return function() { 46 | var self = this, args = arguments; 47 | if(timer) { 48 | clearTimeout(timer); 49 | timer = null; 50 | } 51 | timer = setTimeout(function() { 52 | func.apply(self, args); 53 | }, delay); 54 | }; 55 | }; 56 | }(this)); 57 | -------------------------------------------------------------------------------- /src/components/neat/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "neat", 3 | "description": "A lightweight, semantic grid framework built with Bourbon", 4 | "version": "1.7.2", 5 | "main": "app/assets/stylesheets/_neat.scss", 6 | "license": "MIT", 7 | "ignore": [ 8 | "**/.*", 9 | "CONTRIBUTING.md", 10 | "Gemfile", 11 | "Gemfile.lock", 12 | "NEWS.md", 13 | "Rakefile", 14 | "bin", 15 | "lib", 16 | "neat.gemspec", 17 | "sache.json", 18 | "spec", 19 | "test" 20 | ], 21 | "keywords": [ 22 | "bourbon", 23 | "columns", 24 | "grid", 25 | "layout", 26 | "media", 27 | "media-queries", 28 | "neat", 29 | "queries", 30 | "sass", 31 | "scss", 32 | "semantic" 33 | ], 34 | "authors": [ 35 | "thoughtbot (http://thoughtbot.com)" 36 | ], 37 | "homepage": "http://neat.bourbon.io", 38 | "repository": { 39 | "type": "git", 40 | "url": "https://github.com/thoughtbot/neat.git" 41 | }, 42 | "dependencies": { 43 | "bourbon": ">=4.0" 44 | }, 45 | "_release": "1.7.2", 46 | "_resolution": { 47 | "type": "version", 48 | "tag": "v1.7.2", 49 | "commit": "178f2ef2ac2d1273f8c9e7cde67f319761e4b824" 50 | }, 51 | "_source": "git://github.com/thoughtbot/neat.git", 52 | "_target": "~1.7.2", 53 | "_originalSource": "neat", 54 | "_direct": true 55 | } -------------------------------------------------------------------------------- /src/components/neat/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright © 2012–2015 [thoughtbot, inc.](http://thoughtbot.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the “Software”), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/_neat-helpers.scss: -------------------------------------------------------------------------------- 1 | // Functions 2 | @import "functions/private"; 3 | @import "functions/new-breakpoint"; 4 | 5 | // Settings 6 | @import "settings/grid"; 7 | @import "settings/visual-grid"; 8 | @import "settings/disable-warnings"; 9 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/_neat.scss: -------------------------------------------------------------------------------- 1 | // Neat 1.7.2 2 | // http://neat.bourbon.io 3 | // Copyright 2012-2015 thoughtbot, inc. 4 | // MIT License 5 | 6 | // Helpers 7 | @import "neat-helpers"; 8 | 9 | // Grid 10 | @import "grid/private"; 11 | @import "grid/box-sizing"; 12 | @import "grid/omega"; 13 | @import "grid/outer-container"; 14 | @import "grid/span-columns"; 15 | @import "grid/row"; 16 | @import "grid/shift"; 17 | @import "grid/pad"; 18 | @import "grid/fill-parent"; 19 | @import "grid/media"; 20 | @import "grid/to-deprecate"; 21 | @import "grid/visual-grid"; 22 | @import "grid/display-context"; 23 | @import "grid/direction-context"; 24 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/functions/_new-breakpoint.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Returns a media context (media query / grid context) that can be stored in a variable and passed to `media()` as a single-keyword argument. Media contexts defined using `new-breakpoint` are used by the visual grid, as long as they are defined before importing Neat. 4 | /// 5 | /// @param {List} $query 6 | /// A list of media query features and values. Each `$feature` should have a corresponding `$value`. 7 | /// 8 | /// If there is only a single `$value` in `$query`, `$default-feature` is going to be used. 9 | /// 10 | /// The number of total columns in the grid can be set by passing `$columns` at the end of the list (overrides `$total-columns`). For a list of valid values for `$feature`, click [here](http://www.w3.org/TR/css3-mediaqueries/#media1). 11 | /// 12 | /// @param {Number (unitless)} $total-columns [$grid-columns] 13 | /// - Number of columns to use in the new grid context. Can be set as a shorthand in the first parameter. 14 | /// 15 | /// @example scss - Usage 16 | /// $mobile: new-breakpoint(max-width 480px 4); 17 | /// 18 | /// .element { 19 | /// @include media($mobile) { 20 | /// @include span-columns(4); 21 | /// } 22 | /// } 23 | /// 24 | /// @example css - CSS Output 25 | /// @media screen and (max-width: 480px) { 26 | /// .element { 27 | /// display: block; 28 | /// float: left; 29 | /// margin-right: 7.42297%; 30 | /// width: 100%; 31 | /// } 32 | /// .element:last-child { 33 | /// margin-right: 0; 34 | /// } 35 | /// } 36 | 37 | @function new-breakpoint($query: $feature $value $columns, $total-columns: $grid-columns) { 38 | @if length($query) == 1 { 39 | $query: $default-feature nth($query, 1) $total-columns; 40 | } @else if is-even(length($query)) { 41 | $query: append($query, $total-columns); 42 | } 43 | 44 | @if is-not(belongs-to($query, $visual-grid-breakpoints)) { 45 | $visual-grid-breakpoints: append($visual-grid-breakpoints, $query, comma) !global; 46 | } 47 | 48 | @return $query; 49 | } 50 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/functions/_private.scss: -------------------------------------------------------------------------------- 1 | // Not function for Libsass compatibility 2 | // https://github.com/sass/libsass/issues/368 3 | @function is-not($value) { 4 | @return if($value, false, true); 5 | } 6 | 7 | // Checks if a number is even 8 | @function is-even($int) { 9 | @return $int % 2 == 0; 10 | } 11 | 12 | // Checks if an element belongs to a list or not 13 | @function belongs-to($tested-item, $list) { 14 | @return is-not(not-belongs-to($tested-item, $list)); 15 | } 16 | 17 | @function not-belongs-to($tested-item, $list) { 18 | @return is-not(index($list, $tested-item)); 19 | } 20 | 21 | // Contains display value 22 | @function contains-display-value($query) { 23 | @return belongs-to(table, $query) 24 | or belongs-to(block, $query) 25 | or belongs-to(inline-block, $query) 26 | or belongs-to(inline, $query); 27 | } 28 | 29 | // Parses the first argument of span-columns() 30 | @function container-span($span: $span) { 31 | @if length($span) == 3 { 32 | $container-columns: nth($span, 3); 33 | @return $container-columns; 34 | } @else if length($span) == 2 { 35 | $container-columns: nth($span, 2); 36 | @return $container-columns; 37 | } 38 | 39 | @return $grid-columns; 40 | } 41 | 42 | @function container-shift($shift: $shift) { 43 | $parent-columns: $grid-columns !default !global; 44 | 45 | @if length($shift) == 3 { 46 | $container-columns: nth($shift, 3); 47 | @return $container-columns; 48 | } @else if length($shift) == 2 { 49 | $container-columns: nth($shift, 2); 50 | @return $container-columns; 51 | } 52 | 53 | @return $parent-columns; 54 | } 55 | 56 | // Generates a striped background 57 | @function gradient-stops($grid-columns, $color: $visual-grid-color) { 58 | $transparent: transparent; 59 | 60 | $column-width: flex-grid(1, $grid-columns); 61 | $gutter-width: flex-gutter($grid-columns); 62 | $column-offset: $column-width; 63 | 64 | $values: ($transparent 0, $color 0); 65 | 66 | @for $i from 1 to $grid-columns*2 { 67 | @if is-even($i) { 68 | $values: append($values, $transparent $column-offset, comma); 69 | $values: append($values, $color $column-offset, comma); 70 | $column-offset: $column-offset + $column-width; 71 | } @else { 72 | $values: append($values, $color $column-offset, comma); 73 | $values: append($values, $transparent $column-offset, comma); 74 | $column-offset: $column-offset + $gutter-width; 75 | } 76 | } 77 | 78 | @return $values; 79 | } 80 | 81 | // Layout direction 82 | @function get-direction($layout, $default) { 83 | $direction: null; 84 | 85 | @if to-upper-case($layout) == "LTR" or to-upper-case($layout) == "RTL" { 86 | $direction: direction-from-layout($layout); 87 | } @else { 88 | $direction: direction-from-layout($default); 89 | } 90 | 91 | @return $direction; 92 | } 93 | 94 | @function direction-from-layout($layout) { 95 | $direction: null; 96 | 97 | @if to-upper-case($layout) == "LTR" { 98 | $direction: right; 99 | } @else { 100 | $direction: left; 101 | } 102 | 103 | @return $direction; 104 | } 105 | 106 | @function get-opposite-direction($direction) { 107 | $opposite-direction: left; 108 | 109 | @if $direction == "left" { 110 | $opposite-direction: right; 111 | } 112 | 113 | @return $opposite-direction; 114 | } 115 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/grid/_box-sizing.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | @if $border-box-sizing == true { 4 | html { // http://bit.ly/1qk2tVR 5 | box-sizing: border-box; 6 | } 7 | 8 | * { 9 | &, 10 | &::after, 11 | &::before { 12 | box-sizing: inherit; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/grid/_direction-context.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Changes the direction property used by other mixins called in the code block argument. 4 | /// 5 | /// @param {String} $direction [left-to-right] 6 | /// Layout direction to be used within the block. Can be `left-to-right` or `right-to-left`. 7 | /// 8 | /// @example scss - Usage 9 | /// @include direction-context(right-to-left) { 10 | /// .right-to-left-block { 11 | /// @include span-columns(6); 12 | /// } 13 | /// } 14 | /// 15 | /// @example css - CSS Output 16 | /// .right-to-left-block { 17 | /// float: right; 18 | /// ... 19 | /// } 20 | 21 | @mixin direction-context($direction: left-to-right) { 22 | $scope-direction: $layout-direction; 23 | 24 | @if to-lower-case($direction) == "left-to-right" { 25 | $layout-direction: LTR !global; 26 | } @else if to-lower-case($direction) == "right-to-left" { 27 | $layout-direction: RTL !global; 28 | } 29 | 30 | @content; 31 | 32 | $layout-direction: $scope-direction !global; 33 | } 34 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/grid/_display-context.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Changes the display property used by other mixins called in the code block argument. 4 | /// 5 | /// @param {String} $display [block] 6 | /// Display value to be used within the block. Can be `table` or `block`. 7 | /// 8 | /// @example scss 9 | /// @include display-context(table) { 10 | /// .display-table { 11 | /// @include span-columns(6); 12 | /// } 13 | /// } 14 | /// 15 | /// @example css 16 | /// .display-table { 17 | /// display: table-cell; 18 | /// ... 19 | /// } 20 | 21 | @mixin display-context($display: block) { 22 | $scope-display: $container-display-table; 23 | $container-display-table: $display == table !global; 24 | 25 | @content; 26 | 27 | $container-display-table: $scope-display !global; 28 | } 29 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/grid/_fill-parent.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Forces the element to fill its parent container. 4 | /// 5 | /// @example scss - Usage 6 | /// .element { 7 | /// @include fill-parent; 8 | /// } 9 | /// 10 | /// @example css - CSS Output 11 | /// .element { 12 | /// width: 100%; 13 | /// box-sizing: border-box; 14 | /// } 15 | 16 | @mixin fill-parent() { 17 | width: 100%; 18 | 19 | @if $border-box-sizing == false { 20 | box-sizing: border-box; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/grid/_media.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Outputs a media-query block with an optional grid context (the total number of columns used in the grid). 4 | /// 5 | /// @param {List} $query 6 | /// A list of media query features and values, where each `$feature` should have a corresponding `$value`. 7 | /// For a list of valid values for `$feature`, click [here](http://www.w3.org/TR/css3-mediaqueries/#media1). 8 | /// 9 | /// If there is only a single `$value` in `$query`, `$default-feature` is going to be used. 10 | /// 11 | /// The number of total columns in the grid can be set by passing `$columns` at the end of the list (overrides `$total-columns`). 12 | /// 13 | /// 14 | /// @param {Number (unitless)} $total-columns [$grid-columns] 15 | /// - Number of columns to use in the new grid context. Can be set as a shorthand in the first parameter. 16 | /// 17 | /// @example scss - Usage 18 | /// .responsive-element { 19 | /// @include media(769px) { 20 | /// @include span-columns(6); 21 | /// } 22 | /// } 23 | /// 24 | /// .new-context-element { 25 | /// @include media(min-width 320px max-width 480px, 6) { 26 | /// @include span-columns(6); 27 | /// } 28 | /// } 29 | /// 30 | /// @example css - CSS Output 31 | /// @media screen and (min-width: 769px) { 32 | /// .responsive-element { 33 | /// display: block; 34 | /// float: left; 35 | /// margin-right: 2.35765%; 36 | /// width: 48.82117%; 37 | /// } 38 | /// 39 | /// .responsive-element:last-child { 40 | /// margin-right: 0; 41 | /// } 42 | /// } 43 | /// 44 | /// @media screen and (min-width: 320px) and (max-width: 480px) { 45 | /// .new-context-element { 46 | /// display: block; 47 | /// float: left; 48 | /// margin-right: 4.82916%; 49 | /// width: 100%; 50 | /// } 51 | /// 52 | /// .new-context-element:last-child { 53 | /// margin-right: 0; 54 | /// } 55 | /// } 56 | 57 | @mixin media($query: $feature $value $columns, $total-columns: $grid-columns) { 58 | @if length($query) == 1 { 59 | @media screen and ($default-feature: nth($query, 1)) { 60 | $default-grid-columns: $grid-columns; 61 | $grid-columns: $total-columns !global; 62 | @content; 63 | $grid-columns: $default-grid-columns !global; 64 | } 65 | } @else { 66 | $loop-to: length($query); 67 | $media-query: "screen and "; 68 | $default-grid-columns: $grid-columns; 69 | $grid-columns: $total-columns !global; 70 | 71 | @if is-not(is-even(length($query))) { 72 | $grid-columns: nth($query, $loop-to) !global; 73 | $loop-to: $loop-to - 1; 74 | } 75 | 76 | $i: 1; 77 | @while $i <= $loop-to { 78 | $media-query: $media-query + "(" + nth($query, $i) + ": " + nth($query, $i + 1) + ") "; 79 | 80 | @if ($i + 1) != $loop-to { 81 | $media-query: $media-query + "and "; 82 | } 83 | 84 | $i: $i + 2; 85 | } 86 | 87 | @media #{$media-query} { 88 | @content; 89 | $grid-columns: $default-grid-columns !global; 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/grid/_omega.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Removes the element's gutter margin, regardless of its position in the grid hierarchy or display property. It can target a specific element, or every `nth-child` occurrence. Works only with `block` layouts. 4 | /// 5 | /// @param {List} $query [block] 6 | /// List of arguments. Supported arguments are `nth-child` selectors (targets a specific pseudo element) and `auto` (targets `last-child`). 7 | /// 8 | /// When passed an `nth-child` argument of type `*n` with `block` display, the omega mixin automatically adds a clear to the `*n+1` th element. Note that composite arguments such as `2n+1` do not support this feature. 9 | /// 10 | /// **Deprecation warning**: The omega mixin will no longer take a `$direction` argument. To change the layout direction, use `row($direction)` or set `$default-layout-direction` instead. 11 | /// 12 | /// @example scss - Usage 13 | /// .element { 14 | /// @include omega; 15 | /// } 16 | /// 17 | /// .nth-element { 18 | /// @include omega(4n); 19 | /// } 20 | /// 21 | /// @example css - CSS Output 22 | /// .element { 23 | /// margin-right: 0; 24 | /// } 25 | /// 26 | /// .nth-element:nth-child(4n) { 27 | /// margin-right: 0; 28 | /// } 29 | /// 30 | /// .nth-element:nth-child(4n+1) { 31 | /// clear: left; 32 | /// } 33 | 34 | @mixin omega($query: block, $direction: default) { 35 | $table: belongs-to(table, $query); 36 | $auto: belongs-to(auto, $query); 37 | 38 | @if $direction != default { 39 | @include -neat-warn("The omega mixin will no longer take a $direction argument. To change the layout direction, use the direction(){...} mixin."); 40 | } @else { 41 | $direction: get-direction($layout-direction, $default-layout-direction); 42 | } 43 | 44 | @if $table { 45 | @include -neat-warn("The omega mixin no longer removes padding in table layouts."); 46 | } 47 | 48 | @if length($query) == 1 { 49 | @if $auto { 50 | &:last-child { 51 | margin-#{$direction}: 0; 52 | } 53 | } 54 | 55 | @else if contains-display-value($query) and $table == false { 56 | margin-#{$direction}: 0; 57 | } 58 | 59 | @else { 60 | @include nth-child($query, $direction); 61 | } 62 | } @else if length($query) == 2 { 63 | @if $auto { 64 | &:last-child { 65 | margin-#{$direction}: 0; 66 | } 67 | } @else { 68 | @include nth-child(nth($query, 1), $direction); 69 | } 70 | } @else { 71 | @include -neat-warn("Too many arguments passed to the omega() mixin."); 72 | } 73 | } 74 | 75 | @mixin nth-child($query, $direction) { 76 | $opposite-direction: get-opposite-direction($direction); 77 | 78 | &:nth-child(#{$query}) { 79 | margin-#{$direction}: 0; 80 | } 81 | 82 | @if type-of($query) == number and unit($query) == "n" { 83 | &:nth-child(#{$query}+1) { 84 | clear: $opposite-direction; 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/grid/_outer-container.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Makes an element a outer container by centring it in the viewport, clearing its floats, and setting its `max-width`. 4 | /// Although optional, using `outer-container` is recommended. The mixin can be called on more than one element per page, as long as they are not nested. 5 | /// 6 | /// @param {Number [unit]} $local-max-width [$max-width] 7 | /// Max width to be applied to the element. Can be a percentage or a measure. 8 | /// 9 | /// @example scss - Usage 10 | /// .element { 11 | /// @include outer-container(100%); 12 | /// } 13 | /// 14 | /// @example css - CSS Output 15 | /// .element { 16 | /// *zoom: 1; 17 | /// max-width: 100%; 18 | /// margin-left: auto; 19 | /// margin-right: auto; 20 | /// } 21 | /// 22 | /// .element:before, .element:after { 23 | /// content: " "; 24 | /// display: table; 25 | /// } 26 | /// 27 | /// .element:after { 28 | /// clear: both; 29 | /// } 30 | 31 | @mixin outer-container($local-max-width: $max-width) { 32 | @include clearfix; 33 | max-width: $local-max-width; 34 | margin: { 35 | left: auto; 36 | right: auto; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/grid/_pad.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Adds padding to the element. 4 | /// 5 | /// @param {List} $padding [flex-gutter()] 6 | /// A list of padding value(s) to use. Passing `default` in the list will result in using the gutter width as a padding value. 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include pad(30px -20px 10px default); 11 | /// } 12 | /// 13 | /// @example css - CSS Output 14 | /// .element { 15 | /// padding: 30px -20px 10px 2.35765%; 16 | /// } 17 | 18 | @mixin pad($padding: flex-gutter()) { 19 | $padding-list: null; 20 | @each $value in $padding { 21 | $value: if($value == 'default', flex-gutter(), $value); 22 | $padding-list: join($padding-list, $value); 23 | } 24 | padding: $padding-list; 25 | } 26 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/grid/_private.scss: -------------------------------------------------------------------------------- 1 | $parent-columns: $grid-columns !default; 2 | $fg-column: $column; 3 | $fg-gutter: $gutter; 4 | $fg-max-columns: $grid-columns; 5 | $container-display-table: false !default; 6 | $layout-direction: LTR !default; 7 | 8 | @function flex-grid($columns, $container-columns: $fg-max-columns) { 9 | $width: $columns * $fg-column + ($columns - 1) * $fg-gutter; 10 | $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter; 11 | @return percentage($width / $container-width); 12 | } 13 | 14 | @function flex-gutter($container-columns: $fg-max-columns, $gutter: $fg-gutter) { 15 | $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter; 16 | @return percentage($gutter / $container-width); 17 | } 18 | 19 | @function grid-width($n) { 20 | @return $n * $gw-column + ($n - 1) * $gw-gutter; 21 | } 22 | 23 | @function get-parent-columns($columns) { 24 | @if $columns != $grid-columns { 25 | $parent-columns: $columns !global; 26 | } @else { 27 | $parent-columns: $grid-columns !global; 28 | } 29 | 30 | @return $parent-columns; 31 | } 32 | 33 | @function is-display-table($container-is-display-table, $display) { 34 | @return $container-is-display-table == true or $display == table; 35 | } 36 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/grid/_row.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Designates the element as a row of columns in the grid layout. It clears the floats on the element and sets its display property. Rows can't be nested, but there can be more than one row element—with different display properties—per layout. 4 | /// 5 | /// @param {String} $display [default] 6 | /// Sets the display property of the element and the display context that will be used by its children. Can be `block` or `table`. 7 | /// 8 | /// @param {String} $direction [$default-layout-direction] 9 | /// Sets the layout direction. Can be `LTR` (left-to-right) or `RTL` (right-to-left). 10 | /// 11 | /// @example scss - Usage 12 | /// .element { 13 | /// @include row(); 14 | /// } 15 | /// 16 | /// @example css - CSS Output 17 | /// .element { 18 | /// *zoom: 1; 19 | /// display: block; 20 | /// } 21 | /// 22 | /// .element:before, .element:after { 23 | /// content: " "; 24 | /// display: table; 25 | /// } 26 | /// 27 | /// .element:after { 28 | /// clear: both; 29 | /// } 30 | 31 | @mixin row($display: default, $direction: $default-layout-direction) { 32 | @if $direction != $default-layout-direction { 33 | @include -neat-warn("The $direction argument will be deprecated in future versions in favor of the direction(){...} mixin."); 34 | } 35 | 36 | $layout-direction: $direction !global; 37 | 38 | @if $display != default { 39 | @include -neat-warn("The $display argument will be deprecated in future versions in favor of the display(){...} mixin."); 40 | } 41 | 42 | @if $display == table { 43 | display: table; 44 | @include fill-parent; 45 | table-layout: fixed; 46 | $container-display-table: true !global; 47 | } @else { 48 | @include clearfix; 49 | display: block; 50 | $container-display-table: false !global; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/grid/_shift.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Translates an element horizontally by a number of columns. Positive arguments shift the element to the active layout direction, while negative ones shift it to the opposite direction. 4 | /// 5 | /// @param {Number (unitless)} $n-columns [1] 6 | /// Number of columns by which the element shifts. 7 | /// 8 | /// @example scss - Usage 9 | /// .element { 10 | /// @include shift(-3); 11 | /// } 12 | /// 13 | /// @example css - CSS output 14 | /// .element { 15 | /// margin-left: -25.58941%; 16 | /// } 17 | 18 | @mixin shift($n-columns: 1) { 19 | @include shift-in-context($n-columns); 20 | } 21 | 22 | /// Translates an element horizontally by a number of columns, in a specific nesting context. 23 | /// 24 | /// @param {List} $shift 25 | /// A list containing the number of columns to shift (`$columns`) and the number of columns of the parent element (`$container-columns`). 26 | /// 27 | /// The two values can be separated with any string such as `of`, `/`, etc. 28 | /// 29 | /// @example scss - Usage 30 | /// .element { 31 | /// @include shift(-3 of 6); 32 | /// } 33 | /// 34 | /// @example css - CSS output 35 | /// .element { 36 | /// margin-left: -52.41458%; 37 | /// } 38 | 39 | @mixin shift-in-context($shift: $columns of $container-columns) { 40 | $n-columns: nth($shift, 1); 41 | $parent-columns: container-shift($shift) !global; 42 | 43 | $direction: get-direction($layout-direction, $default-layout-direction); 44 | $opposite-direction: get-opposite-direction($direction); 45 | 46 | margin-#{$opposite-direction}: $n-columns * flex-grid(1, $parent-columns) + $n-columns * flex-gutter($parent-columns); 47 | 48 | // Reset nesting context 49 | $parent-columns: $grid-columns !global; 50 | } 51 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/grid/_span-columns.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Specifies the number of columns an element should span. If the selector is nested the number of columns of its parent element should be passed as an argument as well. 4 | /// 5 | /// @param {List} $span 6 | /// A list containing `$columns`, the unitless number of columns the element spans (required), and `$container-columns`, the number of columns the parent element spans (optional). 7 | /// 8 | /// If only one value is passed, it is assumed that it's `$columns` and that that `$container-columns` is equal to `$grid-columns`, the total number of columns in the grid. 9 | /// 10 | /// The values can be separated with any string such as `of`, `/`, etc. 11 | /// 12 | /// `$columns` also accepts decimals for when it's necessary to break out of the standard grid. E.g. Passing `2.4` in a standard 12 column grid will divide the row into 5 columns. 13 | /// 14 | /// @param {String} $display [block] 15 | /// Sets the display property of the element. By default it sets the display propert of the element to `block`. 16 | /// 17 | /// If passed `block-collapse`, it also removes the margin gutter by adding it to the element width. 18 | /// 19 | /// If passed `table`, it sets the display property to `table-cell` and calculates the width of the element without taking gutters into consideration. The result does not align with the block-based grid. 20 | /// 21 | /// @example scss - Usage 22 | /// .element { 23 | /// @include span-columns(6); 24 | /// 25 | /// .nested-element { 26 | /// @include span-columns(2 of 6); 27 | /// } 28 | /// } 29 | /// 30 | /// @example css - CSS Output 31 | /// .element { 32 | /// display: block; 33 | /// float: left; 34 | /// margin-right: 2.35765%; 35 | /// width: 48.82117%; 36 | /// } 37 | /// 38 | /// .element:last-child { 39 | /// margin-right: 0; 40 | /// } 41 | /// 42 | /// .element .nested-element { 43 | /// display: block; 44 | /// float: left; 45 | /// margin-right: 4.82916%; 46 | /// width: 30.11389%; 47 | /// } 48 | /// 49 | /// .element .nested-element:last-child { 50 | /// margin-right: 0; 51 | /// } 52 | 53 | @mixin span-columns($span: $columns of $container-columns, $display: block) { 54 | $columns: nth($span, 1); 55 | $container-columns: container-span($span); 56 | 57 | $parent-columns: get-parent-columns($container-columns) !global; 58 | 59 | $direction: get-direction($layout-direction, $default-layout-direction); 60 | $opposite-direction: get-opposite-direction($direction); 61 | 62 | $display-table: is-display-table($container-display-table, $display); 63 | 64 | @if $display-table { 65 | display: table-cell; 66 | width: percentage($columns / $container-columns); 67 | } @else { 68 | float: #{$opposite-direction}; 69 | 70 | @if $display != no-display { 71 | display: block; 72 | } 73 | 74 | @if $display == collapse { 75 | @include -neat-warn("The 'collapse' argument will be deprecated. Use 'block-collapse' instead."); 76 | } 77 | 78 | @if $display == collapse or $display == block-collapse { 79 | width: flex-grid($columns, $container-columns) + flex-gutter($container-columns); 80 | 81 | &:last-child { 82 | width: flex-grid($columns, $container-columns); 83 | } 84 | 85 | } @else { 86 | margin-#{$direction}: flex-gutter($container-columns); 87 | width: flex-grid($columns, $container-columns); 88 | 89 | &:last-child { 90 | margin-#{$direction}: 0; 91 | } 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/grid/_to-deprecate.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | @mixin breakpoint($query:$feature $value $columns, $total-columns: $grid-columns) { 4 | @include -neat-warn("The breakpoint() mixin was renamed to media() in Neat 1.0. Please update your project with the new syntax before the next version bump."); 5 | 6 | @if length($query) == 1 { 7 | @media screen and ($default-feature: nth($query, 1)) { 8 | $default-grid-columns: $grid-columns; 9 | $grid-columns: $total-columns; 10 | @content; 11 | $grid-columns: $default-grid-columns; 12 | } 13 | } @else if length($query) == 2 { 14 | @media screen and (nth($query, 1): nth($query, 2)) { 15 | $default-grid-columns: $grid-columns; 16 | $grid-columns: $total-columns; 17 | @content; 18 | $grid-columns: $default-grid-columns; 19 | } 20 | } @else if length($query) == 3 { 21 | @media screen and (nth($query, 1): nth($query, 2)) { 22 | $default-grid-columns: $grid-columns; 23 | $grid-columns: nth($query, 3); 24 | @content; 25 | $grid-columns: $default-grid-columns; 26 | } 27 | } @else if length($query) == 4 { 28 | @media screen and (nth($query, 1): nth($query, 2)) and (nth($query, 3): nth($query, 4)) { 29 | $default-grid-columns: $grid-columns; 30 | $grid-columns: $total-columns; 31 | @content; 32 | $grid-columns: $default-grid-columns; 33 | } 34 | } @else if length($query) == 5 { 35 | @media screen and (nth($query, 1): nth($query, 2)) and (nth($query, 3): nth($query, 4)) { 36 | $default-grid-columns: $grid-columns; 37 | $grid-columns: nth($query, 5); 38 | @content; 39 | $grid-columns: $default-grid-columns; 40 | } 41 | } @else { 42 | @include -neat-warn("Wrong number of arguments for breakpoint(). Read the documentation for more details."); 43 | } 44 | } 45 | 46 | @mixin nth-omega($nth, $display: block, $direction: default) { 47 | @include -neat-warn("The nth-omega() mixin is deprecated. Please use omega() instead."); 48 | @include omega($nth $display, $direction); 49 | } 50 | 51 | /// Resets the active display property to `block`. Particularly useful when changing the display property in a single row. 52 | /// 53 | /// @example scss - Usage 54 | /// .element { 55 | /// @include row(table); 56 | /// // Context changed to table display 57 | /// } 58 | /// 59 | /// @include reset-display; 60 | /// // Context is reset to block display 61 | 62 | @mixin reset-display { 63 | $container-display-table: false !global; 64 | @include -neat-warn("Resetting $display will be deprecated in future versions in favor of the display(){...} mixin."); 65 | } 66 | 67 | /// Resets the active layout direction to the default value set in `$default-layout-direction`. Particularly useful when changing the layout direction in a single row. 68 | /// 69 | /// @example scss - Usage 70 | /// .element { 71 | /// @include row($direction: RTL); 72 | /// // Context changed to right-to-left 73 | /// } 74 | /// 75 | /// @include reset-layout-direction; 76 | /// // Context is reset to left-to-right 77 | 78 | @mixin reset-layout-direction { 79 | $layout-direction: $default-layout-direction !global; 80 | @include -neat-warn("Resetting $direction will be deprecated in future versions in favor of the direction(){...} mixin."); 81 | } 82 | 83 | /// Resets both the active layout direction and the active display property. 84 | /// 85 | /// @example scss - Usage 86 | /// .element { 87 | /// @include row(table, RTL); 88 | /// // Context changed to table table and right-to-left 89 | /// } 90 | /// 91 | /// @include reset-all; 92 | /// // Context is reset to block display and left-to-right 93 | 94 | @mixin reset-all { 95 | @include reset-display; 96 | @include reset-layout-direction; 97 | } 98 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/grid/_visual-grid.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | @mixin grid-column-gradient($values...) { 4 | background-image: -webkit-linear-gradient(left, $values); 5 | background-image: -moz-linear-gradient(left, $values); 6 | background-image: -ms-linear-gradient(left, $values); 7 | background-image: -o-linear-gradient(left, $values); 8 | background-image: unquote("linear-gradient(to left, #{$values})"); 9 | } 10 | 11 | @if $visual-grid == true or $visual-grid == yes { 12 | body:before { 13 | @include grid-column-gradient(gradient-stops($grid-columns)); 14 | content: ""; 15 | display: inline-block; 16 | height: 100%; 17 | left: 0; 18 | margin: 0 auto; 19 | max-width: $max-width; 20 | opacity: $visual-grid-opacity; 21 | pointer-events: none; 22 | position: fixed; 23 | right: 0; 24 | width: 100%; 25 | 26 | @if $visual-grid-index == back { 27 | z-index: -1; 28 | } 29 | 30 | @else if $visual-grid-index == front { 31 | z-index: 9999; 32 | } 33 | 34 | @each $breakpoint in $visual-grid-breakpoints { 35 | @if $breakpoint { 36 | @include media($breakpoint) { 37 | @include grid-column-gradient(gradient-stops($grid-columns)); 38 | } 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/settings/_disable-warnings.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Disable all deprecation warnings. Defaults to `false`. Set with a `!global` flag. 4 | /// 5 | /// @type Bool 6 | 7 | $disable-warnings: false !default; 8 | 9 | @mixin -neat-warn($message) { 10 | @if $disable-warnings == false { 11 | @warn "#{$message}"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/settings/_grid.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Sets the relative width of a single grid column. The unit used should be the same one used to define `$gutter`. To learn more about modular-scale() see [Bourbon docs](http://bourbon.io/docs/#modular-scale). Set with a `!global` flag. 4 | /// 5 | /// @type Number (Unit) 6 | 7 | $column: modular-scale(3, 1em, $golden) !default; 8 | 9 | /// Sets the relative width of a single grid gutter. The unit used should be the same one used to define `$column`. To learn more about modular-scale() see [Bourbon docs](http://bourbon.io/docs/#modular-scale). Set with the `!global` flag. 10 | /// 11 | /// @type Number (Unit) 12 | 13 | $gutter: modular-scale(1, 1em, $golden) !default; 14 | 15 | /// Sets the total number of columns in the grid. Its value can be overridden inside a media query using the `media()` mixin. Set with the `!global` flag. 16 | /// 17 | /// @type Number (Unitless) 18 | 19 | $grid-columns: 12 !default; 20 | 21 | /// Sets the max-width property of the element that includes `outer-container()`. To learn more about `em()` see [Bourbon docs](http://bourbon.io/docs/#px-to-em). Set with the `!global` flag. 22 | /// 23 | /// @type Number (Unit) 24 | /// 25 | $max-width: em(1088) !default; 26 | 27 | /// When set to true, it sets the box-sizing property of all elements to `border-box`. Set with a `!global` flag. 28 | /// 29 | /// @type Bool 30 | /// 31 | /// @example css - CSS Output 32 | /// html { 33 | /// box-sizing: border-box; } 34 | /// 35 | /// *, *::after, *::before { 36 | /// box-sizing: inherit; 37 | /// } 38 | 39 | $border-box-sizing: true !default; 40 | 41 | /// Sets the default [media feature](http://www.w3.org/TR/css3-mediaqueries/#media) that `media()` and `new-breakpoint()` revert to when only a breakpoint value is passed. Set with a `!global` flag. 42 | /// 43 | /// @type String 44 | 45 | $default-feature: min-width; // Default @media feature for the breakpoint() mixin 46 | 47 | ///Sets the default layout direction of the grid. Can be `LTR` or `RTL`. Set with a `!global` flag. 48 | /// 49 | ///@type String 50 | 51 | $default-layout-direction: LTR !default; 52 | -------------------------------------------------------------------------------- /src/components/neat/app/assets/stylesheets/settings/_visual-grid.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /// Displays the visual grid when set to true. The overlaid grid may be few pixels off depending on the browser's rendering engine and pixel rounding algorithm. Set with the `!global` flag. 4 | /// 5 | /// @type Bool 6 | 7 | $visual-grid: false !default; 8 | 9 | /// Sets the visual grid color. Set with `!global` flag. 10 | /// 11 | /// @type Color 12 | 13 | $visual-grid-color: #eee !default; 14 | 15 | /// Sets the `z-index` property of the visual grid. Can be `back` (behind content) or `front` (in front of content). Set with `!global` flag. 16 | /// 17 | /// @type String 18 | 19 | $visual-grid-index: back !default; 20 | 21 | /// Sets the opacity property of the visual grid. Set with `!global` flag. 22 | /// 23 | /// @type Number (unitless) 24 | 25 | $visual-grid-opacity: 0.4 !default; 26 | 27 | $visual-grid-breakpoints: () !default; 28 | -------------------------------------------------------------------------------- /src/components/neat/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "neat", 3 | "description": "A lightweight, semantic grid framework built with Bourbon", 4 | "version": "1.7.2", 5 | "main": "app/assets/stylesheets/_neat.scss", 6 | "license": "MIT", 7 | "ignore": [ 8 | "**/.*", 9 | "CONTRIBUTING.md", 10 | "Gemfile", 11 | "Gemfile.lock", 12 | "NEWS.md", 13 | "Rakefile", 14 | "bin", 15 | "lib", 16 | "neat.gemspec", 17 | "sache.json", 18 | "spec", 19 | "test" 20 | ], 21 | "keywords": [ 22 | "bourbon", 23 | "columns", 24 | "grid", 25 | "layout", 26 | "media", 27 | "media-queries", 28 | "neat", 29 | "queries", 30 | "sass", 31 | "scss", 32 | "semantic" 33 | ], 34 | "authors": [ 35 | "thoughtbot (http://thoughtbot.com)" 36 | ], 37 | "homepage": "http://neat.bourbon.io", 38 | "repository": { 39 | "type": "git", 40 | "url": "https://github.com/thoughtbot/neat.git" 41 | }, 42 | "dependencies": { 43 | "bourbon": ">=4.0" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/components/neat/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bourbon-neat", 3 | "version": "1.7.2", 4 | "description": "A lightweight, semantic grid framework built with Bourbon", 5 | "keywords": [ 6 | "bourbon", 7 | "columns", 8 | "grid", 9 | "layout", 10 | "media", 11 | "media-queries", 12 | "neat", 13 | "queries", 14 | "sass", 15 | "scss", 16 | "semantic" 17 | ], 18 | "homepage": "http://neat.bourbon.io", 19 | "bugs": { 20 | "url": "https://github.com/thoughtbot/neat/issues" 21 | }, 22 | "license": "MIT", 23 | "author": { 24 | "name": "thoughtbot", 25 | "url": "http://thoughtbot.com" 26 | }, 27 | "main": "app/assets/stylesheets/_neat.scss", 28 | "repository": { 29 | "type": "git", 30 | "url": "https://github.com/thoughtbot/neat.git" 31 | }, 32 | "scripts": { 33 | "test": "echo \"No test specified\"" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/images/sprites/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/images/sprites/.gitkeep -------------------------------------------------------------------------------- /src/images/template/ie/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/images/template/ie/.gitkeep -------------------------------------------------------------------------------- /src/js/es6/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/js/es6/.gitkeep -------------------------------------------------------------------------------- /src/js/prototype/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/js/prototype/.gitkeep -------------------------------------------------------------------------------- /src/js/prototype/lib/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/js/prototype/lib/.gitkeep -------------------------------------------------------------------------------- /src/scss/_config.scss: -------------------------------------------------------------------------------- 1 | // Vertical rhythm settings 2 | // ------------------------------------------------ 3 | $vertical-spacing-unit: 20px; 4 | $heading-spacing-unit: .5em 0; 5 | 6 | // Grid settings applied for the bourbon neat library 7 | // ------------------------------------------------ 8 | $column: 70px; 9 | $gutter: 30px; 10 | $grid-columns: 12; 11 | $max-width: 1200px; 12 | 13 | // Mixin vars 14 | // ------------------------------------------------ 15 | 16 | // Colour palette 17 | // ------------------------------------------------ 18 | $brand-color: ( 19 | 20 | ); 21 | 22 | // Main Typographic Heading sizes 23 | // ------------------------------------------------ 24 | $typography: ( 25 | 'base-font-size': 16px, 26 | 'heading-one': 90px, 27 | 'heading-two': 72px, 28 | 'heading-three': 60px, 29 | 'heading-four': 48px, 30 | 'heading-five': 36px, 31 | 'heading-six': 24px 32 | ); 33 | 34 | $base-font-size: map-get($typography, 'base-font-size'); 35 | 36 | // Common breakpoints 37 | // ------------------------------------------------ 38 | $breakpoints: ( 39 | 'small': (480px / $base-font-size) * 1rem, 40 | 'medium': (770px / $base-font-size) * 1rem, 41 | 'large': (1200px / $base-font-size) * 1rem 42 | ); 43 | 44 | -------------------------------------------------------------------------------- /src/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // 2 | // CONTENTS 3 | // 4 | // UTILITIES 5 | // Functions............Useful functions. 6 | // Mixins 7 | // Bourbon..........Bourbon Mixin library - See http://bourbon.io/docs/ 8 | // Neat.............Neat Mixin library - See http://thoughtbot.github.io/neat-docs/latest/ 9 | // Breakpoint.......Media query mixin. 10 | // Rem..............Conditionally output px or rem. 11 | // Before IE 10.....Conditionally output content for pre IE10. 12 | // Before IE 9......Conditionally output content for pre IE9. 13 | // 14 | // Placeholders.........Sass placeholders. 15 | // Accessible Hide..Hide content in CSS but allow screen reader access 16 | // 17 | // Animations...........Globally available animations. 18 | // 19 | // RESET 20 | // Generic Normalize....Inuits normalize css loaded via bower. 21 | // 22 | // BASE 23 | // Fonts................Font face imports. 24 | // Elements.............Base element styling only. 25 | // 26 | // LAYOUTS 27 | // Layout...............Responsive layout helper classes. 28 | // 29 | // PAGES 30 | // Category.............Category page specific adjustments 31 | // Product Listing......Product listing page specific adjustments 32 | // Product..............Product page specific adjustments 33 | // Cart.................Cart page specific adjustments 34 | // Checkout.............Checkout page specific adjustments 35 | // Search results.......Search results page specific adjustments 36 | // Account..............Account page specific adjustments 37 | // 38 | // COMPONENTS 39 | // 40 | // STATES 41 | // State................Globally available states. 42 | // 43 | 44 | // Functions 45 | // ------------------------------------------------ 46 | 47 | // Mixins 48 | // ------------------------------------------------ 49 | @import '../components/bourbon/app/assets/stylesheets/bourbon'; 50 | @import '../components/neat/app/assets/stylesheets/neat'; 51 | @import 'utils/mixins/before-ie-10'; 52 | @import 'utils/mixins/before-ie-9'; 53 | @import 'utils/mixins/breakpoint'; 54 | @import 'utils/mixins/rem'; 55 | 56 | // Placeholders 57 | // ------------------------------------------------ 58 | @import 'utils/placeholders/accessible-hide'; 59 | 60 | // Animations 61 | // ------------------------------------------------ 62 | 63 | // Reset 64 | // ------------------------------------------------ 65 | @import '../components/inuit-normalize/generic.normalize'; 66 | 67 | // Base 68 | // ------------------------------------------------ 69 | @import 'base/fonts'; 70 | @import 'base/elements'; 71 | 72 | // Layouts 73 | // ------------------------------------------------ 74 | @import 'layouts/layout'; 75 | 76 | // Pages 77 | // ------------------------------------------------ 78 | @import 'pages/category'; 79 | @import 'pages/product-listing'; 80 | @import 'pages/product'; 81 | @import 'pages/cart'; 82 | @import 'pages/checkout'; 83 | @import 'pages/search-results'; 84 | @import 'pages/account'; 85 | 86 | // Components 87 | // ------------------------------------------------ 88 | 89 | // Global state classes 90 | // ------------------------------------------------ 91 | @import 'state'; 92 | -------------------------------------------------------------------------------- /src/scss/_state.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/scss/_state.scss -------------------------------------------------------------------------------- /src/scss/application-ie9.scss: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------ 2 | // Cross browser support settings 3 | // ------------------------------------------------ 4 | $lt-ie10: true !default; 5 | $lt-ie9: false !default; 6 | $media-queries: true; 7 | 8 | // Globally available variables and sass maps 9 | @import 'config'; 10 | 11 | // The core contains everything except variables and sass maps used 12 | // throughout the theme. See the core partials table of contents for 13 | // more information. 14 | // ------------------------------------------------ 15 | @import 'core'; 16 | -------------------------------------------------------------------------------- /src/scss/application.scss: -------------------------------------------------------------------------------- 1 | // Config 2 | // ------------------------------------------------ 3 | // Cross browser support settings 4 | // ------------------------------------------------ 5 | $lt-ie10: false !default; 6 | $lt-ie9: false !default; 7 | $media-queries: true; 8 | 9 | // Globally available variables and sass maps 10 | @import 'config'; 11 | 12 | // The core contains everything except variables and sass maps used 13 | // throughout the theme. See the core partials table of contents for 14 | // more information. 15 | // ------------------------------------------------ 16 | @import 'core'; 17 | -------------------------------------------------------------------------------- /src/scss/base/_elements.scss: -------------------------------------------------------------------------------- 1 | // 2 | // This partial is for Base element styling only. 3 | // If it is not an element selector or pseudo class of a base element 4 | // then it does not belong in this file. 5 | // 6 | 7 | html, 8 | body { 9 | -moz-osx-font-smoothing: grayscale; 10 | -webkit-font-smoothing: antialiased; 11 | text-rendering: optimizeLegibility; 12 | } 13 | 14 | audio, 15 | canvas, 16 | iframe, 17 | img, 18 | svg, 19 | video { 20 | vertical-align: middle; 21 | } 22 | 23 | // HTML5 responsive video // 24 | video { 25 | height: auto; 26 | width: 100%; 27 | } 28 | 29 | // Basic responsive imagery // 30 | img { 31 | height: auto; 32 | max-width: 100%; 33 | } 34 | 35 | // Interactions should have pointer // 36 | label, 37 | a, 38 | button, 39 | select, 40 | input[type="submit"] { 41 | cursor: pointer; 42 | } 43 | 44 | h1, 45 | h2, 46 | h3, 47 | h4, 48 | h5, 49 | h6 { 50 | font-weight: normal; 51 | margin: $heading-spacing-unit; 52 | } 53 | 54 | h1 { 55 | @include rem(font-size, map-get($typography, 'heading-one')); 56 | } 57 | 58 | h2 { 59 | @include rem(font-size, map-get($typography, 'heading-two')); 60 | } 61 | 62 | h3 { 63 | @include rem(font-size, map-get($typography, 'heading-three')); 64 | } 65 | 66 | h4 { 67 | @include rem(font-size, map-get($typography, 'heading-four')); 68 | } 69 | 70 | h5 { 71 | @include rem(font-size, map-get($typography, 'heading-five')); 72 | } 73 | 74 | h6 { 75 | @include rem(font-size, map-get($typography, 'heading-six')); 76 | } 77 | 78 | a { 79 | -webkit-tap-highlight-color: transparent; 80 | text-decoration: none; 81 | 82 | &:hover, 83 | &:active { 84 | outline: 0; 85 | } 86 | } 87 | 88 | fieldset { 89 | border: 0; 90 | margin: 0; 91 | padding: 0; 92 | 93 | ul { 94 | list-style: none; 95 | margin: 0; 96 | padding: 0; 97 | } 98 | } 99 | 100 | input[type="text"], 101 | input[type="password"], 102 | input[type="date"], 103 | input[type="datetime"], 104 | input[type="datetime-local"], 105 | input[type="month"], 106 | input[type="week"], 107 | input[type="email"], 108 | input[type="number"], 109 | input[type="search"], 110 | input[type="tel"], 111 | input[type="time"], 112 | input[type="url"], 113 | input[type="submit"], 114 | textarea { 115 | -webkit-appearance: none; 116 | } 117 | 118 | textarea { 119 | resize: vertical; 120 | } 121 | 122 | input::-moz-focus-inner, 123 | button::-moz-focus-inner { 124 | border: 0; 125 | padding: 0; 126 | } 127 | 128 | select { 129 | max-width: 100%; 130 | } 131 | 132 | iframe, 133 | object, 134 | embed { 135 | max-width: 100%; 136 | } 137 | 138 | button { 139 | -webkit-tap-highlight-color: transparent; 140 | user-select: none; 141 | 142 | &::-moz-focus-inner { 143 | border: 0; 144 | } 145 | 146 | &:disabled { 147 | opacity: .5; 148 | } 149 | } 150 | 151 | 152 | ul { 153 | margin: 0; 154 | padding: 0; 155 | } 156 | 157 | ol { 158 | margin: 0; 159 | padding: 0; 160 | } 161 | 162 | p { 163 | @include rem(margin, $vertical-spacing-unit 0); 164 | 165 | &:empty { 166 | margin: 0; 167 | } 168 | } 169 | 170 | blockquote, 171 | q { 172 | quotes: '\201C""\201D""\2018""\2019'; 173 | 174 | &:before { 175 | content: open-quote; 176 | } 177 | 178 | &:after { 179 | content: close-quote; 180 | } 181 | 182 | p { 183 | display: inline; 184 | } 185 | } 186 | 187 | hr { 188 | border: 0; 189 | display: block; 190 | height: 1px; 191 | width: 100%; 192 | } 193 | 194 | strong { 195 | font-weight: bold; 196 | } 197 | 198 | em { 199 | font-style: italic; 200 | } 201 | -------------------------------------------------------------------------------- /src/scss/base/_fonts.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/scss/base/_fonts.scss -------------------------------------------------------------------------------- /src/scss/layouts/_layout.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Reusable column layout structures in Magento 3 | // using the Bourbon neat framework 4 | // 5 | 6 | 7 | // Single column layout by default given that elements are block level 8 | // Change layout for breakpoints 9 | .col2-set { 10 | @include row(); 11 | 12 | @include breakpoint('small') { 13 | .col-1, 14 | .col-2 { 15 | @include span-columns(6 of 12); 16 | } 17 | } 18 | } 19 | 20 | .col3-set { 21 | @include row(); 22 | 23 | @include breakpoint('medium') { 24 | .col-1, 25 | .col-2, 26 | .col-3 { 27 | @include span-columns(4 of 12); 28 | } 29 | } 30 | } 31 | 32 | .col4-set { 33 | @include row(); 34 | 35 | @include breakpoint('small') { 36 | .col-1, 37 | .col-2, 38 | .col-3, 39 | .col-4 { 40 | @include span-columns(6 of 12); 41 | } 42 | 43 | .col-2, 44 | .col-4 { 45 | margin-right: 0; 46 | } 47 | 48 | .col-3 { 49 | clear: both; 50 | } 51 | } 52 | 53 | @include breakpoint('large') { 54 | .col-1, 55 | .col-2, 56 | .col-3, 57 | .col-4 { 58 | @include span-columns(3 of 12); 59 | } 60 | 61 | .col-3 { 62 | clear: none; 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/scss/pages/_account.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/scss/pages/_account.scss -------------------------------------------------------------------------------- /src/scss/pages/_cart.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/scss/pages/_cart.scss -------------------------------------------------------------------------------- /src/scss/pages/_category.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/scss/pages/_category.scss -------------------------------------------------------------------------------- /src/scss/pages/_checkout.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/scss/pages/_checkout.scss -------------------------------------------------------------------------------- /src/scss/pages/_product-listing.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/scss/pages/_product-listing.scss -------------------------------------------------------------------------------- /src/scss/pages/_product.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/scss/pages/_product.scss -------------------------------------------------------------------------------- /src/scss/pages/_search-results.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/scss/pages/_search-results.scss -------------------------------------------------------------------------------- /src/scss/utils/animations/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/scss/utils/animations/.gitkeep -------------------------------------------------------------------------------- /src/scss/utils/functions/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/scss/utils/functions/.gitkeep -------------------------------------------------------------------------------- /src/scss/utils/mixins/_before-ie-10.scss: -------------------------------------------------------------------------------- 1 | /// Mixin to output content if application file is for ie10 or less 2 | /// 3 | /// @group Legacy Browsers 4 | /// @access public 5 | /// 6 | /// @example scss - Usage 7 | /// .foo { 8 | /// background: url(../images/cat-icon.svg); 9 | /// @include before-ie-10 { 10 | /// background: url(../images/ie/cat-icon.png); 11 | /// } 12 | /// } 13 | /// 14 | /// @example css - CSS output within application.scss 15 | /// 16 | /// .foo { 17 | /// background: url(../images/cat-icon.svg); } 18 | /// 19 | /// @example css - CSS output within application-ie9.scss 20 | /// 21 | /// .foo { 22 | /// background: url(../images/cat-icon.svg); 23 | /// background: url(../images/ie/cat-icon.png); } 24 | /// 25 | 26 | @mixin before-ie-10 { 27 | // Only use this content if we're dealing with old IE 28 | @if $lt-ie10 { 29 | @content; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/scss/utils/mixins/_before-ie-9.scss: -------------------------------------------------------------------------------- 1 | /// Mixin to output content if application file is for ie9 or less 2 | /// 3 | /// @group Legacy Browsers 4 | /// @access public 5 | /// 6 | /// @example scss - Usage 7 | /// .foo { 8 | /// background: url(../images/cat-icon.svg); 9 | /// @include before-ie-9 { 10 | /// background: url(../images/ie/cat-icon.png); 11 | /// } 12 | /// } 13 | /// 14 | /// @example css - CSS output within application.scss 15 | /// 16 | /// .foo { 17 | /// background: url(../images/cat-icon.svg); } 18 | /// 19 | /// @example css - CSS output within application-ie8.scss 20 | /// 21 | /// .foo { 22 | /// background: url(../images/cat-icon.svg); 23 | /// background: url(../images/ie/cat-icon.png); } 24 | /// 25 | 26 | @mixin before-ie-9 { 27 | // Only use this content if we're dealing with old IE 28 | @if $lt-ie9 { 29 | @content; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/scss/utils/mixins/_breakpoint.scss: -------------------------------------------------------------------------------- 1 | /// Mixin to output breakpoint given a variable, sass map reference or value 2 | /// 3 | /// @group Media Queries 4 | /// @access public 5 | /// 6 | /// @param {Length} $min - Value to assign to min-width within media query 7 | /// @param {Length} $max - Value to assign to max-width within media query 8 | /// 9 | /// @example scss - Usage 10 | /// .foo { 11 | /// @include breakpoint(100px) { 12 | /// width: 50px; 13 | /// } 14 | /// } 15 | /// 16 | /// .bar { 17 | /// @include breakpoint(200px, 400px) { 18 | /// width: 50px; 19 | /// } 20 | /// } 21 | /// 22 | /// @example css - CSS output 23 | /// 24 | /// @media (min-width: 100px) { 25 | /// .foo { 26 | /// width: 50px; } } 27 | /// 28 | /// @media (min-width: 200px) and (max-width: 400px) { 29 | /// .bar { 30 | /// width: 50px; } } 31 | /// 32 | 33 | @function parse-breakpoint-string($value) { 34 | @if $breakpoints { 35 | @if map-get($breakpoints, $value) { 36 | @return map-get($breakpoints, $value); 37 | } @else { 38 | @return 0; 39 | } 40 | } 41 | 42 | @return 0; 43 | } 44 | 45 | @mixin breakpoint($min: 0, $max: 0) { 46 | $type-min: type-of($min); 47 | $type-max: type-of($max); 48 | 49 | @if $type-min == string { 50 | $min: parse-breakpoint-string($min); 51 | } 52 | 53 | @if $type-max == string { 54 | $max: parse-breakpoint-string($max); 55 | } 56 | 57 | $query: 'all' !default; 58 | @if $min != 0 and $max != 0 { 59 | $query: '(min-width: #{$min}) and (max-width: #{$max})'; 60 | } @else if $min != 0 and $max == 0 { 61 | $query: '(min-width: #{$min})'; 62 | } @else if $min == 0 and $max != 0 { 63 | $query: '(max-width: #{$max})'; 64 | } 65 | 66 | @media #{$query} { 67 | @content; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/scss/utils/mixins/_rem.scss: -------------------------------------------------------------------------------- 1 | /// Mixin to output px or rem value depending on application file for a given property. 2 | /// 3 | /// @group General 4 | /// @access public 5 | /// 6 | /// @param {String} $property - Property name to output 7 | /// @param {Length} $values - Values to assign to the property 8 | /// 9 | /// @example scss - Usage 10 | /// .foo { 11 | /// @include rem(font-size, 100px); 12 | /// } 13 | /// 14 | /// .bar { 15 | /// @include rem(font-size, 100px); 16 | /// } 17 | /// 18 | /// @example css - CSS output within application.scss 19 | /// .foo { 20 | /// font-size: 6.25rem; 21 | /// } 22 | /// 23 | /// @example css - CSS output within application-ie8.scss 24 | /// .bar { 25 | /// font-size: 100px; 26 | /// } 27 | 28 | @mixin rem($property, $values) { 29 | // Create a couple of empty lists as output buffers. 30 | $font-size: $base-font-size; 31 | $px-values: (); 32 | $rem-values: (); 33 | 34 | // Loop through the $values list 35 | @each $value in $values { 36 | // For each property value, if it's in rem or px, derive both rem and 37 | // px values for it and add those to the end of the appropriate buffer. 38 | // Ensure all pixel values are rounded to the nearest pixel. 39 | @if $value == 0 or $value == '0px' { 40 | // 0 -- use it without a unit 41 | $px-values: join($px-values, 0); 42 | $rem-values: join($rem-values, 0); 43 | } @else if type-of($value) == number and not unitless($value) and (unit($value) == px) { 44 | // px value given - calculate rem value from font-size 45 | $new-rem-value: $value / $font-size; 46 | $px-values: join($px-values, round($value)); 47 | $rem-values: join($rem-values, #{$new-rem-value}rem); 48 | } @else if type-of($value) == number and not unitless($value) and (unit($value) == '%') { 49 | // % value given - don't add px or rem 50 | $px-values: join($px-values, #{$value}); 51 | $rem-values: join($rem-values, #{$value}); 52 | } @else if $value == auto { 53 | // auto - don't add px or rem 54 | $px-values: join($px-values, auto); 55 | $rem-values: join($rem-values, auto); 56 | } @else { 57 | // unitless value - use those directly as rem and calculate the px-fallback 58 | $px-values: join($px-values, round($value * $font-size)); 59 | $rem-values: join($rem-values, #{$value}rem); 60 | } 61 | } 62 | 63 | // output the converted rules 64 | @if ($lt-ie9) { 65 | #{$property}: $px-values; 66 | } @else { 67 | #{$property}: $rem-values; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/scss/utils/placeholders/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/scss/utils/placeholders/.gitkeep -------------------------------------------------------------------------------- /src/scss/utils/placeholders/_accessible-hide.scss: -------------------------------------------------------------------------------- 1 | // 2 | // To hide content from display but allow screen readers access 3 | // to the elements content. 4 | // This placeholder can be used using @extend %accessible-hide 5 | // 6 | %accessible-hide { 7 | border: 0; 8 | clip: rect(0 0 0 0); 9 | height: 1px; 10 | margin: -1px; 11 | overflow: hidden; 12 | padding: 0; 13 | position: absolute; 14 | width: 1px; 15 | } 16 | -------------------------------------------------------------------------------- /src/scss/vendor/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meanbee/magento-boilerplate-fe-build-tools/da53790949ba9b33704cdfe1e5b88df5e3929bd0/src/scss/vendor/.gitkeep -------------------------------------------------------------------------------- /theme-requirements.md: -------------------------------------------------------------------------------- 1 | # Theme Requirements 2 | 3 | This document is a reference for the support and performance requirements of this theme. 4 | 5 | Browser support should be checked against analytics every 3 months and updated below with a 6 | date timestamp. 7 | 8 | When a support level or performance budget change, the theme should be analysed 9 | for possible performance or architectural improvements and a proposal put forward with 10 | suggestions for refactoring. 11 | 12 | ## Methodologies 13 | 14 | The following should be applied to this themes construction: 15 | 16 | - [Responsive / Fixed grid / Retrofit] 17 | - [Mobile first / Desktop first] 18 | - Progressive enhancement 19 | 20 | ## Browser Support 21 | 22 | ### Support level 1 (Full support) 23 | [Timestamp] 24 | 25 | This level of support assumes the following: 26 | 27 | - All functionality provided and working 28 | - Minimal deviation from design 29 | 30 | The following browsers have been approved for this support level: 31 | 32 | - Internet Explorer Versions [version] 33 | - Safari [latest] 34 | - Firefox [latest] 35 | - Chrome [latest] 36 | - Safari (mobile) 37 | - Chrome mobile 38 | - Android browser 39 | - IE mobile 40 | 41 | ### Support level 2 (Partial support) 42 | [Timestamp] 43 | 44 | This level of support assumes the following: 45 | 46 | - Reduced functionality to maintain performance budget 47 | - Unsupported feature fallbacks are provided 48 | 49 | The following browsers have been approved for this support level: 50 | 51 | - Internet Explorer Versions [8] 52 | 53 | 54 | ## Performance Budget 55 | 56 | The following frontend performance targets have been outlined: 57 | 58 | ### Desktop 59 | 60 | [Timestamp] 61 | 62 | - DOM size of [value] 63 | - Average page weight of [value] 64 | - Start render time of [value] 65 | - Visually complete time of [value] 66 | - Speed index of [value] 67 | 68 | ### Mobile 69 | 70 | [Timestamp] 71 | 72 | - DOM size of [value] 73 | - Average page weight of [value] 74 | - Start render time of [value] 75 | - Visually complete time of [value] 76 | - Speed index of [value] --------------------------------------------------------------------------------