vr_flex 1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +0 -0
- data/README.md +9 -0
- data/lib/vr_flex.rb +11 -0
- data/stylesheets/_vr_flex.scss +159 -0
- data/templates/project/_vr_flex-demo.scss +62 -0
- data/templates/project/manifest.rb +26 -0
- metadata +82 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 510772f7e6874b7acd68748b55dc835b57e08985
|
4
|
+
data.tar.gz: d01050ca807d040c6e4e65a45823b9b42d24478c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f3e600d2cc6369662047c963019457ee5317d2683b1a7eddaea06f77f1cf8a65dd44ed9f5a34ad6aad2c7c56982d5d026025173123d8bf64bfe9795488eca4da
|
7
|
+
data.tar.gz: bfda17e40ec61ce5eb42e2e727d6dd2eccec1db24ba0c68596969665ebe5944426d504df13b7aba20db51200c6e8b4007755475c7eb7ee2efb1e3b8e28dd6adf
|
data/CHANGELOG.md
ADDED
File without changes
|
data/README.md
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
A simple Flexbox Compass extension
|
2
|
+
==================================
|
3
|
+
|
4
|
+
This extension implements all necessary syntaxes for today's use:
|
5
|
+
by one writing we get all syntaxes for successful work of flex-box.
|
6
|
+
It ensures that flex box would work with both new and old browsers,
|
7
|
+
e.g., android 4.1, android 4.3, iOS Safari, Safari, IE 10.
|
8
|
+
Import vr_flex and you`re ready to go!
|
9
|
+
Open [_vr_flex-demo.scss] (https://bitbucket.org/meshkis16/vr_flex/src/8991054a30e902f7d15cb5474d4e46efe5928892/templates/project/_vr_flex-demo.scss) for examples of how to use vr_flex.
|
data/lib/vr_flex.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# All gems that are required for this extension to work should go here.
|
2
|
+
# These are the requires you would normally put in your config.rb file
|
3
|
+
# By default, you should always included Compass. Do not include your
|
4
|
+
# extension.
|
5
|
+
require 'compass'
|
6
|
+
|
7
|
+
# This tells Compass what your Compass extension is called, and where to find
|
8
|
+
# its files
|
9
|
+
# Replace 'extension' with the name of your extension. Spaces allowed.
|
10
|
+
extension_path = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
11
|
+
Compass::Frameworks.register('vr_flex', :path => extension_path)
|
@@ -0,0 +1,159 @@
|
|
1
|
+
@mixin flex-on(
|
2
|
+
$display: flex,
|
3
|
+
$direction: null,
|
4
|
+
$wrap: null,
|
5
|
+
$justify: null,
|
6
|
+
$align-items: null,
|
7
|
+
$align-content: null) {
|
8
|
+
// Nustatom objekta kaip konteineri ir uzduodam
|
9
|
+
// isdestymo parametra: flex | inline-flex
|
10
|
+
@if $display == flex {
|
11
|
+
// 2009
|
12
|
+
display: -webkit-box;
|
13
|
+
|
14
|
+
// 2012
|
15
|
+
display: -webkit-flex;
|
16
|
+
display: -ms-flexbox; // 2011 (IE 10)
|
17
|
+
display: flex;
|
18
|
+
} @else if $display == inline-flex {
|
19
|
+
display: -webkit-inline-box;
|
20
|
+
display: inline-box;
|
21
|
+
|
22
|
+
display: -webkit-inline-flex;
|
23
|
+
display: -ms-inline-flexbox;
|
24
|
+
display: inline-flex;
|
25
|
+
} @else {
|
26
|
+
display: $display;
|
27
|
+
}
|
28
|
+
|
29
|
+
// Nustatom flex-direction
|
30
|
+
// 2009 - box-orient ( horizontal | vertical | inline-axis | block-axis)
|
31
|
+
// - box-direction (normal | reverse)
|
32
|
+
// 2011 - flex-direction (row | row-reverse | column | column-reverse)
|
33
|
+
// 2012 - flex-direction (row | row-reverse | column | column-reverse)
|
34
|
+
$direction-2009: $direction;
|
35
|
+
$box-direction: null;
|
36
|
+
|
37
|
+
@if $direction == row {
|
38
|
+
$direction-2009: horizontal;
|
39
|
+
$box-direction: normal;
|
40
|
+
} @else if $direction == row-reverse {
|
41
|
+
$direction-2009: horizontal;
|
42
|
+
$box-direction: reverse;
|
43
|
+
} @else if $direction == column {
|
44
|
+
$direction-2009: vertical;
|
45
|
+
$box-direction: normal;
|
46
|
+
} @else if $direction == column-reverse {
|
47
|
+
$direction-2009: vertical;
|
48
|
+
$box-direction: reverse;
|
49
|
+
}
|
50
|
+
|
51
|
+
-webkit-box-orient: $direction-2009;
|
52
|
+
-webkit-box-direction: $box-direction;
|
53
|
+
|
54
|
+
-webkit-flex-direction: $direction;
|
55
|
+
-ms-flex-direction: $direction;
|
56
|
+
flex-direction: $direction;
|
57
|
+
|
58
|
+
// Nustatom flex-wrap
|
59
|
+
// 2009 - box-lines (single | multiple)
|
60
|
+
// 2011 - flex-wrap (nowrap | wrap | wrap-reverse)
|
61
|
+
// 2012 - flex-wrap (nowrap | wrap | wrap-reverse)
|
62
|
+
$alt-value: $wrap;
|
63
|
+
|
64
|
+
@if $wrap == nowrap {
|
65
|
+
$alt-value: single;
|
66
|
+
} @else if $wrap == wrap {
|
67
|
+
$alt-value: multiple;
|
68
|
+
} @else if $wrap == wrap-reverse {
|
69
|
+
$alt-value: multiple;
|
70
|
+
}
|
71
|
+
|
72
|
+
-webkit-box-lines: $alt-value;
|
73
|
+
-webkit-flex-wrap: $wrap;
|
74
|
+
-ms-flex-wrap: $wrap;
|
75
|
+
flex-wrap: $wrap;
|
76
|
+
|
77
|
+
// Nustatom justify-content
|
78
|
+
// 2009 - box-pack (start | end | center | justify)
|
79
|
+
// 2011 - flex-pack (start | end | center | justify)
|
80
|
+
// 2012 - justify-content (flex-start | flex-end | center | space-between | space-around)
|
81
|
+
$alt-value: $justify;
|
82
|
+
|
83
|
+
@if $justify == flex-start {
|
84
|
+
$alt-value: start;
|
85
|
+
} @else if $justify == flex-end {
|
86
|
+
$alt-value: end;
|
87
|
+
} @else if $justify == space-between {
|
88
|
+
$alt-value: justify;
|
89
|
+
} @else if $justify == space-around {
|
90
|
+
$alt-value: distribute;
|
91
|
+
}
|
92
|
+
|
93
|
+
-webkit-box-pack: $alt-value;
|
94
|
+
-webkit-justify-content: $justify;
|
95
|
+
-ms-flex-pack: $alt-value;
|
96
|
+
justify-content: $justify;
|
97
|
+
|
98
|
+
// Nustatom align-items
|
99
|
+
// 2009 - box-align (start | end | center | baseline | stretch)
|
100
|
+
// 2011 - flex-align (start | end | center | baseline | stretch)
|
101
|
+
// 2012 - align-items (flex-start | flex-end | center | baseline | stretch)
|
102
|
+
$alt-value: $align-items;
|
103
|
+
|
104
|
+
@if $align-items == flex-start {
|
105
|
+
$alt-value: start;
|
106
|
+
} @else if $align-items == flex-end {
|
107
|
+
$alt-value: end;
|
108
|
+
}
|
109
|
+
|
110
|
+
-webkit-box-align: $alt-value;
|
111
|
+
-webkit-align-items: $align-items;
|
112
|
+
-ms-flex-align: $alt-value;
|
113
|
+
align-items: $align-items;
|
114
|
+
|
115
|
+
// Nustatom align-content
|
116
|
+
// 2011 - flex-line-pack (start | end | center | justify | distribute | stretch)
|
117
|
+
// 2012 - align-content (flex-start | flex-end | center | space-between | space-around | stretch)
|
118
|
+
$value-2011: $align-content;
|
119
|
+
|
120
|
+
@if $align-content == "flex-start" {
|
121
|
+
$value-2011: start;
|
122
|
+
} @else if $align-content == "flex-end" {
|
123
|
+
$value-2011: end;
|
124
|
+
} @else if $align-content == "space-between" {
|
125
|
+
$value-2011: justify;
|
126
|
+
} @else if $align-content == "space-around" {
|
127
|
+
$value-2011: distribute;
|
128
|
+
}
|
129
|
+
|
130
|
+
-webkit-align-content: $align-content;
|
131
|
+
-ms-flex-line-pack: $value-2011;
|
132
|
+
align-content: $align-content;
|
133
|
+
}
|
134
|
+
|
135
|
+
|
136
|
+
// 2009 - box-flex (integer)
|
137
|
+
// 2011 - flex (decimal | width decimal)
|
138
|
+
// 2012 - flex (integer integer width)
|
139
|
+
@mixin flex($value: null) {
|
140
|
+
|
141
|
+
// Grab flex-grow for older browsers.
|
142
|
+
$flex-grow: nth($value, 1);
|
143
|
+
|
144
|
+
-webkit-box-flex: $flex-grow;
|
145
|
+
-webkit-flex: $value;
|
146
|
+
-ms-flex: $value;
|
147
|
+
flex: $value;
|
148
|
+
}
|
149
|
+
|
150
|
+
// 2009 - box-ordinal-group (integer)
|
151
|
+
// 2011 - flex-order (integer)
|
152
|
+
// 2012 - order (integer)
|
153
|
+
@mixin order($int: 0) {
|
154
|
+
|
155
|
+
-webkit-box-ordinal-group: $int;
|
156
|
+
-webkit-order: $int;
|
157
|
+
-ms-flex-order: $int;
|
158
|
+
order: $int;
|
159
|
+
}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
// This extension implements all necessary syntaxes for today's use:
|
2
|
+
// by one writing we get all syntaxes for successful work of flex-box.
|
3
|
+
// It ensures that flex box would work with both new and old browsers,
|
4
|
+
// e.g., android 4.1, android 4.3, iOS Safari, Safari, IE 10.
|
5
|
+
// Import vr_flex and you`re ready to go!
|
6
|
+
|
7
|
+
@import "vr_flex";
|
8
|
+
|
9
|
+
//****************//
|
10
|
+
// vr_flex mixins //
|
11
|
+
//****************//
|
12
|
+
|
13
|
+
// Establish flexbox layout with default all values
|
14
|
+
@include flex-on;
|
15
|
+
|
16
|
+
//Optional arguments
|
17
|
+
@include flex-on($display, $direction, $wrap, $justify, $align-items, $align-content);
|
18
|
+
|
19
|
+
// $display - Establish flexbox layout
|
20
|
+
// $direction - Set the flex-direction
|
21
|
+
// $wrap - Allow the items to wrap as needed with this property
|
22
|
+
// $justify - Defines the alignment along the main axis
|
23
|
+
// $align-items - Align flex items
|
24
|
+
// $align-content - This aligns a flex container's lines within when there is extra space in the cross-axis
|
25
|
+
|
26
|
+
// Variable defaults
|
27
|
+
|
28
|
+
// $display: flex
|
29
|
+
// $direction: row
|
30
|
+
// $wrap: nowrap
|
31
|
+
// $justify: flex-start
|
32
|
+
// $align-items: stretch
|
33
|
+
// $align-content: stretch
|
34
|
+
|
35
|
+
|
36
|
+
// Set the flex value for flex items
|
37
|
+
@include flex($flex);
|
38
|
+
|
39
|
+
// Variable default
|
40
|
+
// $flex: 0 1 auto;
|
41
|
+
|
42
|
+
// Change the order of flex items
|
43
|
+
@include order($order);
|
44
|
+
|
45
|
+
//*********//
|
46
|
+
// Example //
|
47
|
+
//*********//
|
48
|
+
|
49
|
+
.main-div {
|
50
|
+
@include flex-on(flex, row, nowrap, space-between, center, center );
|
51
|
+
.child-div {
|
52
|
+
@include flex(1 1 auto);
|
53
|
+
@include order(2);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
//***************//
|
58
|
+
// Other example //
|
59
|
+
//**************//
|
60
|
+
.main-div {
|
61
|
+
@include flex-on($display: inline-flex, $justify: space-between, $align-content: center );
|
62
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Description
|
2
|
+
description "This extension implements all necessary syntaxes for today's use:
|
3
|
+
by one writing we get all syntaxes for successful work of flex-box.
|
4
|
+
It ensures that flex box would work with both new and old browsers,
|
5
|
+
e.g., android 4.1, android 4.3, iOS Safari, Safari, IE 10."
|
6
|
+
|
7
|
+
# Stylesheet Import
|
8
|
+
file '_vr_flex-demo.scss', :like => :stylesheet, :media => 'screen, projection'
|
9
|
+
|
10
|
+
# Javascript Import
|
11
|
+
# file 'scripts.js', :like => :javascript, :to => 'scripts.js'
|
12
|
+
|
13
|
+
# General File Import
|
14
|
+
# file 'README.md', :to => "README.md"
|
15
|
+
|
16
|
+
# Compass Extension Help
|
17
|
+
help %Q{
|
18
|
+
Open vr_flex-demo.scss for help and examples.
|
19
|
+
}
|
20
|
+
|
21
|
+
# Compass Extension Welcome Message
|
22
|
+
# Users will see this when they create a new project using this template.
|
23
|
+
welcome_message %Q{
|
24
|
+
You have successfully installed the vr_flex demo! Open _vr_flex-demo.scss
|
25
|
+
for examples.
|
26
|
+
}
|
metadata
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vr_flex
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '1.0'
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tadas Masidlauskas
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-04-03 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.2.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: compass
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.12.1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.12.1
|
41
|
+
description: |-
|
42
|
+
This extension implements all necessary syntaxes for today's use:
|
43
|
+
by one writing we get all syntaxes for successful work of flex-box.
|
44
|
+
It ensures that flex box would work with both new and old browsers,
|
45
|
+
e.g., android 4.1, android 4.3, iOS Safari, Safari, IE 10.
|
46
|
+
Import vr_flex and you`re ready to go!
|
47
|
+
email:
|
48
|
+
- meshkis16@gmail.com
|
49
|
+
executables: []
|
50
|
+
extensions: []
|
51
|
+
extra_rdoc_files: []
|
52
|
+
files:
|
53
|
+
- CHANGELOG.md
|
54
|
+
- README.md
|
55
|
+
- lib/vr_flex.rb
|
56
|
+
- stylesheets/_vr_flex.scss
|
57
|
+
- templates/project/_vr_flex-demo.scss
|
58
|
+
- templates/project/manifest.rb
|
59
|
+
homepage: https://bitbucket.org/meshkis16/vr_flex
|
60
|
+
licenses: []
|
61
|
+
metadata: {}
|
62
|
+
post_install_message:
|
63
|
+
rdoc_options: []
|
64
|
+
require_paths:
|
65
|
+
- lib
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.3.6
|
76
|
+
requirements: []
|
77
|
+
rubyforge_project: vr_flex
|
78
|
+
rubygems_version: 2.4.6
|
79
|
+
signing_key:
|
80
|
+
specification_version: 4
|
81
|
+
summary: Use Flexbox in all browsers!
|
82
|
+
test_files: []
|