compass-responsive-embeds 0.0.3 → 0.0.4
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/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
This extension helps embedding videos and iframes in responsive designs.
|
4
4
|
|
5
|
+
It provides a `responsive-embed` mixin to apply on an element containing an embed, to scale it while keeping its ratio.
|
6
|
+
|
5
7
|
See the blogs posts from [Anders M. Andersen](http://amobil.se/2011/11/responsive-embeds/) and [A List Apart](http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/) for more information.
|
6
8
|
|
7
9
|
## Installation
|
@@ -43,17 +45,17 @@ In your stylesheet:
|
|
43
45
|
|
44
46
|
// 16/9 embed
|
45
47
|
.embed-16-9 {
|
46
|
-
@include embed
|
48
|
+
@include responsive-embed(16/9);
|
47
49
|
}
|
48
50
|
|
49
51
|
// 4/3 embed
|
50
52
|
.embed-4-3 {
|
51
|
-
@include embed
|
53
|
+
@include responsive-embed(4/3);
|
52
54
|
}
|
53
55
|
|
54
56
|
// default 1 ratio for a square embed
|
55
57
|
@embed-1-1 {
|
56
|
-
@include embed
|
58
|
+
@include responsive-embed;
|
57
59
|
}
|
58
60
|
|
59
61
|
You can use any ratio, as long as the result can be converted to percentages.
|