compass-css-arrow 0.0.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.
- data/.gitignore +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +16 -0
- data/README.md +36 -0
- data/compass-css-arrow.gemspec +24 -0
- data/lib/compass-css-arrow.rb +4 -0
- data/lib/compass-css-arrow/version.rb +4 -0
- data/stylesheets/_compass-css-arrow.scss +3 -0
- data/stylesheets/compass-css-arrow/_css-arrow.scss +39 -0
- data/templates/project/manifest.rb +2 -0
- data/templates/project/screen.scss +2 -0
- metadata +67 -0
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*.gem
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
Compass CSS arrow
|
2
|
+
=================
|
3
|
+
|
4
|
+
This extension provides a mixin to add a css-only arrow to a box.
|
5
|
+
|
6
|
+
The original CSS code is taken from [cssarrowplease](http://cssarrowplease.com/) by [Simon Højberg](http://icreateui.com/).
|
7
|
+
|
8
|
+
Installation
|
9
|
+
------------
|
10
|
+
|
11
|
+
With Bundler :
|
12
|
+
|
13
|
+
gem 'compass-css-extension', :git => 'git://github.com/msadouni/compass-css-arrow.git'
|
14
|
+
|
15
|
+
Add to a project :
|
16
|
+
|
17
|
+
// rails: compass.config, other: config.rb
|
18
|
+
require 'compass-css-arrow'
|
19
|
+
|
20
|
+
// command line
|
21
|
+
compass install compass-css-arrow
|
22
|
+
|
23
|
+
Usage
|
24
|
+
-----
|
25
|
+
|
26
|
+
// @include css-arrow($position, $size, $color, $border-width, $border-color);
|
27
|
+
@import 'compass-css-arrow';
|
28
|
+
.arrow-box {
|
29
|
+
@include css-arrow(top, 30px, #88b7d5, 4px, #c2e1f5);
|
30
|
+
}
|
31
|
+
|
32
|
+
TODO
|
33
|
+
----
|
34
|
+
|
35
|
+
- Package as a real gem and update README
|
36
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "compass-css-arrow/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "compass-css-arrow"
|
7
|
+
s.version = CompassCssArrow::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Matthieu Sadouni"]
|
10
|
+
s.email = ["matthieusadouni@gmail.com"]
|
11
|
+
s.homepage = ''
|
12
|
+
s.summary = %q{a css-only arrow for compass}
|
13
|
+
s.description = %q{a css-only arrow for compass}
|
14
|
+
|
15
|
+
s.rubyforge_project = 'compass-css-arrow'
|
16
|
+
|
17
|
+
s.files = `git ls-files`.split("\n")
|
18
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
|
+
s.require_paths = ["lib"]
|
21
|
+
|
22
|
+
s.add_dependency("compass", [">= 0.11"])
|
23
|
+
end
|
24
|
+
|
@@ -0,0 +1,39 @@
|
|
1
|
+
@mixin css-arrow($position, $size, $color, $border-width, $border-color) {
|
2
|
+
$arrow-orientation:bottom;
|
3
|
+
$arrow-position:left;
|
4
|
+
@if $position == right {
|
5
|
+
$arrow-orientation:left;
|
6
|
+
$arrow-position:top;
|
7
|
+
} @else if $position == bottom {
|
8
|
+
$arrow-orientation:top;
|
9
|
+
$arrow-position:left;
|
10
|
+
} @else if $position == left {
|
11
|
+
$arrow-orientation:right;
|
12
|
+
$arrow-position:top;
|
13
|
+
}
|
14
|
+
position: relative;
|
15
|
+
background: $color;
|
16
|
+
border: $border-width solid $border-color;
|
17
|
+
&:after, &:before {
|
18
|
+
#{$arrow-orientation}: 100%;
|
19
|
+
border: solid transparent;
|
20
|
+
content: " ";
|
21
|
+
height: 0;
|
22
|
+
width: 0;
|
23
|
+
position: absolute;
|
24
|
+
pointer-events: none;
|
25
|
+
}
|
26
|
+
&:after {
|
27
|
+
border-#{$arrow-orientation}-color: $color;
|
28
|
+
border-width: $size;
|
29
|
+
#{$arrow-position}: 50%;
|
30
|
+
margin-#{$arrow-position}: -$size;
|
31
|
+
}
|
32
|
+
&:before {
|
33
|
+
border-#{$arrow-orientation}-color: $border-color;
|
34
|
+
border-width: #{round($size + $border-width * 1.41421356)};
|
35
|
+
#{$arrow-position}: 50%;
|
36
|
+
margin-#{$arrow-position}: -#{round($size + $border-width * 1.41421356)};
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
metadata
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: compass-css-arrow
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Matthieu Sadouni
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-05-10 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: compass
|
16
|
+
requirement: &2153450300 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0.11'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *2153450300
|
25
|
+
description: a css-only arrow for compass
|
26
|
+
email:
|
27
|
+
- matthieusadouni@gmail.com
|
28
|
+
executables: []
|
29
|
+
extensions: []
|
30
|
+
extra_rdoc_files: []
|
31
|
+
files:
|
32
|
+
- .gitignore
|
33
|
+
- Gemfile
|
34
|
+
- Gemfile.lock
|
35
|
+
- README.md
|
36
|
+
- compass-css-arrow.gemspec
|
37
|
+
- lib/compass-css-arrow.rb
|
38
|
+
- lib/compass-css-arrow/version.rb
|
39
|
+
- stylesheets/_compass-css-arrow.scss
|
40
|
+
- stylesheets/compass-css-arrow/_css-arrow.scss
|
41
|
+
- templates/project/manifest.rb
|
42
|
+
- templates/project/screen.scss
|
43
|
+
homepage: ''
|
44
|
+
licenses: []
|
45
|
+
post_install_message:
|
46
|
+
rdoc_options: []
|
47
|
+
require_paths:
|
48
|
+
- lib
|
49
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
57
|
+
requirements:
|
58
|
+
- - ! '>='
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
requirements: []
|
62
|
+
rubyforge_project: compass-css-arrow
|
63
|
+
rubygems_version: 1.8.17
|
64
|
+
signing_key:
|
65
|
+
specification_version: 3
|
66
|
+
summary: a css-only arrow for compass
|
67
|
+
test_files: []
|