stlr 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/Gemfile +7 -0
- data/LICENSE +21 -0
- data/README.md +1 -0
- data/assets/stylesheets/stlr/functions/gg.scss +11 -0
- data/assets/stylesheets/stlr/functions/rh-margin.scss +7 -0
- data/assets/stylesheets/stlr/functions/rh.scss +10 -0
- data/assets/stylesheets/stlr/mixins/bg.scss +6 -0
- data/assets/stylesheets/stlr/mixins/border-xxx-radius.scss +18 -0
- data/assets/stylesheets/stlr/mixins/clearfix.scss +22 -0
- data/assets/stylesheets/stlr/mixins/gradient-striped.scss +6 -0
- data/assets/stylesheets/stlr/mixins/image.scss +7 -0
- data/assets/stylesheets/stlr/mixins/placeholder.scss +6 -0
- data/assets/stylesheets/stlr/mixins/responsive-image.scss +5 -0
- data/assets/stylesheets/stlr/mixins/retina-bg.scss +12 -0
- data/assets/stylesheets/stlr/mixins/retina-image.scss +17 -0
- data/assets/stylesheets/stlr/mixins/scrollbar.scss +15 -0
- data/assets/stylesheets/stlr/mixins/svg-bg.scss +14 -0
- data/assets/stylesheets/stlr/mixins/svg-image.scss +19 -0
- data/assets/stylesheets/stlr/mixins/text-hide.scss +7 -0
- data/assets/stylesheets/stlr/mixins/text-overflow.scss +5 -0
- data/bower.json +26 -0
- data/composer.json +15 -0
- data/eyeglass-exports.js +7 -0
- data/lib/stlr.rb +58 -0
- data/lib/stlr/engine.rb +9 -0
- data/lib/stlr/version.rb +4 -0
- data/package.json +33 -0
- data/sache.json +5 -0
- data/stlr.gemspec +17 -0
- metadata +116 -0
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
data/Gemfile
ADDED
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,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,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,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
|
+
}
|
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
|
+
}
|
data/eyeglass-exports.js
ADDED
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!
|
data/lib/stlr/engine.rb
ADDED
data/lib/stlr/version.rb
ADDED
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
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:
|