semantic-mixins 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/assets/stylesheets/semantic-mixins/_css3-support.sass +22 -0
- data/lib/assets/stylesheets/semantic-mixins/_main.sass +35 -24
- data/lib/assets/stylesheets/semantic-mixins/_stylish.sass +44 -0
- data/lib/assets/stylesheets/semantic-mixins.sass +2 -1
- data/semantic-mixins.gemspec +1 -1
- metadata +3 -2
@@ -1,3 +1,25 @@
|
|
1
|
+
// FILTERS
|
2
|
+
= blur($value: 4px)
|
3
|
+
+filter(blur($value))
|
4
|
+
|
5
|
+
= brightness($value: 0.35)
|
6
|
+
+filter(brightness($value))
|
7
|
+
|
8
|
+
= contrast($value: 140%)
|
9
|
+
+filter(contrast($value))
|
10
|
+
|
11
|
+
= grayscale($value: 100%)
|
12
|
+
+filter(grayscale($value))
|
13
|
+
|
14
|
+
= saturate($value: 4)
|
15
|
+
+filter(saturate($value))
|
16
|
+
|
17
|
+
= invert($value: 100%)
|
18
|
+
+filter(invert($value))
|
19
|
+
|
20
|
+
= hue-rotate($value: 180deg)
|
21
|
+
+filter(hue-rotate($value))
|
22
|
+
|
1
23
|
// ANIMATION
|
2
24
|
= keyframes($animation-name)
|
3
25
|
@-webkit-keyframes #{$animation-name}
|
@@ -13,14 +13,6 @@ html
|
|
13
13
|
body
|
14
14
|
font-size: 1em
|
15
15
|
line-height: 1.4
|
16
|
-
|
17
|
-
hr
|
18
|
-
display: block
|
19
|
-
height: 1px
|
20
|
-
border: 0
|
21
|
-
border-top: 1px solid #ccc
|
22
|
-
margin: 1em 0
|
23
|
-
padding: 0
|
24
16
|
|
25
17
|
// Remove the gap between images and the bottom of their containers: h5bp.com/i/440
|
26
18
|
img
|
@@ -37,6 +29,8 @@ html
|
|
37
29
|
resize: vertical
|
38
30
|
|
39
31
|
// USEFULL MIXINS
|
32
|
+
@function relative-size($size,$context)
|
33
|
+
@return #{$size/$context}em
|
40
34
|
|
41
35
|
// This mixin is simple yet awesome to use, it'll give semantics to your sass code.
|
42
36
|
// Use it like so:
|
@@ -61,9 +55,38 @@ html
|
|
61
55
|
position: absolute
|
62
56
|
@content
|
63
57
|
|
64
|
-
|
65
|
-
|
66
|
-
|
58
|
+
= triangle($position: right, $size: 5px, $color: black)
|
59
|
+
width: 0
|
60
|
+
height: 0
|
61
|
+
line-height: 0
|
62
|
+
@if $position == top
|
63
|
+
border-bottom: $size solid $color
|
64
|
+
border-right: ($size*.75) solid transparent
|
65
|
+
border-left: ($size*.75) solid transparent
|
66
|
+
@if $position == bottom
|
67
|
+
border-top: $size solid $color
|
68
|
+
border-right: ($size*.75) solid transparent
|
69
|
+
border-left: ($size*.75) solid transparent
|
70
|
+
@if $position == left
|
71
|
+
border-right: $size solid $color
|
72
|
+
border-top: ($size*.75) solid transparent
|
73
|
+
border-bottom: ($size*.75) solid transparent
|
74
|
+
@if $position == right
|
75
|
+
border-left: $size solid $color
|
76
|
+
border-top: ($size*.75) solid transparent
|
77
|
+
border-bottom: ($size*.75) solid transparent
|
78
|
+
@if $position == top-left
|
79
|
+
border-top: $size solid $color
|
80
|
+
border-right: $size solid transparent
|
81
|
+
@if $position == top-right
|
82
|
+
border-top: $size solid $color
|
83
|
+
border-left: $size solid transparent
|
84
|
+
@if $position == bottom-right
|
85
|
+
border-bottom: $size solid $color
|
86
|
+
border-left: $size solid transparent
|
87
|
+
@if $position == bottom-left
|
88
|
+
border-bottom: $size solid $color
|
89
|
+
border-right: $size solid transparent
|
67
90
|
|
68
91
|
// POSITIONING MIXINS
|
69
92
|
= absolute-centering($width: 0, $direction: left, $offset: 0)
|
@@ -72,16 +95,4 @@ html
|
|
72
95
|
|
73
96
|
= move($distance, $direction: bottom)
|
74
97
|
position: relative
|
75
|
-
#{$direction}: - $distance
|
76
|
-
|
77
|
-
|
78
|
-
// TEXT MIXIS
|
79
|
-
= justify($characters-after: 1, $characters-before: 2)
|
80
|
-
hyphens: auto
|
81
|
-
text-align: justify
|
82
|
-
overflow-wrap: hyphenate
|
83
|
-
-webkit-hyphens: auto
|
84
|
-
-webkit-hyphenate-character: "\2010"
|
85
|
-
-webkit-hyphenate-limit-after: $characters-after
|
86
|
-
-webkit-hyphenate-limit-before: $characters-before
|
87
|
-
-moz-hyphens: auto
|
98
|
+
#{$direction}: - $distance
|
@@ -0,0 +1,44 @@
|
|
1
|
+
/ ADDS A BACKGROUND NOISE
|
2
|
+
= noise($color: gray, $opacity: 1)
|
3
|
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAUVBMVEWFhYWDg4N3d3dtbW17e3t1dXWBgYGHh4d5eXlzc3OLi4ubm5uVlZWPj4+NjY19fX2JiYl/f39ra2uRkZGZmZlpaWmXl5dvb29xcXGTk5NnZ2c8TV1mAAAAG3RSTlNAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAvEOwtAAAFVklEQVR4XpWWB67c2BUFb3g557T/hRo9/WUMZHlgr4Bg8Z4qQgQJlHI4A8SzFVrapvmTF9O7dmYRFZ60YiBhJRCgh1FYhiLAmdvX0CzTOpNE77ME0Zty/nWWzchDtiqrmQDeuv3powQ5ta2eN0FY0InkqDD73lT9c9lEzwUNqgFHs9VQce3TVClFCQrSTfOiYkVJQBmpbq2L6iZavPnAPcoU0dSw0SUTqz/GtrGuXfbyyBniKykOWQWGqwwMA7QiYAxi+IlPdqo+hYHnUt5ZPfnsHJyNiDtnpJyayNBkF6cWoYGAMY92U2hXHF/C1M8uP/ZtYdiuj26UdAdQQSXQErwSOMzt/XWRWAz5GuSBIkwG1H3FabJ2OsUOUhGC6tK4EMtJO0ttC6IBD3kM0ve0tJwMdSfjZo+EEISaeTr9P3wYrGjXqyC1krcKdhMpxEnt5JetoulscpyzhXN5FRpuPHvbeQaKxFAEB6EN+cYN6xD7RYGpXpNndMmZgM5Dcs3YSNFDHUo2LGfZuukSWyUYirJAdYbF3MfqEKmjM+I2EfhA94iG3L7uKrR+GdWD73ydlIB+6hgref1QTlmgmbM3/L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ZcmgBZkzjjU1UrQ74ci1gWBCSGHtuV1H2mhSnO3Wp/3fEV5a+4wz//6qy8JxjZsmxxy5+4w9CDNJY09T072iKG0EnOS0arEYgXqYnXcYHwjTtUNAcMelOd4xpkoqiTYICWFq0JSiPfPDQdnt+4/wuqcXY47QILbgAAAABJRU5ErkJggg==)
|
4
|
+
@if $opacity < 1
|
5
|
+
background-color: rgba($color, $opacity)
|
6
|
+
@else
|
7
|
+
background-color: $color
|
8
|
+
|
9
|
+
// TEXT MIXIS
|
10
|
+
= justify($characters-after: 1, $characters-before: 2)
|
11
|
+
hyphens: auto
|
12
|
+
text-align: justify
|
13
|
+
overflow-wrap: hyphenate
|
14
|
+
-webkit-hyphens: auto
|
15
|
+
-webkit-hyphenate-character: "\2010"
|
16
|
+
-webkit-hyphenate-limit-after: $characters-after
|
17
|
+
-webkit-hyphenate-limit-before: $characters-before
|
18
|
+
-moz-hyphens: auto
|
19
|
+
|
20
|
+
// NUMERIC LI
|
21
|
+
= numeric-list($padding-left: 1em, $left: 0)
|
22
|
+
li
|
23
|
+
position: relative
|
24
|
+
padding-left: $padding-left
|
25
|
+
&:before
|
26
|
+
content: counter(li)
|
27
|
+
counter-increment: li
|
28
|
+
position: absolute
|
29
|
+
left: $left
|
30
|
+
@content
|
31
|
+
|
32
|
+
// TABLES
|
33
|
+
= zebra-table($color1: #efefef, $color2: white)
|
34
|
+
tr:nth-child(even)
|
35
|
+
background-color: $color1
|
36
|
+
tr:nth-child(odd)
|
37
|
+
background-color: $color2
|
38
|
+
|
39
|
+
= inset-input($radius: 3px)
|
40
|
+
border-radius: $radius
|
41
|
+
border: 1px solid transparent
|
42
|
+
border-top: none
|
43
|
+
border-bottom: 1px solid #DDD
|
44
|
+
+box-shadow(inset 0 1px 2px rgba(black,.39), 0 -1px 1px rgba(white,.6), 0 1px 0 rgba(white,.6))
|
data/semantic-mixins.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: semantic-mixins
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-11-
|
14
|
+
date: 2012-11-16 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -63,6 +63,7 @@ files:
|
|
63
63
|
- lib/assets/stylesheets/semantic-mixins/_image.sass
|
64
64
|
- lib/assets/stylesheets/semantic-mixins/_main.sass
|
65
65
|
- lib/assets/stylesheets/semantic-mixins/_responsive.sass
|
66
|
+
- lib/assets/stylesheets/semantic-mixins/_stylish.sass
|
66
67
|
- lib/semantic-mixins.rb
|
67
68
|
- semantic-mixins.gemspec
|
68
69
|
homepage: https://github.com/gustavoguichard/semantic-mixins
|