flexy 1.0 → 1.1
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 +4 -4
- data/CHANGELOG.md +0 -0
- data/README.md +3 -53
- data/lib/flexy.rb +2 -2
- data/stylesheets/_flexy.scss +4 -4
- data/templates/project/flexy-demo.scss +62 -0
- data/templates/project/manifest.rb +4 -4
- metadata +4 -3
- data/templates/project/screen.scss +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc9ea03e1422be7d9b7aa01ae53ddce93326872a
|
4
|
+
data.tar.gz: bddd31d74ab13f42fcd7c8f48c23420ea1989fd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b688168c3bf818a2bf1ee4f09a850e691b615f9255e205cf5c2da03336580eb8bbcd9fa8c46741e96c5098702bbc872c90948487cf5e9134fd3ba2682de653f
|
7
|
+
data.tar.gz: b6d9c0de403cd0e643ce8e3353950abaecfb8749de6ff1ba5cb57d98c1f51e9e03a43b6de1afa2cfb1c66392a0c6460673d77726f72ebb64c1ecc80323145ac0
|
data/CHANGELOG.md
ADDED
File without changes
|
data/README.md
CHANGED
@@ -1,54 +1,4 @@
|
|
1
|
-
Compass
|
2
|
-
|
1
|
+
A simple Flexbox Compass extension
|
2
|
+
==================================
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
## lib/extension.rb
|
7
|
-
|
8
|
-
Your `lib` directory is your Ruby directory. The main file in here is **extension.rb** which contains the information that Compass needs to make your Extension run like a champ. It contains the Compass requires for other gems (like you would include in *config.rb* normally), the code to register your extension with Compass, the version number and date of the version, and any SassScript you may want to write.
|
9
|
-
|
10
|
-
## stylesheets/_extension.scss
|
11
|
-
|
12
|
-
Your `stylesheets` directory is where you write all of your extension's Sass! I've included **_extension.scss**, but you can include whatever you'd like. Write Sass or SCSS, do what works for you! Have sub folders, have sub partials, this is your playground. Important to note: make sure that every file in here is a Partial unless there is a file you specifically want to be output as a full file. Generally speaking, most Compass extensions *only* have partial files.
|
13
|
-
|
14
|
-
## templates/project
|
15
|
-
|
16
|
-
Your `templates` directory is where you store any project templates/patterns you'd like a user to be able to use. The Compass Extension documentation explains in full what a template/pattern can do, the one provided is a generic one including print, i.e., and screen stylesheets that will import your extension. This will provide users with the ability to create a new project using your Compass extension in the following way:
|
17
|
-
|
18
|
-
`compass create <my_project> -r extension --using extension`
|
19
|
-
|
20
|
-
## CHANGELOG.md/README.md
|
21
|
-
|
22
|
-
These files aren't required for your Compass extension, but I really like including them as they are useful for Users to understand the direction of your Compass extension. Yes! That means you get to throw this README out and write your own! Do it!
|
23
|
-
|
24
|
-
## extension.gemspec
|
25
|
-
|
26
|
-
This is the magic file that will turn your collection of files into a packaged Compass extension! It's all laid out for you, just add/change what you need! When you're all done editing what you need, in the command line, from the directory where that lives, type the following:
|
27
|
-
|
28
|
-
`gem build extension.gemspec`
|
29
|
-
|
30
|
-
This will bundle your extension up into a Ruby gem. From there, if you're just using it locally, you can install your Extension in by typing the following:
|
31
|
-
|
32
|
-
`gem install extension-VERSION.gem`
|
33
|
-
|
34
|
-
If you're looking to distribute your extension, first, make sure you've got a [Ruby Gems](http://rubygems.org/) account, and type in the following:
|
35
|
-
|
36
|
-
`gem push extension-VERSION.gem`
|
37
|
-
|
38
|
-
If you're not logged in to Ruby Gems, it will ask you to log in, then it will push your extension up to Ruby Gems! Tada! It's now distributed to the world! To install a Compass extension from Ruby Gems, it's as simple as:
|
39
|
-
|
40
|
-
`gem install extension`
|
41
|
-
|
42
|
-
<hr>
|
43
|
-
|
44
|
-
# AND YOU'RE DONE.
|
45
|
-
|
46
|
-
<hr>
|
47
|
-
|
48
|
-
## Special Thanks
|
49
|
-
Super special thanks goes out to [Nathan Weizenbaum](https://github.com/nex3/) for Sass, [Chris Eppstein](https://github.com/chriseppstein/) for Compass, and [Mason Wendell](https://github.com/canarymason/) and [Scott Kellum](https://github.com/scottkellum/), my Compass extension partners in crime. Much of what's presented here is an amalgamation of what Chris, Mason, and Scott have taught me, so double thanks to them.
|
50
|
-
|
51
|
-
## License
|
52
|
-
[Creative Commons Attribution 3.0](http://creativecommons.org/licenses/by/3.0). Go wild.
|
53
|
-
|
54
|
-
If you're able to link me to your extension so I can see what you've built, that'd be awesome!
|
4
|
+
Open [flexy-demo.scss](https://github.com/Guilh/Flexy/blob/master/templates/project/flexy-demo.scss) for examples of how to use Flexy.
|
data/lib/flexy.rb
CHANGED
@@ -17,8 +17,8 @@ Compass::Frameworks.register('flexy', :path => extension_path)
|
|
17
17
|
# a prerelease version
|
18
18
|
# Date is in the form of YYYY-MM-DD
|
19
19
|
module Extension
|
20
|
-
VERSION = "1.
|
21
|
-
DATE = "2014-06-
|
20
|
+
VERSION = "1.1"
|
21
|
+
DATE = "2014-06-06"
|
22
22
|
end
|
23
23
|
|
24
24
|
# This is where any custom SassScript should be placed. The functions will be
|
data/stylesheets/_flexy.scss
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
@import "compass/css3/shared";
|
2
2
|
|
3
|
-
$flexy-support: not -moz, -webkit, not -o, not -ms,
|
3
|
+
$flexy-support: not -moz, -webkit, not -o, not -ms, official !default;
|
4
4
|
$flexy-breakpoint: 769px !default;
|
5
5
|
|
6
6
|
@mixin flexy(
|
7
7
|
$el: li,
|
8
8
|
$direction: row,
|
9
|
-
$align:
|
9
|
+
$align: stretch,
|
10
10
|
$justify: flex-start,
|
11
|
-
$
|
11
|
+
$flex: 0 1 auto,
|
12
12
|
$breakpoint: $flexy-breakpoint) {
|
13
13
|
|
14
14
|
@media (min-width: $breakpoint) {
|
@@ -27,7 +27,7 @@ $flexy-breakpoint: 769px !default;
|
|
27
27
|
|
28
28
|
// Grow all flex items
|
29
29
|
& > #{$el} {
|
30
|
-
@include experimental(flex,$
|
30
|
+
@include experimental(flex,$flex,$flexy-support...);
|
31
31
|
}
|
32
32
|
}
|
33
33
|
}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
// Import Flexy and you're ready to go!
|
2
|
+
|
3
|
+
@import "flexy";
|
4
|
+
|
5
|
+
///////////////////////////////
|
6
|
+
// Flexy Variables ///////////
|
7
|
+
/////////////////////////////
|
8
|
+
|
9
|
+
// Config variable for setting flexbox support
|
10
|
+
$flexy-support: not -moz, -webkit, not -o, not -ms, official;
|
11
|
+
|
12
|
+
// Config variable for setting flexbox media query breakpoint. The default value is 769px.
|
13
|
+
$flexy-breakpoint: 769px;
|
14
|
+
|
15
|
+
//////////////////////////////
|
16
|
+
// Flexy Mixins /////////////
|
17
|
+
////////////////////////////
|
18
|
+
|
19
|
+
// Establish flexbox layout with default all values
|
20
|
+
@include flexy;
|
21
|
+
|
22
|
+
// Optional Arguments
|
23
|
+
@include flexy($el, $direction, $align, $justify, $flex);
|
24
|
+
|
25
|
+
// $el - Defines the element or class to target as flex items
|
26
|
+
// $direction - Set the flex-direction
|
27
|
+
// $align - Align flex items
|
28
|
+
// $justify - Set the flex container alignment
|
29
|
+
// $flex - Set the flex value for flex items
|
30
|
+
|
31
|
+
// Variable Defaults
|
32
|
+
|
33
|
+
// $el: li
|
34
|
+
// $direction: row
|
35
|
+
// $align: stretch
|
36
|
+
// $justify: flex-start
|
37
|
+
// $flex: 0 1 auto
|
38
|
+
|
39
|
+
// Target a specific flex item and apply a flex-grow
|
40
|
+
@include flexy-grow($item, $amt);
|
41
|
+
|
42
|
+
// Change the order of flex items
|
43
|
+
@include flexy-order($order);
|
44
|
+
|
45
|
+
//////////////////////////////
|
46
|
+
// Examples /////////////////
|
47
|
+
////////////////////////////
|
48
|
+
|
49
|
+
.main-nav {
|
50
|
+
@include flexy($align: center, $flex: 1);
|
51
|
+
@include flexy-grow(2, 3);
|
52
|
+
}
|
53
|
+
.content-row {
|
54
|
+
@include flexy(".col", $flex: 1);
|
55
|
+
@include flexy-grow(1, 2);
|
56
|
+
.secondary-content {
|
57
|
+
@include flexy-order(3);
|
58
|
+
}
|
59
|
+
.extra-content {
|
60
|
+
@include flexy-order(2);
|
61
|
+
}
|
62
|
+
}
|
@@ -1,19 +1,19 @@
|
|
1
1
|
# Description
|
2
|
-
description "A simple Compass extension
|
2
|
+
description "A simple flexbox Compass extension."
|
3
3
|
|
4
4
|
# Stylesheet Import
|
5
|
-
file '
|
5
|
+
file 'flexy-demo.scss', :like => :stylesheet, :media => 'screen, projection'
|
6
6
|
|
7
7
|
# General File Import
|
8
8
|
# file 'README.md', :to => "README.md"
|
9
9
|
|
10
10
|
# Compass Extension Help
|
11
11
|
help %Q{
|
12
|
-
|
12
|
+
Open flexy-demo.scss for help and examples.
|
13
13
|
}
|
14
14
|
|
15
15
|
# Compass Extension Welcome Message
|
16
16
|
# Users will see this when they create a new project using this template.
|
17
17
|
welcome_message %Q{
|
18
|
-
You have successfully installed Flexy!
|
18
|
+
You have successfully installed the Flexy demo! Open flexy-demo.scss for examples.
|
19
19
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flexy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guil Hernandez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|
@@ -45,11 +45,12 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
+
- CHANGELOG.md
|
48
49
|
- README.md
|
49
50
|
- lib/flexy.rb
|
50
51
|
- stylesheets/_flexy.scss
|
52
|
+
- templates/project/flexy-demo.scss
|
51
53
|
- templates/project/manifest.rb
|
52
|
-
- templates/project/screen.scss
|
53
54
|
homepage: http://teamtreehouse.com
|
54
55
|
licenses: []
|
55
56
|
metadata: {}
|