Repository: frontainer/frontplate Branch: master Commit: cab1cf62883a Files: 21 Total size: 24.2 KB Directory structure: gitextract_4o5w0qy_/ ├── .editorconfig ├── .eslintrc ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── frp.config.js ├── package.json └── src/ ├── index.ejs ├── js/ │ ├── app.js │ └── app.spec.js ├── lib/ │ └── .keep ├── sass/ │ ├── _setting.scss │ ├── base/ │ │ ├── _base.scss │ │ ├── _mixin.scss │ │ └── _sanitize.scss │ ├── layout/ │ │ └── _layout.scss │ ├── sprites/ │ │ └── _icon.scss │ └── style.scss └── view/ └── _header.ejs ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ root = true [*] charset = utf-8 end_of_line = lf indent_size = 2 indent_style = space insert_final_newline = true trim_trailing_whitespace = true [*.md] trim_trailing_whitespace = false ================================================ FILE: .eslintrc ================================================ { "env": { "browser": true, "mocha": true, "es6": true }, "parserOptions": { "sourceType": "module" }, "rules": { "comma-dangle": [1, "never"], "no-console": 1, "eol-last": 0, "block-scoped-var": 0, "complexity": 1, "consistent-return": 1, "default-case": 1, "eqeqeq": 1, "no-alert": 1, "no-caller": 1, "no-eval": 2, "no-new": 0, "no-new-func": 1, "no-proto": 2, "no-script-url": 1, "no-self-compare": 1, "no-void": 2, "no-var": 2, "camelcase": [2, {"properties": "always"}], "no-array-constructor": 1, "quotes": [0, "single"], "no-unused-vars": 1, "space-after-keywords": 0, "space-infix-ops": 0, "space-return-throw-case": 0, "comma-spacing": 0, "prefer-const": 0, "no-undef": 0, "curly": 0 }, "ecmaFeatures": { "arrowFunctions": true, "binaryLiterals": true, "blockBindings": true, "classes": true, "defaultParams": true, "destructuring": true, "forOf": true, "generators": true, "modules": true, "objectLiteralComputedProperties": true, "objectLiteralDuplicateProperties": true, "objectLiteralShorthandMethods": true, "objectLiteralShorthandProperties": true, "octalLiterals": true, "regexUFlag": true, "regexYFlag": true, "restParams": true, "spread": true, "superInFunctions": true, "templateStrings": true, "unicodeCodePointEscapes": true, "globalReturn": true, "jsx": true } } ================================================ FILE: .gitignore ================================================ .idea .sass-cache .DS_Store node_modules public guide ================================================ FILE: .travis.yml ================================================ sudo: false language: node_js node_js: - '6.0' - '5.0' before_script: - npm install -g frontplate-cli script: - frp task clean - frp task sprite - frp task copy - frp task html - frp task script - frp task style notifications: slack: secure: U1Ta+5fq1Np5Vig6D2qte0jvrnzHJc2DpKpgJSZOd8LGP3FWZ/t1vTT7sepY6WzMETuen0BGtO56wlCE2qFBAQUPIC5rkH71wy2hFE3WGjOuNSB6Sqpf9mfK6XvEQJRi9UDVlSDFuBHAftrnit855IyUEL7aZZWsvhdYUS+j4DQ= ================================================ FILE: CHANGELOG.md ================================================ # [5.0.0](https://github.com/frontainer/frontplate/compare/v4.0.2...v5.0.0) (2016-12-10) ### add * .eslintrcをデフォルトで追加して設定しやすく ([045083b5569f8544b70d4abbcd687799e7d5d460](https://github.com/frontainer/frontplate/commit/045083b5569f8544b70d4abbcd687799e7d5d460)) * htmlにno-jsまたはjsを付与するための簡易スクリプトを追加 ([e1b2836bd33004b4b533fe0c391508a07128c2be](https://github.com/frontainer/frontplate/commit/e1b2836bd33004b4b533fe0c391508a07128c2be)) ### fix * jsの初期サンプルとテストをシンプルな形で修正してもエラーが出ないように ([954f99374a2f80455cbb541d2150ced8f5cd2a7a](https://github.com/frontainer/frontplate/commit/954f99374a2f80455cbb541d2150ced8f5cd2a7a)) * starハックによるビルドエラーを回避 ([168536544a447138633fb9d1eb1f1790eda7a672](https://github.com/frontainer/frontplate/commit/168536544a447138633fb9d1eb1f1790eda7a672)) * サンプルのスプライトscssをfrontplate-cli v3系のものに ([28601431fb2c540c099d83f0ed6f538b93ffc6f8](https://github.com/frontainer/frontplate/commit/28601431fb2c540c099d83f0ed6f538b93ffc6f8)) * 初期のviewファイルの位置と内容をシンプルに ([978dbe936fe72b335c2875fd381d9c29f0db16b4](https://github.com/frontainer/frontplate/commit/978dbe936fe72b335c2875fd381d9c29f0db16b4)) ## [4.0.2](https://github.com/frontainer/frontplate/compare/v4.0.1...v4.0.2) (2016-11-04) ## [4.0.1](https://github.com/frontainer/frontplate/compare/v4.0.0...v4.0.1) (2016-10-10) ### fix * テストのファイル名をangular2に合わせてspec.jsに ([f3bcb3ebe61f4063306007c8cae1f5b53cb41425](https://github.com/frontainer/frontplate/commit/f3bcb3ebe61f4063306007c8cae1f5b53cb41425)) # [4.0.0](https://github.com/frontainer/frontplate/compare/v3.1.0...v4.0.0) (2016-10-10) ### Breaking * lodashを依存パッケージから削除 ([6a833345279dc43ebdefefea25f06c6c75dcd963](https://github.com/frontainer/frontplate/commit/6a833345279dc43ebdefefea25f06c6c75dcd963)) * npm2サポートを停止 ([11437eb3a7a0c13c49723967f5af734fab01f3d4](https://github.com/frontainer/frontplate/commit/11437eb3a7a0c13c49723967f5af734fab01f3d4)) * すべてのビルドタスクをfrontplate-cliに置き換え ([dc7e8939f38e5cec8248dc92a130749928660279](https://github.com/frontainer/frontplate/commit/dc7e8939f38e5cec8248dc92a130749928660279)) ### Build * テスト環境を5.6/5.0/4.2に変更 ([5d8d0c1c38ef75282c7dbd68c359fc24d47082db](https://github.com/frontainer/frontplate/commit/5d8d0c1c38ef75282c7dbd68c359fc24d47082db)) ### Docs * changelog出力コマンドを修正 ([e74ae7b4f2f91a1bedbe425dcfb9be9e23d121a3](https://github.com/frontainer/frontplate/commit/e74ae7b4f2f91a1bedbe425dcfb9be9e23d121a3)) * sprite画像のパスが誤っていたのを修正 ([d74f31ef0fc51aad91f86d1a65c5a847bad4d5b0](https://github.com/frontainer/frontplate/commit/d74f31ef0fc51aad91f86d1a65c5a847bad4d5b0)) * version3とnpmのアップデートについて追記 ([08639c1e9900b13605849e2ec35d8abdd16a1865](https://github.com/frontainer/frontplate/commit/08639c1e9900b13605849e2ec35d8abdd16a1865)) ### feat * スプライト生成サンプルを追加 ([b6802f6005a4adeeba7b16bb339fbaaf80ba5a18](https://github.com/frontainer/frontplate/commit/b6802f6005a4adeeba7b16bb339fbaaf80ba5a18)) ### fix * _つきのscssファイルだとスタイルガイドが生成されない不具合の修正 ([d959ec664ed7c653652e8d1ca28cea908f4ab39e](https://github.com/frontainer/frontplate/commit/d959ec664ed7c653652e8d1ca28cea908f4ab39e)) * babelの設定をwebpack.config.jsから.babelrcに移動 ([197be976c992c055fc9b4cae400a68ed297f8b8f](https://github.com/frontainer/frontplate/commit/197be976c992c055fc9b4cae400a68ed297f8b8f)) * sprite.scssが正しく出力されない不具合を修正 ([17ceed9ba74a9ec104c437547099ef23ebe4113c](https://github.com/frontainer/frontplate/commit/17ceed9ba74a9ec104c437547099ef23ebe4113c)) ### Fix * 実際に近いファイルサイズを確認するためにsourcemapsをインラインから外部ファイルに ([5e2fbd6ac9727a2a0d841b2767892afff7695d56](https://github.com/frontainer/frontplate/commit/5e2fbd6ac9727a2a0d841b2767892afff7695d56)) ### Upgrade * eslint/phantomjsを2へバージョンアップ ([0a2066afc3ffec1672a035239d00a7d9923659be](https://github.com/frontainer/frontplate/commit/0a2066afc3ffec1672a035239d00a7d9923659be)) ## [2.0.2](https://github.com/frontainer/frontplate/compare/2.0.1...2.0.2) (2016-01-21) ### Doc * update changelog ([37960a96f2ec321aa9655044ee0534f8de3f94f0](https://github.com/frontainer/frontplate/commit/37960a96f2ec321aa9655044ee0534f8de3f94f0)) ### New * 異なる環境でも動作するようDockerfileを追加 ([63cc1014fea16f4ab1b2a7f440c8a3ae1a76c217](https://github.com/frontainer/frontplate/commit/63cc1014fea16f4ab1b2a7f440c8a3ae1a76c217)) ### Update * 依存パッケージのアップデート ([f6099f9095822bf47c743da01fb4b97d1f3bc1af](https://github.com/frontainer/frontplate/commit/f6099f9095822bf47c743da01fb4b97d1f3bc1af)) ## [2.0.1](https://github.com/frontainer/frontplate/compare/2.0.0...2.0.1) (2015-12-27) ### Breaking * __IS_PRODUCTIONをデフォルトで提供するのを停止 ([6df832b228b44ade10e0f96099ff348e1088c955](https://github.com/frontainer/frontplate/commit/6df832b228b44ade10e0f96099ff348e1088c955)) * cssnanoからcssoに変更 ([328c866dfa8757d0b4192c5de8c3ffdeb77efd96](https://github.com/frontainer/frontplate/commit/328c866dfa8757d0b4192c5de8c3ffdeb77efd96)) * SCSSのコンパイル対象と監視対象を切り分け ([8b5d9fe2ad5076986760064ebb6f5398a6e6766f](https://github.com/frontainer/frontplate/commit/8b5d9fe2ad5076986760064ebb6f5398a6e6766f)) ### Build * gulpタスクをES6へ書き替え ([730e0fbfe78631e5289edc3a598059cf44667752](https://github.com/frontainer/frontplate/commit/730e0fbfe78631e5289edc3a598059cf44667752)) ### Docs * ライセンス表記を外部ファイル化 ([5ad3c21ad7f3304a6ddbfce29d8d63b6017aa41b](https://github.com/frontainer/frontplate/commit/5ad3c21ad7f3304a6ddbfce29d8d63b6017aa41b)) * ライセンス表記を外部ファイル化 ([4893c7c7d111076b8829cac95fffd7db77924cfa](https://github.com/frontainer/frontplate/commit/4893c7c7d111076b8829cac95fffd7db77924cfa)) ### Fix * BEM記法だとwarningになってしまっていたので'both'にして両対応 ([80c36de6bee7782222454cfd7286269ff6eb0ba5](https://github.com/frontainer/frontplate/commit/80c36de6bee7782222454cfd7286269ff6eb0ba5)) * callback待ちのためにctrl+cを2回 実行しないとdefaultタスクが抜けれない不具合の修正 ([2f04f2859884b829552cb1c584d4c837c26857b6](https://github.com/frontainer/frontplate/commit/2f04f2859884b829552cb1c584d4c837c26857b6)) * JavaScriptの監視範囲が必要以上に広くなっていたのを修正 ([35b1161560bbe65ae03374da49309d85f73cb5ab](https://github.com/frontainer/frontplate/commit/35b1161560bbe65ae03374da49309d85f73cb5ab)) * noParseオプションではコンパイルできない事象があったので、excludeに修正 ([6e834c09fc552f69563995996936468ee954b1d4](https://github.com/frontainer/frontplate/commit/6e834c09fc552f69563995996936468ee954b1d4)) * sass-listでのクォートチェックをしないように変更 ([196dfe66354ed3b5878c2f50db737c892b657f50](https://github.com/frontainer/frontplate/commit/196dfe66354ed3b5878c2f50db737c892b657f50)) * sprite画像が生成されていない不具合の修正 ([45b3a844bfed454d2b54dd1969b4b03b95d5725e](https://github.com/frontainer/frontplate/commit/45b3a844bfed454d2b54dd1969b4b03b95d5725e)) * コピー対象の数が多い時に一部欠落する不具合の修正 ([c529b5b75ac098461927639412f4b206b8792b9e](https://github.com/frontainer/frontplate/commit/c529b5b75ac098461927639412f4b206b8792b9e)) * スプライト画像をRetinaサイズで作成した際に割り切れずボヤける対策のため、paddingを5から6へ修正 ([87ae8da582d57c6a344492e86b87cfee4f04c5b2](https://github.com/frontainer/frontplate/commit/87ae8da582d57c6a344492e86b87cfee4f04c5b2)) ### New * CSSの圧縮にminify-cssを導入 ([c2e3b3374503e1e52051c3747d8c2b506b1defd0](https://github.com/frontainer/frontplate/commit/c2e3b3374503e1e52051c3747d8c2b506b1defd0)) * node-sassオプションをconfigで設定できるように ([43f76b2984b97ee68bf90752b2fffc77ba759d8a](https://github.com/frontainer/frontplate/commit/43f76b2984b97ee68bf90752b2fffc77ba759d8a)) * sass-lintとdoiuseを導入 ([176566de87517a88c80a1e0cf0e3bb971e73f1ba](https://github.com/frontainer/frontplate/commit/176566de87517a88c80a1e0cf0e3bb971e73f1ba)) ### Update * config.jsからBrowserSyncのproxyを設定できるよう修正 ([227432b53191fc6801022ba8e9b47929d9cbbfec](https://github.com/frontainer/frontplate/commit/227432b53191fc6801022ba8e9b47929d9cbbfec)) * ESLintのno-var,no-protoを2(error)に設定 ([0fd78d7c03f9d40e53d1edf11b90ee581376eb8b](https://github.com/frontainer/frontplate/commit/0fd78d7c03f9d40e53d1edf11b90ee581376eb8b)) * spritesmithの仕様変更に合わせて修正 ([002cb84b440a77671dc16c8c759e57c083d89572](https://github.com/frontainer/frontplate/commit/002cb84b440a77671dc16c8c759e57c083d89572)) * webpack-streamを使わずWebPack単体で動作するように ([fc28ecbbb1ab38fe2d0b9c0f0a819fc605abce62](https://github.com/frontainer/frontplate/commit/fc28ecbbb1ab38fe2d0b9c0f0a819fc605abce62)) * webpack.configのexcludeとnoParseの設定を修正 ([ee772c03cc3bc5128703c83c899282fa9de24587](https://github.com/frontainer/frontplate/commit/ee772c03cc3bc5128703c83c899282fa9de24587)) ## [1.1.6](https://github.com/frontainer/frontplate/compare/1.1.5...1.1.6) (2015-10-29) ## [1.1.5](https://github.com/frontainer/frontplate/compare/1.1.4...1.1.5) (2015-09-27) ## [1.0.2](https://github.com/frontainer/frontplate/compare/1.0.1...1.0.2) (2015-07-17) # [0.2.0](https://github.com/frontainer/frontplate/compare/0.1.3...0.2.0) (2014-10-04) ## [0.1.3](https://github.com/frontainer/frontplate/compare/0.1.2...0.1.3) (2014-09-20) ## 0.1.2 (2014-09-20) ================================================ FILE: LICENSE ================================================ The MIT License (MIT) Copyright (c) 2015 frontainer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # frontplate フロントエンド開発の効率を上げるテンプレート [CHANGELOG](https://github.com/frontainer/frontplate/blob/master/CHANGELOG.md) [過去バージョン](https://github.com/frontainer/frontplate/releases) ## Dependence * [NodeJS](https://nodejs.org/) 5.0以上 * [frontplate-cli](https://www.npmjs.com/package/frontplate-cli) 3.0以上 ## Usage 詳しくは[wiki](https://github.com/frontainer/frontplate-cli/wiki)を参照ください https://github.com/frontainer/frontplate-cli/wiki ================================================ FILE: frp.config.js ================================================ 'use strict'; // https://github.com/frontainer/frontplate-cli/wiki/6.%E8%A8%AD%E5%AE%9A module.exports = function(production) { global.FRP_SRC = 'src'; global.FRP_DEST = 'public'; return { clean: {}, html: {}, style: production ? {} : {}, script: production ? {} : {}, server: {}, copy: {}, sprite: [], test: {} } }; ================================================ FILE: package.json ================================================ { "name": "Frontplate", "version": "5.0.0", "description": "フロントエンド開発の効率をあげるフルスタックテンプレート", "dependencies": {}, "devDependencies": {}, "scripts": { "start": "frp build && frp serve -t", "test": "frp task test", "build": "frp build", "serve": "frp serve", "production": "frp build -p", "changelog": "conventional-changelog -p eslint -i CHANGELOG.md -w -s -r 0" }, "repository": { "type": "git", "url": "git@github.com:frontainer/frontplate.git" }, "author": "frontainer", "license": "MIT", "private": true } ================================================ FILE: src/index.ejs ================================================
特に何も指定しないときの状態
``` */ body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-font-smoothing: $font-smoothing; -moz-osx-font-smoothing: grayscale; font-smoothing: $font-smoothing; text-rendering: $text-rendering; font-size: $base-font-size; font-family: $base-font-family; color: $base-font-color; background-color: $base-background-color; } ================================================ FILE: src/sass/base/_mixin.scss ================================================ @mixin sprite-width($sprite,$scale:1) { width: nth($sprite, 5) * $scale; } @mixin sprite-height($sprite,$scale:1) { height: nth($sprite, 6) * $scale; } @mixin sprite-position($sprite,$scale:1) { $sprite-offset-x: nth($sprite, 3) * $scale; $sprite-offset-y: nth($sprite, 4) * $scale; background-position: $sprite-offset-x $sprite-offset-y; } @mixin sprite-image($sprite) { $sprite-image: nth($sprite, 9); background-image: url(#{$sprite-image}); background-repeat: no-repeat; } @mixin sprite-size($sprite,$scale:1) { background-size: nth($sprite, 7)*$scale nth($sprite, 8)*$scale; } @mixin sprite($sprite,$scale:1) { display: inline-block; @include sprite-image($sprite); @include sprite-position($sprite, $scale); @include sprite-width($sprite, $scale); @include sprite-height($sprite, $scale); @include sprite-size($sprite, $scale); } ================================================ FILE: src/sass/base/_sanitize.scss ================================================ /*! sanitize.css | CC0 Public Domain | github.com/jonathantneal/sanitize.css */ $root-box-sizing: border-box !default; $root-cursor: default !default; $root-font-family: sans-serif !default; $root-font-size: 16px !default; $root-line-height: 1.5 !default; $root-text-rendering: optimizeLegibility !default; $html-background-color: #FFFFFF !default; $anchor-text-decoration: none !default; $form-element-background-color: transparent !default; $form-element-min-height: if(unitless($root-line-height), #{$root-line-height}em, if(unit($root-line-height) != '%', $root-line-height, null)) !default; $media-element-vertical-align: middle !default; $monospace-font-family: monospace !default; $nav-list-style: none !default; $selection-background-color: #B3D4FC !default; $selection-text-shadow: none !default; $small-font-size: 75% !default; $table-border-collapse: collapse !default; $table-border-spacing: 0 !default; $textarea-resize: vertical !default; /* * Normalization */ :root { -ms-overflow-style: -ms-autohiding-scrollbar; // IE11+ overflow-y: scroll; // All browsers without overlaying scrollbars text-size-adjust: 100%; // iOS 8+ } audio:not([controls]) { display: none; // Chrome 40+, iOS 8+, Safari 8+ } details { display: block; // Firefox 36+, Internet Explorer 11+, Windows Phone 8.1+ } input { &[type="number"] { width: auto; // Firefox 36+ } &[type="search"] { -webkit-appearance: textfield; // Safari 8+ &::-webkit-search-cancel-button, &::-webkit-search-decoration { -webkit-appearance: none; // Safari 8+ } } } main { display: block; // Android 4.3-, Internet Explorer 11+, Windows Phone 8.1+ } summary { display: block; // Firefox 36+, Internet Explorer 11+, Windows Phone 8.1+ } pre { overflow: auto; // Internet Explorer 11+ } progress { display: inline-block; // Internet Explorer 11+, Windows Phone 8.1+ } small { font-size: $small-font-size; // All browsers } template { display: none; // Android 4.3-, Internet Explorer 11+, iOS 7-, Safari 7-, Windows Phone 8.1+ } textarea { overflow: auto; // Internet Explorer 11+ } [hidden] { display: none; // Internet Explorer 10- } [unselectable] { user-select: none; // Android 4.4+, Chrome 40+, Firefox 36+, iOS 8+, Safari 8+ } /* * Universal inheritance */ *, ::before, ::after { box-sizing: inherit; } * { font-size: inherit; line-height: inherit; } ::before, ::after { text-decoration: inherit; vertical-align: inherit; } /* * Opinionated defaults */ // specify solid border style of all elements *, ::before, ::after { border-style: solid; border-width: 0; } // remove margin and padding of all elements * { margin: 0; padding: 0; } // specify the root styles of the document :root { box-sizing: $root-box-sizing; cursor: $root-cursor; font: #{$root-font-size} / #{$root-line-height} $root-font-family; text-rendering: $root-text-rendering; } // specify the html background color html { background-color: $html-background-color; } // specify the text decoration of anchors a { text-decoration: $anchor-text-decoration; } // specify media element style audio, canvas, iframe, img, svg, video { vertical-align: $media-element-vertical-align; } // specify the background color of form elements button, input, select, textarea { background-color: $form-element-background-color; } // specify inheritance of form elements button, input, select, textarea { color: inherit; font-family: inherit; font-style: inherit; font-weight: inherit; } // specify the minimum height of form elements button, [type="button"], [type="date"], [type="datetime"], [type="datetime-local"], [type="email"], [type="month"], [type="number"], [type="password"], [type="reset"], [type="search"], [type="submit"], [type="tel"], [type="text"], [type="time"], [type="url"], [type="week"], select, textarea { min-height: $form-element-min-height; } // specify the font family of code elements code, kbd, pre, samp { font-family: $monospace-font-family, monospace; } // specify the list style of nav lists nav ol, nav ul { list-style: $nav-list-style; } // style select like a standard input select { -moz-appearance: none; // Firefox 36+ -webkit-appearance: none; // Chrome 41+ &::-ms-expand { display: none; // Internet Explorer 11+ } &::-ms-value { color: currentColor; // Internet Explorer 11+ } } // specify the border styles of tables table { border-collapse: $table-border-collapse; border-spacing: $table-border-spacing; } // specify textarea resizability textarea { resize: $textarea-resize; } // specify text selection background color and omit drop shadow ::selection { background-color: $selection-background-color; // required when declaring ::selection text-shadow: $selection-text-shadow; } // hide content from screens but not screenreaders @media screen { [hidden~="screen"] { display: inherit; } [hidden~="screen"]:not(:active):not(:focus):not(:target) { clip: rect(0 0 0 0) !important; position: absolute !important; } } ================================================ FILE: src/sass/layout/_layout.scss ================================================ .clearfix { zoom: 1; &:before, &:after { content: " "; display: table; } &:after { clear: both; } } ================================================ FILE: src/sass/sprites/_icon.scss ================================================ $icon-web-navigation-line-craft-1-109681: ( x: 0, y: 0, width: 512, height: 512, total_width: 1536, total_height: 1024, image: "../images/icon.png", offset_x: 0, offset_y: 0 );$icon-web-navigation-line-craft-2-109682: ( x: 512, y: 0, width: 512, height: 512, total_width: 1536, total_height: 1024, image: "../images/icon.png", offset_x: -512, offset_y: 0 );$icon-web-navigation-line-craft-3-109688: ( x: 0, y: 512, width: 512, height: 512, total_width: 1536, total_height: 1024, image: "../images/icon.png", offset_x: 0, offset_y: -512 );$icon-web-navigation-line-craft-4-109689: ( x: 512, y: 512, width: 512, height: 512, total_width: 1536, total_height: 1024, image: "../images/icon.png", offset_x: -512, offset_y: -512 );$icon-web-navigation-line-craft-5-109690: ( x: 1024, y: 0, width: 512, height: 512, total_width: 1536, total_height: 1024, image: "../images/icon.png", offset_x: -1024, offset_y: 0 ); @mixin sprite($variable,$scale:1) { $image: map_get($variable,image); $offset_x: map_get($variable,offset_x) * $scale; $offset_y: map_get($variable,offset_y) * $scale; $width: map_get($variable,width) * $scale; $height: map_get($variable,height) * $scale; $total_width: map_get($variable,total_width) * $scale; $total_height: map_get($variable,total_height) * $scale; background-image: url($image); background-position: #{$offset_x}px #{$offset_y}px; background-size: #{$total_width}px #{$total_height}px; width: #{$width}px; height: #{$height}px; } .icon { display: inline-block; background-repeat: no-repeat; &.icon-web-navigation-line-craft-1-109681{ @include sprite($icon-web-navigation-line-craft-1-109681, 1); } &.icon-web-navigation-line-craft-2-109682{ @include sprite($icon-web-navigation-line-craft-2-109682, 1); } &.icon-web-navigation-line-craft-3-109688{ @include sprite($icon-web-navigation-line-craft-3-109688, 1); } &.icon-web-navigation-line-craft-4-109689{ @include sprite($icon-web-navigation-line-craft-4-109689, 1); } &.icon-web-navigation-line-craft-5-109690{ @include sprite($icon-web-navigation-line-craft-5-109690, 1); } } ================================================ FILE: src/sass/style.scss ================================================ @charset "utf-8"; @import 'setting'; //@import 'base/sanitize'; //@import 'base/reset'; //@import 'base/normalize'; @import 'base/mixin'; @import 'base/base'; @import 'layout/layout'; @import 'sprites/icon'; ================================================ FILE: src/view/_header.ejs ================================================