├── .gitignore ├── .gitattributes ├── example ├── example.png ├── scss │ └── main.scss ├── index.html └── css │ └── main.css ├── PULL_REQUEST_TEMPLATE.md ├── ISSUE_TEMPLATE.md ├── sassdoc ├── assets │ ├── images │ │ ├── favicon.png │ │ ├── logo_light_inline.svg │ │ ├── logo_light_compact.svg │ │ ├── logo_full_compact.svg │ │ └── logo_full_inline.svg │ ├── js │ │ ├── main.js │ │ ├── vendor │ │ │ ├── fuse.min.js │ │ │ └── prism.min.js │ │ ├── search.js │ │ ├── sidebar.js │ │ └── main.min.js │ └── css │ │ └── main.css └── index.html ├── .travis.yml ├── config.json ├── .editorconfig ├── test └── travis.rb ├── sache.json ├── sassy-gridlover ├── _extras.scss ├── _debug-mode.scss ├── _config.scss ├── _functions.scss └── _sassy-gridlover.scss ├── bower.json ├── package.json ├── LICENSE ├── CONTRIBUTING.md ├── CODE_OF_CONDUCT.md ├── CHANGELOG.md └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.DS_Store 2 | *.log 3 | *.map 4 | *.sass-cache 5 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto -------------------------------------------------------------------------------- /example/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiulit/Sassy-Gridlover/HEAD/example/example.png -------------------------------------------------------------------------------- /PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Fixes # 2 | 3 | Changes proposed in this pull request: 4 | 5 | - 6 | - 7 | - 8 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Expected behavior 2 | 3 | ### Actual behavior 4 | 5 | ### Steps to reproduce the behaviour 6 | -------------------------------------------------------------------------------- /sassdoc/assets/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiulit/Sassy-Gridlover/HEAD/sassdoc/assets/images/favicon.png -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | rvm: 2 | - 2.4.1 3 | language: sass 4 | before_install: 5 | - gem install sass 6 | - chmod +x test/travis.rb 7 | 8 | script: 9 | - test/travis.rb 10 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "basePath": "https://github.com/hiulit/Sassy-Gridlover/tree/master/sassy-gridlover", 3 | "package": "package.json", 4 | "theme": "default", 5 | "groups": { 6 | "undefined": "General" 7 | } 8 | } -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | indent_size = 4 8 | indent_style = space 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /test/travis.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | result = `sass example/scss/main.scss example/css/main.css` 3 | raise result unless $?.to_i == 0 4 | raise "When compiled the module should output some CSS" unless File.exists?('example/css/main.css') 5 | puts "Regular compile worked successfully" 6 | -------------------------------------------------------------------------------- /sache.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Sassy-Gridlover", 3 | "description": "Super easy to use Sass mixins to establish a typographic system with modular scale and vertical rhythm. Based on the Gridlover app https://www.gridlover.net/try", 4 | "tags": ["typography", "baseline", "modular", "scale", "vertical-rhythm", "mixins", "gridlover"], 5 | "website": "https://github.com/hiulit/Sassy-Gridlover", 6 | "docs": "https://hiulit.github.io/Sassy-Gridlover/sassdoc/" 7 | } 8 | -------------------------------------------------------------------------------- /sassy-gridlover/_extras.scss: -------------------------------------------------------------------------------- 1 | @mixin sgl-extras { 2 | hr, 3 | .hr { 4 | border: 1px solid; 5 | margin: -1px 0; 6 | } 7 | 8 | a, 9 | b, 10 | i, 11 | strong, 12 | em, 13 | small, 14 | code { 15 | line-height: 0; 16 | } 17 | 18 | sub, 19 | sup { 20 | line-height: 0; 21 | position: relative; 22 | vertical-align: baseline; 23 | } 24 | 25 | sup { 26 | top: -0.5em; 27 | } 28 | 29 | sub { 30 | bottom: -0.25em; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /example/scss/main.scss: -------------------------------------------------------------------------------- 1 | $sgl-debug-mode: true; 2 | $sgl-debug-mode-max-width: 1024; // Only needed if `$sgl-debug-mode` is `true`. 3 | $sgl-extras: true; 4 | 5 | @import "../../sassy-gridlover/sassy-gridlover"; 6 | 7 | html { 8 | @include sgl-html; 9 | } 10 | 11 | body { 12 | @include sgl-body; 13 | } 14 | 15 | h1 { 16 | @include sgl-heading(3, 0, 1, 2); 17 | } 18 | 19 | h2 { 20 | @include sgl-heading(2, 0, 1, 1); 21 | } 22 | 23 | h3 { 24 | @include sgl-heading(1, 0, 1, 0); 25 | } 26 | 27 | h4 { 28 | @include sgl-heading(0, 0, 1, 0); 29 | } 30 | 31 | h5 { 32 | @include sgl-heading(0, 0, 1, 0); 33 | } 34 | 35 | p, 36 | ul, 37 | ol, 38 | pre, 39 | table, 40 | blockquote { 41 | @include sgl-margins(0, 1); 42 | } 43 | 44 | ul ul, 45 | ol ol, 46 | ul ol, 47 | ol ul { 48 | @include sgl-margins(0, 0); 49 | } 50 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sassy-gridlover", 3 | "description": "Super easy to use Sass mixins to establish a typographic system with modular scale and vertical rhythm. Based on the Gridlover app.", 4 | "version": "6.0.5", 5 | "main": [ 6 | "sassy-gridlover/_sassy-gridlover.scss" 7 | ], 8 | "license": "MIT", 9 | "ignore": [ 10 | "**/.*", 11 | "node_modules", 12 | "components" 13 | ], 14 | "keywords": [ 15 | "typography", 16 | "baseline", 17 | "modular", 18 | "scale", 19 | "vertical-rhythm", 20 | "sass", 21 | "scss", 22 | "mixins", 23 | "gridlover" 24 | ], 25 | "authors": [ 26 | { 27 | "name": "hiulit", 28 | "email": "hiulit@gmail.com", 29 | "homepage": "https://github.com/hiulit" 30 | } 31 | ], 32 | "homepage": "https://github.com/hiulit/Sassy-Gridlover", 33 | "repository": { 34 | "type": "git", 35 | "url": "https://github.com/hiulit/Sassy-Gridlover.git" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Sassy-Gridlover", 3 | "name": "sassy-gridlover", 4 | "version": "6.0.5", 5 | "description": "Super easy to use Sass mixins to establish a typographic system with modular scale and vertical rhythm. Based on the Gridlover app.", 6 | "main": "sassy-gridlover/_sassy-gridlover.scss", 7 | "keywords": [ 8 | "typography", 9 | "baseline", 10 | "modular", 11 | "scale", 12 | "vertical-rhythm", 13 | "sass", 14 | "scss", 15 | "mixins", 16 | "gridlover" 17 | ], 18 | "homepage": "https://github.com/hiulit/Sassy-Gridlover", 19 | "bugs": { 20 | "url": "https://github.com/hiulit/Sassy-Gridlover/issues", 21 | "email": "hiulit@gmail.com" 22 | }, 23 | "license": "MIT", 24 | "author": { 25 | "name": "hiulit", 26 | "email": "hiulit@gmail.com", 27 | "url": "https://github.com/hiulit" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2014-2017 Xavier Gómez Gosálbez 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 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | First of all, I really appreciate that you're willing to ~~waste~~ spend some time contributing to **Sassy-Gridlover**! 🎉👍 4 | 5 | You can help make **Sassy-Gridlover** better by [reporting issues](#issues) or [contributing code](#pull-requests). 6 | 7 | ## Issues 8 | 9 | [Issues](https://github.com/hiulit/Sassy-Gridlover/issues) can be used not only for bug reporting, but also for suggesting improvements, whether they are code related (cleaner code, modularity, etc.) or feature requests. 10 | 11 | ### Guidelines 12 | 13 | * Search [previous issues](https://github.com/hiulit/Sassy-Gridlover/issues?utf8=%E2%9C%93&q=is%3Aissue) before creating a new one, as yours may be a duplicate. 14 | * Use a clear and descriptive title for the issue to identify the problem. 15 | * Describe the exact steps which reproduce the problem in as many details as possible. 16 | 17 | ## Pull requests 18 | 19 | [Pull requests](https://help.github.com/articles/creating-a-pull-request/) are most welcomed! 😃 20 | 21 | * Fork **Sassy-Gridlover**: `git clone git@github.com:your-username/Sassy-Gridlover.git`. 22 | * Create a **new branch** and make the desired changes there. 23 | * [Create a pull request](https://github.com/hiulit/Sassy-Gridlover/pulls). 24 | -------------------------------------------------------------------------------- /sassdoc/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)); -------------------------------------------------------------------------------- /example/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |Bushwick Schlitz. Est Shoreditch small batch, dolor Schlitz sapiente twee stumptown ex. Duis Carles pickled, cornhole Thundercats McSweeney's minim PBR vegan Tumblr irony. Kogi eu Thundercats, sed scenester before they sold out et aesthetic. Elit cred Vice ethical pickled sartorial. Stumptown roof party freegan High Life vero, ea sed minim meggings.
12 |Cosby sweater plaid shabby chic kitsch pour-over ex. Try-hard fanny pack mumblecore cornhole cray scenester. Assumenda narwhal occupy, Blue Bottle nihil culpa fingerstache. Meggings kogi vinyl meh, food truck banh mi Etsy magna 90's duis typewriter banjo organic leggings Vice.
14 |Laboris selfies occaecat umami, forage Tumblr American Apparel. Retro Terry Richardson culpa id swag polaroid Intelligentsia American Apparel eu, esse non post-ironic fugiat master cleanse. Direct trade gluten-free blog, fanny pack cray labore skateboard before they sold out adipisicing non magna id Helvetica freegan. Disrupt aliqua Brooklyn church-key lo-fi dreamcatcher.
21 | 22 | 23 | -------------------------------------------------------------------------------- /sassy-gridlover/_debug-mode.scss: -------------------------------------------------------------------------------- 1 | @mixin sgl-show-grid($line-height) { 2 | background-image: linear-gradient(hsla(200, 100%, 50%, 0.3) 1px, transparent 1px); 3 | background-position: left top; 4 | background-size: ($line-height * 1px) ($line-height * 1px); 5 | 6 | body { 7 | box-shadow: 1px 0px 0px hsla(200, 100%, 50%, 0.3), -1px 0px 0px hsla(200, 100%, 50%, 0.3); 8 | } 9 | } 10 | 11 | @mixin sgl-show-margins($margin-top, $margin-bottom, $computed-font-size, $unit) { 12 | position: relative; 13 | 14 | &:before, 15 | &:after { 16 | content: ""; 17 | display: block; 18 | left: 0; 19 | position: absolute; 20 | width: 100%; 21 | } 22 | 23 | &:before { 24 | background: hsla(200, 100%, 50%, 0.3) url('data:image/svg+xml;utf8,') 51% top repeat-y; 25 | 26 | @if $unit == "px" or $unit == "pxrem" { 27 | height: $margin-top * 1px; 28 | top: -$margin-top * 1px; 29 | } 30 | 31 | @if $unit == "rem" or $unit == "pxrem" { 32 | height: sgl-decimal-ceil(sgl-rem-calc($margin-top, $sgl-root-font-size), 5); 33 | top: -(sgl-decimal-ceil(sgl-rem-calc($margin-top, $sgl-root-font-size), 5)); 34 | } 35 | 36 | @if $unit == "em" { 37 | height: sgl-decimal-ceil(sgl-em-calc($margin-top, $computed-font-size), 5); 38 | top: -(sgl-decimal-ceil(sgl-em-calc($margin-top, $computed-font-size), 5)); 39 | } 40 | } 41 | 42 | &:after { 43 | background: hsla(200, 100%, 50%, 0.3) url('data:image/svg+xml;utf8,') 49% bottom repeat-y; 44 | 45 | @if $unit == "px" or $unit == "pxrem" { 46 | bottom: -$margin-bottom * 1px; 47 | height: $margin-bottom * 1px; 48 | } 49 | 50 | @if $unit == "rem" or $unit == "pxrem" { 51 | bottom: -(sgl-decimal-ceil(sgl-rem-calc($margin-bottom, $sgl-root-font-size), 5)); 52 | height: sgl-decimal-ceil(sgl-rem-calc($margin-bottom, $sgl-root-font-size), 5); 53 | } 54 | 55 | @if $unit == "em" { 56 | bottom: -(sgl-decimal-ceil(sgl-em-calc($margin-bottom, $computed-font-size), 5)); 57 | height: sgl-decimal-ceil(sgl-em-calc($margin-bottom, $computed-font-size), 5); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hiulit@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /sassy-gridlover/_config.scss: -------------------------------------------------------------------------------- 1 | // Scale factor constants. 2 | // Don't change them ever! 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 | $GOLDEN_SECTION: 1.618; 12 | $MAJOR_SIXTH: 1.667; 13 | $MINOR_SEVENTH: 1.778; 14 | $MAJOR_SEVENTH: 1.875; 15 | $OCTAVE: 2; 16 | $MAJOR_TENTH: 2.5; 17 | $MAJOR_ELEVENTH: 2.667; 18 | $MAJOR_TWELFTH: 3; 19 | $DOUBLE_OCTAVE: 4; 20 | 21 | // Default font size. 22 | // Don't change it ever! 23 | $SGL_DEFAULT_FONT_SIZE: 16; 24 | 25 | // Configurable variables. 26 | // Ok... You can change these variables! :D 27 | // I would encourage you **not to change them directly here**, though. 28 | // It would be better to declare them in your `_variables.scss`, `_config.scss` or the like. 29 | 30 | /// Base font size. 31 | /// 32 | /// @type number 33 | $sgl-base-font-size: 18 !default; 34 | 35 | /// Base line height. 36 | /// 37 | /// @type number 38 | $sgl-base-line-height: 1.3 !default; 39 | 40 | /// Base unit (`px`, `em`, `rem`, `pxrem`). 41 | /// 42 | /// @type string 43 | $sgl-base-unit: "em" !default; 44 | 45 | /// Scale factor. 46 | /// 47 | /// @type number 48 | $sgl-scale-factor: $GOLDEN_SECTION !default; 49 | 50 | /// Enables/disables **debug mode**. 51 | /// 52 | /// Outputs background lines imitating a notebook's sheet. 53 | /// 54 | /// Declare it in your own `_variables.scss`, `_config.scss` or the like. Basically, **it must be declared before the** `@import "sassy-gridlover"`. 55 | /// 56 | /// @example scss 57 | /// $sgl-debug-mode: true; 58 | /// 59 | /// @example css 60 | /// html { 61 | /// background-image: linear-gradient(rgba(0, 170, 255, 0.3) 1px, transparent 1px); 62 | /// background-position: left top; 63 | /// background-size: 19px 19px; 64 | /// } 65 | /// 66 | /// html body { 67 | /// box-shadow: 1px 0px 0px rgba(0, 170, 255, 0.3), -1px 0px 0px rgba(0, 170, 255, 0.3); 68 | /// } 69 | /// 70 | /// @type boolean 71 | $sgl-debug-mode: false !default; 72 | 73 | /// Sets a maximum width to center the text when **debug mode** is `true`. 74 | /// 75 | /// Declare it in your own `_variables.scss`, `_config.scss` or the like. Basically, **it must be declared before the** `@import "sassy-gridlover"`. 76 | /// 77 | /// @example scss 78 | /// $sgl-debug-mode-max-width: 1024 79 | /// 80 | /// @example css 81 | /// body { 82 | /// margin: 0 auto; 83 | /// max-width: 1024px; 84 | /// } 85 | /// 86 | /// @type number 87 | $sgl-debug-mode-max-width: 560 !default; 88 | 89 | /// Styles to make sure everything is aligned. 90 | /// 91 | /// Outputs extra **reset styles**. 92 | /// 93 | /// Declare it in your own `_variables.scss`, `_config.scss` or the like. Basically, **it must be declared before the** `@import "sassy-gridlover"`. 94 | /// 95 | /// @example scss 96 | /// $sgl-extras: true; 97 | /// 98 | /// @example css 99 | /// html hr, 100 | /// html .hr { 101 | /// border: 1px solid; 102 | /// margin: -1px 0; 103 | /// } 104 | /// 105 | /// html a, 106 | /// html b, 107 | /// html i, 108 | /// html strong, 109 | /// html em, 110 | /// html small, 111 | /// html code { 112 | /// line-height: 0; 113 | /// } 114 | /// 115 | /// html sub, 116 | /// html sup { 117 | /// line-height: 0; 118 | /// position: relative; 119 | /// vertical-align: baseline; 120 | /// } 121 | /// 122 | /// html sup { 123 | /// top: -0.5em; 124 | /// } 125 | /// 126 | /// html sub { 127 | /// bottom: -0.25em; 128 | /// } 129 | /// 130 | /// @type boolean 131 | $sgl-extras: false !default; 132 | -------------------------------------------------------------------------------- /sassdoc/assets/js/vendor/fuse.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Fuse - Lightweight fuzzy-search 4 | * 5 | * Copyright (c) 2012 Kirollos Risk' + item.type.slice(0, 3) + ' ' + item.name + ''
54 | });
55 |
56 | searchSuggestions.append($li);
57 | return $li;
58 | });
59 |
60 | return suggestions;
61 | };
62 |
63 | // Perform a search on a given term
64 | Search.prototype.search = function (term) {
65 | return this.fillSuggestions(this.index.search(term));
66 | };
67 |
68 | // Search logic
69 | Search.prototype.initializeSearch = function () {
70 | var searchForm = $(this.conf.search.form);
71 | var searchInput = $(this.conf.search.input);
72 | var searchSuggestions = $(this.conf.search.suggestionsWrapper);
73 |
74 | var currentSelection = -1;
75 | var suggestions = [];
76 | var selected;
77 |
78 | var self = this;
79 |
80 | // Clicking on a suggestion
81 | searchSuggestions.on('click', function (e) {
82 | var target = $(event.target);
83 |
84 | if (target.nodeName === 'A') {
85 | searchInput.val(target.parent().data('name'));
86 | suggestions = self.fillSuggestions([]);
87 | }
88 | });
89 |
90 | // Filling the form
91 | searchForm.on('keyup', function (e) {
92 | e.preventDefault();
93 |
94 | // Enter
95 | if (e.keyCode === 13) {
96 | if (selected) {
97 | suggestions = self.fillSuggestions([]);
98 | searchInput.val(selected.data('name'));
99 | window.location = selected.children().first().attr('href');
100 | }
101 |
102 | e.stopPropagation();
103 | }
104 |
105 | // KeyDown
106 | if (e.keyCode === 40) {
107 | currentSelection = (currentSelection + 1) % suggestions.length;
108 | }
109 |
110 | // KeyUp
111 | if (e.keyCode === 38) {
112 | currentSelection = currentSelection - 1;
113 |
114 | if (currentSelection < 0) {
115 | currentSelection = suggestions.length - 1;
116 | }
117 | }
118 |
119 | if (suggestions[currentSelection]) {
120 | if (selected) {
121 | selected.removeClass('selected');
122 | }
123 |
124 | selected = suggestions[currentSelection];
125 | selected.addClass('selected');
126 | }
127 |
128 | });
129 |
130 | searchInput.on('keyup', function (e) {
131 | if (e.keyCode !== 40 && e.keyCode !== 38) {
132 | currentSelection = -1;
133 | suggestions = self.search($(this).val());
134 | }
135 |
136 | else {
137 | e.preventDefault();
138 | }
139 | }).on('search', function () {
140 | suggestions = self.search($(this).val());
141 | });
142 | };
143 |
144 | global.Search = Search;
145 |
146 | }(window.jQuery, window));
147 |
--------------------------------------------------------------------------------
/sassdoc/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 | this.loadToggle();
37 | };
38 |
39 |
40 | /**
41 | * Load sidebar toggle
42 | */
43 | Sidebar.prototype.loadToggle = function () {
44 | $('', {
45 | 'class': 'layout-toggle',
46 | 'html': '×',
47 | 'data-alt': '→'
48 | }).appendTo( $('.header') );
49 |
50 | $('.layout-toggle').on('click', function () {
51 | var $this = $(this);
52 | var alt;
53 |
54 | $('body').toggleClass('sidebar-closed');
55 |
56 | alt = $this.html();
57 | $this.html($this.data('alt'));
58 | $this.data('alt', alt);
59 | });
60 | };
61 |
62 | /**
63 | * Load data from storage or create fresh index
64 | */
65 | Sidebar.prototype.load = function () {
66 | var index = 'localStorage' in global ?
67 | global.localStorage.getItem(this.conf.storageKey) :
68 | null;
69 |
70 | this.index = index ? JSON.parse(index) : this.buildIndex();
71 | };
72 |
73 | /**
74 | * Build a fresh index
75 | */
76 | Sidebar.prototype.buildIndex = function () {
77 | var index = {};
78 | var $item;
79 |
80 | this.conf.nodes.each($.proxy(function (index, item) {
81 | $item = $(item);
82 |
83 | index[$item.attr(this.conf.indexAttribute)] = !$item.hasClass(this.conf.collapsedClass);
84 | }, this));
85 |
86 | return index;
87 | };
88 |
89 | /**
90 | * Update DOM based on index
91 | */
92 | Sidebar.prototype.updateDOM = function () {
93 | var item;
94 |
95 | for (item in this.index) {
96 | if (this.index[item] === false) {
97 | $('[' + this.conf.indexAttribute + '="' + item + '"]').addClass(this.conf.collapsedClass);
98 | }
99 | }
100 | };
101 |
102 | /**
103 | * Save index in storage
104 | */
105 | Sidebar.prototype.save = function () {
106 | if (!('localStorage' in global)) {
107 | return;
108 | }
109 |
110 | global.localStorage.setItem(this.conf.storageKey, JSON.stringify(this.index));
111 | };
112 |
113 | /**
114 | * Bind UI events
115 | */
116 | Sidebar.prototype.bind = function () {
117 | var $item, slug, fn, text;
118 | var collapsed = false;
119 |
120 | // Save index in localStorage
121 | global.onbeforeunload = $.proxy(function () {
122 | this.save();
123 | }, this);
124 |
125 | // Toggle all
126 | $(this.conf.toggleBtn).on('click', $.proxy(function (event) {
127 | $node = $(event.target);
128 |
129 | text = $node.attr('data-alt');
130 | $node.attr('data-alt', $node.text());
131 | $node.text(text);
132 |
133 | fn = collapsed === true ? 'removeClass' : 'addClass';
134 |
135 | this.conf.nodes.each($.proxy(function (index, item) {
136 | $item = $(item);
137 | slug = $item.attr(this.conf.indexAttribute);
138 |
139 | this.index[slug] = collapsed;
140 |
141 | $('[' + this.conf.indexAttribute + '="' + slug + '"]')[fn](this.conf.collapsedClass);
142 | }, this));
143 |
144 | collapsed = !collapsed;
145 | this.save();
146 | }, this));
147 |
148 | // Toggle item
149 | this.conf.nodes.on('click', $.proxy(function (event) {
150 | $item = $(event.target);
151 | slug = $item.attr(this.conf.indexAttribute);
152 |
153 | // Update index
154 | this.index[slug] = !this.index[slug];
155 |
156 | // Update DOM
157 | $item.toggleClass(this.conf.collapsedClass);
158 | }, this));
159 | };
160 |
161 | global.Sidebar = Sidebar;
162 |
163 | }(window.jQuery, window));
164 |
--------------------------------------------------------------------------------
/sassy-gridlover/_functions.scss:
--------------------------------------------------------------------------------
1 | // ROUND A NUMBER TO SPECIFIED DIGITS
2 | // @see gist.github.com/terkel/4373420
3 |
4 | @function sgl-decimal-round($number, $digits: 0, $mode: round) {
5 | $n: 1;
6 |
7 | // $number must be a number
8 | @if type-of($number) != number {
9 | @warn "#{$number} is not a number.";
10 |
11 | @return $number;
12 | }
13 |
14 | // $digits must be a unitless number
15 | @if type-of($digits) != number {
16 | @warn "#{$digits} is not a number.";
17 |
18 | @return $number;
19 | }
20 | @else if not unitless($digits) {
21 | @warn "#{$digits} has a unit.";
22 |
23 | @return $number;
24 | }
25 |
26 | @for $i from 1 through $digits {
27 | $n: $n * 10;
28 | }
29 |
30 | @if $mode == round {
31 | @return round($number * $n) / $n;
32 | }
33 | @else if $mode == ceil {
34 | @return ceil($number * $n) / $n;
35 | }
36 | @else if $mode == floor {
37 | @return floor($number * $n) / $n;
38 | }
39 | @else {
40 | @warn "#{$mode} is undefined keyword.";
41 |
42 | @return $number;
43 | }
44 | }
45 |
46 | @function sgl-decimal-ceil($number, $digits: 0) {
47 | @return sgl-decimal-round($number, $digits, ceil);
48 | }
49 |
50 | @function sgl-decimal-floor($number, $digits: 0) {
51 | @return sgl-decimal-round($number, $digits, floor);
52 | }
53 |
54 | // EXPONENT
55 | // @see https://github.com/at-import/Sassy-math/blob/master/sass/math.scss
56 |
57 | @function sgl-exponent($base, $exponent) {
58 | // reset value
59 | $value: $base;
60 |
61 | // positive intergers get multiplied
62 | @if $exponent > 1 {
63 | @for $i from 2 through $exponent {
64 | $value: $value * $base;
65 | }
66 | }
67 |
68 | // negitive intergers get divided. A number divided by itself is 1
69 | @if $exponent < 1 {
70 | @for $i from 0 through -$exponent {
71 | $value: $value / $base;
72 | }
73 | }
74 |
75 | // return the last value written
76 | @return $value;
77 | }
78 |
79 | // CASTING A STRING TO A NUMBER
80 | // @see http://hugogiraudel.com/2014/01/15/sass-string-to-number/
81 |
82 | @function sgl-length($number, $unit) {
83 | $strings: "px" "cm" "mm" "%" "ch" "pica" "in" "em" "rem" "pt" "pc" "ex" "vw" "vh" "vmin" "vmax";
84 | $units: 1px 1cm 1mm 1% 1ch 1pica 1in 1em 1rem 1pt 1pc 1ex 1vw 1vh 1vmin 1vmax;
85 | $index: index($strings, $unit);
86 |
87 | @if not $index {
88 | @warn "Invalid unit `#{$unit}`.";
89 |
90 | @return false;
91 | }
92 |
93 | @return $number * nth($units, $index);
94 | }
95 |
96 | @function sgl-number($string) {
97 | // Matrices
98 | $strings: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9";
99 | $numbers: 0 1 2 3 4 5 6 7 8 9;
100 |
101 | // Result
102 | $result: 0;
103 | $divider: 0;
104 | $minus: false;
105 |
106 | // Looping through all characters
107 | @for $i from 1 through str-length($string) {
108 | $character: str-slice($string, $i, $i);
109 | $index: index($strings, $character);
110 |
111 | @if $character == "-" {
112 | $minus: true;
113 | }
114 | @else if $character == "." {
115 | $divider: 1;
116 | }
117 | @else {
118 | @if not $index {
119 | $result: if($minus, $result * -1, $result);
120 |
121 | @return sgl-length($result, str-slice($string, $i));
122 | }
123 |
124 | $number: nth($numbers, $index);
125 |
126 | @if $divider == 0 {
127 | $result: $result * 10;
128 | }
129 | @else {
130 | // Move the decimal dot to the left
131 | $divider: $divider * 10;
132 | $number: $number / $divider;
133 | }
134 |
135 | $result: $result + $number;
136 | }
137 | }
138 |
139 | @return if($minus, $result * -1, $result);
140 | }
141 |
142 | // UNIT MANAGER
143 | // @see https://github.com/zurb/foundation/blob/master/scss/foundation/_functions.scss
144 |
145 | @function sgl-strip-unit($num) {
146 | @return $num / ($num * 0 + 1);
147 | }
148 |
149 | @function sgl-convert($unit, $value, $base-value: $SGL_DEFAULT_FONT_SIZE) {
150 | $value: sgl-strip-unit($value) / sgl-strip-unit($base-value) * sgl-number(1 + $unit);
151 |
152 | @if $value == 0 + $unit {
153 | $value: 0;
154 | }
155 |
156 | @return $value;
157 | }
158 |
159 | // REM AND EM CALCULATOR
160 |
161 | @function sgl-em-calc($value, $base-value: $SGL_DEFAULT_FONT_SIZE) {
162 | @return sgl-convert("em", $value, $base-value);
163 | }
164 |
165 | @function sgl-rem-calc($value, $base-value: $SGL_DEFAULT_FONT_SIZE) {
166 | @return sgl-convert("rem", $value, $base-value);
167 | }
168 |
--------------------------------------------------------------------------------
/sassdoc/assets/images/logo_light_inline.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sassdoc/assets/images/logo_light_compact.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sassdoc/assets/images/logo_full_compact.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sassdoc/assets/images/logo_full_inline.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sassdoc/assets/js/vendor/prism.min.js:
--------------------------------------------------------------------------------
1 | /* http://prismjs.com/download.html?themes=prism&languages=markup+css+css-extras+clike+javascript+scss */
2 | var self=typeof window!="undefined"?window:{},Prism=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{encode:function(e){return e instanceof n?new n(e.type,t.util.encode(e.content)):t.util.type(e)==="Array"?e.map(t.util.encode):e.replace(/&/g,"&").replace(/e.length)break e;if(p instanceof i)continue;a.lastIndex=0;var d=a.exec(p);if(d){l&&(c=d[1].length);var v=d.index-1+c,d=d[0].slice(c),m=d.length,g=v+m,y=p.slice(0,v+1),b=p.slice(g+1),w=[h,1];y&&w.push(y);var E=new i(u,f?t.tokenize(d,f):d);w.push(E);b&&w.push(b);Array.prototype.splice.apply(s,w)}}}return s},hooks:{all:{},add:function(e,n){var r=t.hooks.all;r[e]=r[e]||[];r[e].push(n)},run:function(e,n){var r=t.hooks.all[e];if(!r||!r.length)return;for(var i=0,s;s=r[i++];)s(n)}}},n=t.Token=function(e,t){this.type=e;this.content=t};n.stringify=function(e,r,i){if(typeof e=="string")return e;if(Object.prototype.toString.call(e)=="[object Array]")return e.map(function(t){return n.stringify(t,r,e)}).join("");var s={type:e.type,content:n.stringify(e.content,r,i),tag:"span",classes:["token",e.type],attributes:{},language:r,parent:i};s.type=="comment"&&(s.attributes.spellcheck="true");t.hooks.run("wrap",s);var o="";for(var u in s.attributes)o+=u+'="'+(s.attributes[u]||"")+'"';return"<"+s.tag+' class="'+s.classes.join(" ")+'" '+o+">"+s.content+""+s.tag+">"};if(!self.document){if(!self.addEventListener)return self.Prism;self.addEventListener("message",function(e){var n=JSON.parse(e.data),r=n.language,i=n.code;self.postMessage(JSON.stringify(t.tokenize(i,t.languages[r])));self.close()},!1);return self.Prism}var r=document.getElementsByTagName("script");r=r[r.length-1];if(r){t.filename=r.src;document.addEventListener&&!r.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)}return self.Prism}();typeof module!="undefined"&&module.exports&&(module.exports=Prism);;
3 | Prism.languages.markup={comment://g,prolog:/<\?.+?\?>/,doctype://,cdata://i,tag:{pattern:/<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+))?\s*)*\/?>/gi,inside:{tag:{pattern:/^<\/?[\w:-]+/i,inside:{punctuation:/^<\/?/,namespace:/^[\w-]+?:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/gi,inside:{punctuation:/=|>|"/g}},punctuation:/\/?>/g,"attr-name":{pattern:/[\w:-]+/g,inside:{namespace:/^[\w-]+?:/}}}},entity:/\?[\da-z]{1,8};/gi};Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))});;
4 | Prism.languages.css={comment:/\/\*[\w\W]*?\*\//g,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*{))/gi,inside:{punctuation:/[;:]/g}},url:/url\((["']?).*?\1\)/gi,selector:/[^\{\}\s][^\{\};]*(?=\s*\{)/g,property:/(\b|\B)[\w-]+(?=\s*:)/ig,string:/("|')(\\?.)*?\1/g,important:/\B!important\b/gi,punctuation:/[\{\};:]/g,"function":/[-a-z0-9]+(?=\()/ig};Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{style:{pattern:/