compass-pug 0.1.2 → 0.2.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 +4 -4
- data/README.md +7 -5
- data/stylesheets/pug/_mixins.scss +44 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c4a742f23fe04c5ad374f27bd5ae0f7b10b37c2
|
4
|
+
data.tar.gz: dd099a7b4f71282be2dcef549d0de91826678134
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2274ed787f1fbfed5c5f242c087fb0db9c5333557cbab3670065b59b80e0f76b01fe1481cb34b034aca3b00ef366be1db1690d45a9ccd60c07df54bb86b59dc2
|
7
|
+
data.tar.gz: 7c49fb3a934c6dea44935867a880dea878a04d5820b572980b47f673f6d2ab3e0942ca4a50a07f08d00b2b8b80145aca7d27a575ef9f7f889c5764312f04f0e9
|
data/README.md
CHANGED
@@ -25,15 +25,17 @@ For complete details, including function/mixin parameters, view the `stylesheets
|
|
25
25
|
* `pug-aligncenter()`: Sets `display:block`, `clear:both` and auto l/r margin to horizontally center an element.
|
26
26
|
* `pug-alignleft()`: Sets `display:inline`, `float:left` and applies some right margin based on the configured horizontal unit.
|
27
27
|
* `pug-alignright()`: Sets `display:inline`, `float:right` and applies some left margin based on the configured horizontal unit.
|
28
|
+
* `pug-aspect-ratio()`: Provides ability to fix an element at a given aspect ratio while still supporting fluid width. Args are `$width` (unitless int), `$height` (unitless int), `$child-selector` (selector of a child within the element). See source for example code. Adapted from a post on [CSS Tricks](https://css-tricks.com/snippets/sass/maintain-aspect-ratio-mixin/).
|
28
29
|
* `pug-clearfix()`: Clearfix. Alias for `pug-micro-clearfix()`.
|
29
|
-
* `pug-dark-bg-with-light-text()`: Quickly apply bg, text and link colors to a selector appropriate for a dark background with light text.
|
30
30
|
* `pug-image-replacement()`: [Adapted from HTML5 Boilerplate's](http://html5boilerplate.com/) `.ir` class.
|
31
|
-
* `pug-light-bg-with-dark-text()`: Quickly apply bg, text and link colors to a selector appropriate for a light background with dark text.
|
32
|
-
* `pug-micro-clearfix()`: [Provides Nicolas Gallagher's Micro Clearfix](http://nicolasgallagher.com/micro-clearfix-hack/).
|
33
31
|
* `pug-placeholder-color()`: Generates cross-browser CSS (with selectors) for setting the color of input field placeholder text. Via [CSS Tricks](http://css-tricks.com/snippets/css/style-placeholder-text/).
|
34
|
-
* `pug-tab-size()`: Vendor-prefixed tab sizing. Use with elements such as `pre`.
|
35
32
|
* `pug-sr-only()`: Apply to an element to make it accessible only to screen readers. Optionally include `$focusable:true` to allow the element to be focusable when navigated to via the keyboard. [Adapted from Bootstrap 3](http://getbootstrap.com/css/#helper-classes-screen-readers).
|
36
|
-
* `pug-
|
33
|
+
* `pug-tab-size()`: Vendor-prefixed tab sizing. Use with elements such as `pre`.
|
34
|
+
* **Deprecated mixins:**
|
35
|
+
* `pug-dark-bg-with-light-text()`: *DEPRECATED* Quickly apply bg, text and link colors to a selector appropriate for a dark background with light text.
|
36
|
+
* `pug-light-bg-with-dark-text()`: *DEPRECATED* Quickly apply bg, text and link colors to a selector appropriate for a light background with dark text.
|
37
|
+
* `pug-micro-clearfix()`: *DEPRECATED (use `pug-clearfix()` instead)* [Provides Nicolas Gallagher's Micro Clearfix](http://nicolasgallagher.com/micro-clearfix-hack/).
|
38
|
+
* `pug-sr-only-focusable()`: *DEPRECATED (use `pug-sr-only($focusable:true)` instead)* Applies (optionally, and by default) `pug-sr-only()` and shows the element again when it's focused. [Adapted from Bootstrap 3](http://getbootstrap.com/css/#helper-classes-screen-readers).
|
37
39
|
|
38
40
|
### Sass Functions
|
39
41
|
|
@@ -28,10 +28,50 @@
|
|
28
28
|
@include pug-micro-clearfix();
|
29
29
|
}
|
30
30
|
|
31
|
+
// Maintain aspect ratio while dynamically filling 100% width.
|
32
|
+
//
|
33
|
+
// Great for use with background images with background-size:cover. Adapted from
|
34
|
+
// @link https://css-tricks.com/snippets/sass/maintain-aspect-ratio-mixin/
|
35
|
+
//
|
36
|
+
// **Example markup:**
|
37
|
+
//
|
38
|
+
// <div class="my-box">
|
39
|
+
// <div class="my-box-child">[arbitrary markup here]</div>
|
40
|
+
// </div>
|
41
|
+
//
|
42
|
+
// **Example SCSS,** creating a 16x9 box:
|
43
|
+
//
|
44
|
+
// .my-box {
|
45
|
+
// @include pug-aspect-ratio(16, 9, .my-box-child);
|
46
|
+
// }
|
47
|
+
//
|
48
|
+
// @param int $width Ratio width as unitless integer.
|
49
|
+
// @param int $height Ratio height as unitless integer.
|
50
|
+
// @param string $child-selector Selector for the extra child element of the element
|
51
|
+
// receiving this mixin.
|
52
|
+
@mixin pug-aspect-ratio($width, $height, $child-selector) {
|
53
|
+
position: relative;
|
54
|
+
&:before {
|
55
|
+
content: "";
|
56
|
+
display: block;
|
57
|
+
padding-top: ($height / $width) * 100%;
|
58
|
+
width: 100%;
|
59
|
+
}
|
60
|
+
> #{$child-selector} {
|
61
|
+
bottom: 0;
|
62
|
+
left: 0;
|
63
|
+
position: absolute;
|
64
|
+
right: 0;
|
65
|
+
top: 0;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
31
69
|
// Quickly apply appropriate styles to an element for having a dark background.
|
32
70
|
//
|
33
71
|
// This mixin will adjust bg, text and link color.
|
34
72
|
//
|
73
|
+
// @deprecated
|
74
|
+
//
|
35
75
|
// @see pug-dark-bg-with-dark-text
|
36
76
|
//
|
37
77
|
// @param string $bg-color
|
@@ -82,6 +122,8 @@
|
|
82
122
|
//
|
83
123
|
// This mixin will adjust bg, text and link color.
|
84
124
|
//
|
125
|
+
// @deprecated
|
126
|
+
//
|
85
127
|
// @see pug-dark-bg-with-light-text
|
86
128
|
//
|
87
129
|
// @param string $bg-color
|
@@ -196,6 +238,8 @@
|
|
196
238
|
//
|
197
239
|
// Applies sr-only and shows the element again when it's focused. (adapted from Bootstrap 3)
|
198
240
|
//
|
241
|
+
// @deprecated
|
242
|
+
//
|
199
243
|
// @see pug-sr-only()
|
200
244
|
// @see http://getbootstrap.com/css/#helper-classes-screen-readers
|
201
245
|
//
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compass-pug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kamm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: compass
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.0'
|
27
27
|
description: Pug is a collection of mixins and functions for use in Sass/Compass projects.
|
@@ -49,17 +49,17 @@ require_paths:
|
|
49
49
|
- lib
|
50
50
|
required_ruby_version: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- -
|
57
|
+
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: '0'
|
60
60
|
requirements: []
|
61
61
|
rubyforge_project:
|
62
|
-
rubygems_version: 2.
|
62
|
+
rubygems_version: 2.4.6
|
63
63
|
signing_key:
|
64
64
|
specification_version: 4
|
65
65
|
summary: A collection of mixins and functions for use in Sass/Compass projects.
|