stlr 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3f2e5dd1c71819bb30aa6fad65d5da2bc3041e8b
4
+ data.tar.gz: 53907604b3ac285d526f1f97f40e04434ae91478
5
+ SHA512:
6
+ metadata.gz: 46f52ec7447e1a4f3d1d69bf3d345c1020bbf0345ef4ae1d77a4f0a37457355843bc002ce4cfacd0c0686eab371ffeec17c04a97b466b7b3845e7ac769012ae2
7
+ data.tar.gz: 2f3044432ec7eaa37a360a130ee6a589335ea1ee434073c36b6681581af634aef8c45fa73d6e0685a49991fff2b0569b0139bad5f6d661c682479f324c9dda05
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ *.gem
2
+ *.gemfile.lock
3
+ .DS_Store
4
+ .rbenv-version
5
+ .rvmrc
6
+ .sass-cache
7
+ /.bundle
8
+ /vendor/bundle
9
+ /vendor/cache
10
+ Gemfile.lock
11
+ node_modules
12
+ tmp/
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development do
6
+ gem 'byebug', platforms: [:mri_21, :mri_22], require: false
7
+ end
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013-2016 Twitter, Inc
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
13
+ all 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
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1 @@
1
+ ## Stlr
@@ -0,0 +1,11 @@
1
+ $grid-gutter-width: 30px !default;
2
+
3
+ // Calculate gutter for width in units or for gutter factor
4
+ @function gg($width: 1, $qwazi: true, $width-base: $grid-gutter-width) {
5
+ @if (unitless($width)) {
6
+ @return $width * $width-base;
7
+ } @else {
8
+ $gutter-width: if($qwazi, $width-base/2, $width-base);
9
+ @return ceil($width / $gutter-width) * $gutter-width;
10
+ }
11
+ }
@@ -0,0 +1,7 @@
1
+ @import "stlr/functions/rh";
2
+
3
+ $base-line-height-computed: 24px !default;
4
+
5
+ @function rh-margin($height, $qwazi: true, $line-height-base: $base-line-height-computed) {
6
+ @return rh($height, $qwazi, $line-height-base) - $height;
7
+ }
@@ -0,0 +1,10 @@
1
+ $base-line-height-computed: 24px !default;
2
+
3
+ @function rh($height: 1, $qwazi: true, $line-height-base: $base-line-height-computed) {
4
+ @if (unitless($height)) {
5
+ @return $height * $line-height-base;
6
+ } @else {
7
+ $line-height: if($qwazi, $line-height-base/2, $line-height-base);
8
+ @return ceil($height / $line-height) * $line-height;
9
+ }
10
+ }
@@ -0,0 +1,6 @@
1
+ @mixin bg($filename, $format: '.png',
2
+ $options: 50% 50% no-repeat,
3
+ $size: null) {
4
+ background: image_url($filename + $format) $options;
5
+ background-size: $size;
6
+ }
@@ -0,0 +1,18 @@
1
+ // Single side border-radius
2
+
3
+ @mixin border-top-radius($radius) {
4
+ border-top-left-radius: $radius;
5
+ border-top-right-radius: $radius;
6
+ }
7
+ @mixin border-right-radius($radius) {
8
+ border-bottom-right-radius: $radius;
9
+ border-top-right-radius: $radius;
10
+ }
11
+ @mixin border-bottom-radius($radius) {
12
+ border-bottom-left-radius: $radius;
13
+ border-bottom-right-radius: $radius;
14
+ }
15
+ @mixin border-left-radius($radius) {
16
+ border-bottom-left-radius: $radius;
17
+ border-top-left-radius: $radius;
18
+ }
@@ -0,0 +1,22 @@
1
+ // Clearfix
2
+ //
3
+ // For modern browsers
4
+ // 1. The space content is one way to avoid an Opera bug when the
5
+ // contenteditable attribute is included anywhere else in the document.
6
+ // Otherwise it causes space to appear at the top and bottom of elements
7
+ // that are clearfixed.
8
+ // 2. The use of `table` rather than `block` is only necessary if using
9
+ // `:before` to contain the top-margins of child elements.
10
+ //
11
+ // Source: http://nicolasgallagher.com/micro-clearfix-hack/
12
+
13
+ @mixin clearfix() {
14
+ &:before,
15
+ &:after {
16
+ content: " "; // 1
17
+ display: table; // 2
18
+ }
19
+ &:after {
20
+ clear: both;
21
+ }
22
+ }
@@ -0,0 +1,6 @@
1
+ @mixin gradient-striped($color: rgba(255,255,255,.15), $angle: 45deg) {
2
+ background-image: linear-gradient($angle, $color 25%,
3
+ transparent 25%, transparent 50%,
4
+ $color 50%, $color 75%,
5
+ transparent 75%, transparent);
6
+ }
@@ -0,0 +1,7 @@
1
+ @mixin image($image, $image-width, $image-height) {
2
+ background-image: image_url($image);
3
+ background-repeat: no-repeat;
4
+ background-size: 100%;
5
+ height: $image-height;
6
+ width: $image-width;
7
+ }
@@ -0,0 +1,6 @@
1
+ @mixin placeholder($color) {
2
+ &::placeholder {
3
+ color: $color;
4
+ opacity: 1;
5
+ }
6
+ }
@@ -0,0 +1,5 @@
1
+ @mixin responsive-image($display: block) {
2
+ display: $display;
3
+ height: auto;
4
+ max-width: 100%;
5
+ }
@@ -0,0 +1,12 @@
1
+ @mixin retina-bg($filename, $format: '.png',
2
+ $options: 50% 50% no-repeat,
3
+ $retina-options: $options,
4
+ $size: null) {
5
+ background: image_url($filename + $format) $options;
6
+ background-size: $size;
7
+
8
+ @media only screen and (min-resolution: 1.3dppx) {
9
+ background: image_url($filename + '@2x' + $format) $retina-options;
10
+ background-size: $size;
11
+ }
12
+ }
@@ -0,0 +1,17 @@
1
+ @mixin retina-image($filename,
2
+ $width,
3
+ $height,
4
+ $format: '.png',
5
+ $options: 50% 50% no-repeat,
6
+ $retina-options: $options,
7
+ $size: 100%) {
8
+ background: image_url($filename + $format) $options;
9
+ background-size: $size;
10
+ height: $height;
11
+ width: $width;
12
+
13
+ @media only screen and (min-resolution: 1.3dppx) {
14
+ background: image_url($filename + '@2x' + $format) $retina-options;
15
+ background-size: $size;
16
+ }
17
+ }
@@ -0,0 +1,15 @@
1
+ @mixin scrollbar($background-color: #323232) {
2
+ &::-webkit-scrollbar {
3
+ height: 10px;
4
+ width: 10px;
5
+ }
6
+ &::-webkit-scrollbar-thumb {
7
+ background-clip: padding-box;
8
+ background-color: rgba($background-color, 0.25);
9
+ border-radius: 10px;
10
+ border: 2px solid transparent;
11
+ &:hover {
12
+ background-color: rgba($background-color, 0.5);
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,14 @@
1
+ @mixin svg-bg($filename, $format: '.png',
2
+ $options: 50% 50% no-repeat,
3
+ $svg-options: $options,
4
+ $size: null) {
5
+ background: image_url($filename + $format) $options;
6
+ background-size: $size;
7
+
8
+ @media only screen and (min-resolution: 1.3dppx) {
9
+ .svg & {
10
+ background: image_url($filename + '.svg') $svg-options;
11
+ background-size: $size;
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,19 @@
1
+ @mixin svg-image($filename,
2
+ $width,
3
+ $height,
4
+ $format: '.png',
5
+ $options: 50% 50% no-repeat,
6
+ $svg-options: $options,
7
+ $size: 100%) {
8
+ background: image_url($filename + $format) $options;
9
+ background-size: $size;
10
+ height: $height;
11
+ width: $width;
12
+
13
+ @media only screen and (min-resolution: 1.3dppx) {
14
+ .svg & {
15
+ background: image_url($filename + '.svg') $svg-options;
16
+ background-size: $size;
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,7 @@
1
+ @mixin text-hide() {
2
+ background-color: transparent;
3
+ border: 0;
4
+ color: transparent;
5
+ font: 0/0 a;
6
+ text-shadow: none;
7
+ }
@@ -0,0 +1,5 @@
1
+ @mixin text-overflow() {
2
+ overflow: hidden;
3
+ text-overflow: ellipsis;
4
+ white-space: nowrap;
5
+ }
data/bower.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "stlr",
3
+ "homepage": "https://github.com/gambala/stlr",
4
+ "authors": [
5
+ "Vitaliy Emeliyantsev"
6
+ ],
7
+ "description": "stlr is a couple of mixins for sass",
8
+ "moduleType": "globals",
9
+ "main": [
10
+ "assets/stylesheets/stlr.scss"
11
+ ],
12
+ "keywords": [
13
+ "gambala",
14
+ "stlr",
15
+ "sass"
16
+ ],
17
+ "license": "MIT",
18
+ "ignore": [
19
+ "**/.*",
20
+ "lib",
21
+ "*.gemspec",
22
+ "Rakefile",
23
+ "Gemfile"
24
+ ],
25
+ "version": "1.0.0"
26
+ }
data/composer.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "gambala/stlr",
3
+ "description": "stlr is a couple of mixins for sass",
4
+ "keywords": ["stlr", "css", "sass"],
5
+ "homepage": "http://github.com/gambala/stlr",
6
+ "authors": [
7
+ {
8
+ "name": "Vitaliy Emeliyantsev"
9
+ }
10
+ ],
11
+ "support": {
12
+ "issues": "https://github.com/gambala/stlr/issues"
13
+ },
14
+ "license": "MIT"
15
+ }
@@ -0,0 +1,7 @@
1
+ var path = require('path');
2
+
3
+ module.exports = function(eyeglass, sass) {
4
+ return {
5
+ sassDir: path.join(__dirname, 'assets/stylesheets')
6
+ }
7
+ }
data/lib/stlr.rb ADDED
@@ -0,0 +1,58 @@
1
+ require 'stlr/version'
2
+ module Stlr
3
+ class << self
4
+ # Inspired by Kaminari
5
+ def load!
6
+ if rails?
7
+ register_rails_engine
8
+ elsif sprockets?
9
+ register_sprockets
10
+ end
11
+
12
+ configure_sass
13
+ end
14
+
15
+ # Paths
16
+ def gem_path
17
+ @gem_path ||= File.expand_path '..', File.dirname(__FILE__)
18
+ end
19
+
20
+ def stylesheets_path
21
+ File.join assets_path, 'stylesheets'
22
+ end
23
+
24
+ def assets_path
25
+ @assets_path ||= File.join gem_path, 'assets'
26
+ end
27
+
28
+ # Environment detection helpers
29
+ def sprockets?
30
+ defined?(::Sprockets)
31
+ end
32
+
33
+ def rails?
34
+ defined?(::Rails)
35
+ end
36
+
37
+ private
38
+
39
+ def configure_sass
40
+ require 'sass'
41
+
42
+ ::Sass.load_paths << stylesheets_path
43
+
44
+ # bootstrap requires minimum precision of 8, see https://github.com/twbs/bootstrap-sass/issues/409
45
+ ::Sass::Script::Number.precision = [8, ::Sass::Script::Number.precision].max
46
+ end
47
+
48
+ def register_rails_engine
49
+ require 'stlr/engine'
50
+ end
51
+
52
+ def register_sprockets
53
+ Sprockets.append_path(stylesheets_path)
54
+ end
55
+ end
56
+ end
57
+
58
+ Stlr.load!
@@ -0,0 +1,9 @@
1
+ module Stlr
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ initializer 'stlr.assets.precompile' do |app|
5
+ app.config.assets.paths << root.join('assets', 'stylesheets').to_s
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,4 @@
1
+ module Stlr
2
+ VERSION = '1.0.0'
3
+ STLR_SHA = '81df608a40bf0629a1dc08e584849bb1e43e0b7a'
4
+ end
data/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "stlr",
3
+ "version": "1.0.0",
4
+ "description": "stlr is a couple of mixins for sass",
5
+ "style": "assets/stylesheets/stlr.scss",
6
+ "sass": "assets/stylesheets/stlr.scss",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git://github.com/gambala/stlr"
10
+ },
11
+ "keywords": [
12
+ "stlr",
13
+ "sass",
14
+ "css",
15
+ "eyeglass-module"
16
+ ],
17
+ "contributors": [
18
+ "Vitaliy Emeliyantsev"
19
+ ],
20
+ "license": "MIT",
21
+ "bugs": {
22
+ "url": "https://github.com/gambala/stlr/issues"
23
+ },
24
+ "devDependencies": {
25
+ "node-sass": "~3.7.0",
26
+ "mincer": "~1.4.0",
27
+ "ejs": "~2.4.2"
28
+ },
29
+ "eyeglass": {
30
+ "exports": "eyeglass-exports.js",
31
+ "needs": "^0.7.1"
32
+ }
33
+ }
data/sache.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "stlr",
3
+ "description": "stlr is a couple of mixins for sass",
4
+ "tags": ["stlr", "typography", "responsive-web-design"]
5
+ }
data/stlr.gemspec ADDED
@@ -0,0 +1,17 @@
1
+ lib = File.expand_path('../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'stlr/version'
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = 'stlr'
7
+ s.version = Stlr::VERSION
8
+ s.authors = ['Vitaliy Emeliyantsev']
9
+ s.email = 'gambala.rus@gmail.com'
10
+ s.summary = 'stlr is a couple of mixins for sass'
11
+ s.homepage = 'https://github.com/gambala/stlr'
12
+ s.license = 'MIT'
13
+ s.files = `git ls-files`.split("\n")
14
+ s.add_runtime_dependency 'sass', '>= 3.3.4'
15
+ s.add_runtime_dependency 'autoprefixer-rails', '>= 5.2.1'
16
+ s.add_development_dependency 'term-ansicolor' # Converter
17
+ end
metadata ADDED
@@ -0,0 +1,116 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: stlr
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Vitaliy Emeliyantsev
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-01-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: sass
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 3.3.4
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 3.3.4
27
+ - !ruby/object:Gem::Dependency
28
+ name: autoprefixer-rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 5.2.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 5.2.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: term-ansicolor
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description:
56
+ email: gambala.rus@gmail.com
57
+ executables: []
58
+ extensions: []
59
+ extra_rdoc_files: []
60
+ files:
61
+ - ".gitignore"
62
+ - Gemfile
63
+ - LICENSE
64
+ - README.md
65
+ - assets/stylesheets/stlr/functions/gg.scss
66
+ - assets/stylesheets/stlr/functions/rh-margin.scss
67
+ - assets/stylesheets/stlr/functions/rh.scss
68
+ - assets/stylesheets/stlr/mixins/bg.scss
69
+ - assets/stylesheets/stlr/mixins/border-xxx-radius.scss
70
+ - assets/stylesheets/stlr/mixins/clearfix.scss
71
+ - assets/stylesheets/stlr/mixins/gradient-striped.scss
72
+ - assets/stylesheets/stlr/mixins/image.scss
73
+ - assets/stylesheets/stlr/mixins/placeholder.scss
74
+ - assets/stylesheets/stlr/mixins/responsive-image.scss
75
+ - assets/stylesheets/stlr/mixins/retina-bg.scss
76
+ - assets/stylesheets/stlr/mixins/retina-image.scss
77
+ - assets/stylesheets/stlr/mixins/scrollbar.scss
78
+ - assets/stylesheets/stlr/mixins/svg-bg.scss
79
+ - assets/stylesheets/stlr/mixins/svg-image.scss
80
+ - assets/stylesheets/stlr/mixins/text-hide.scss
81
+ - assets/stylesheets/stlr/mixins/text-overflow.scss
82
+ - bower.json
83
+ - composer.json
84
+ - eyeglass-exports.js
85
+ - lib/stlr.rb
86
+ - lib/stlr/engine.rb
87
+ - lib/stlr/version.rb
88
+ - package.json
89
+ - sache.json
90
+ - stlr.gemspec
91
+ homepage: https://github.com/gambala/stlr
92
+ licenses:
93
+ - MIT
94
+ metadata: {}
95
+ post_install_message:
96
+ rdoc_options: []
97
+ require_paths:
98
+ - lib
99
+ required_ruby_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ required_rubygems_version: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ requirements: []
110
+ rubyforge_project:
111
+ rubygems_version: 2.5.1
112
+ signing_key:
113
+ specification_version: 4
114
+ summary: stlr is a couple of mixins for sass
115
+ test_files: []
116
+ has_rdoc: