accoutrement 0.0.5 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,24 +0,0 @@
1
- // ----------------------------------------------------------------------------
2
- // Layout Helpers
3
-
4
- // OOCSS LastUnit Helper
5
- //
6
- // lastunit()
7
- @mixin lastunit {
8
- display: table-cell;
9
- *display: block;
10
- *zoom: 1;
11
- float: none;
12
- _position: relative;
13
- _left: -3px;
14
- _margin-right: -3px;
15
- width: auto;
16
- &:after {
17
- content: " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ";
18
- visibility: hidden;
19
- clear: both;
20
- height: 0 !important;
21
- display: block;
22
- line-height: 0;
23
- }
24
- }
@@ -1,14 +0,0 @@
1
- // ----------------------------------------------------------------------------
2
- // Math Functions
3
-
4
- // Return the modulo of two numbers.
5
- //
6
- // mod($dividend, $divisor)
7
- // - $dividend : the sample size.
8
- // - $divisor : the full count.
9
- @function mod(
10
- $dividend,
11
- $divisor
12
- ) {
13
- @return $dividend - (floor($dividend/$divisor)*$divisor);
14
- }
@@ -1,72 +0,0 @@
1
- // ----------------------------------------------------------------------------
2
- // Fluid Media
3
-
4
- // Default property-value pair for setting fluid width.
5
- $default-fluid-width : max-width 100% !default;
6
-
7
- // Default list of elements for the fluid-media mixin.
8
- $default-fluid-elements : 'img, video' !default;
9
-
10
- // Create fluid images and video
11
- //
12
- // @include fluid-media([$width, $elements])
13
- // - $width : Property-value pair for setting fluid width.
14
- // - $elements : List of elements for the fluid-media mixin.
15
- @mixin fluid-media(
16
- $width : $default-fluid-width,
17
- $elements : $default-fluid-elements
18
- ) {
19
- $property : max-width;
20
- $value : 100%;
21
-
22
- @each $arg in $width {
23
- @if type-of($arg) == 'string' { $property: $arg; }
24
- @if type-of($arg) == 'number' { $value: $arg; }
25
- }
26
-
27
- #{$elements} {
28
- #{$property}: $value;
29
- height: auto;
30
- }
31
- }
32
-
33
- // ----------------------------------------------------------------------------
34
- // Fluid Ratios
35
-
36
- // The default fluid ratio.
37
- $default-fluid-ratio : 16/9 !default;
38
-
39
- // The default fluid ratio width.
40
- $default-fluid-ratio-width : 100% !default;
41
-
42
- // Child elements to keep within the ratio.
43
- $default-fluid-ratio-children : '*' !default;
44
-
45
- // Force an element and its children to hold a fluid ratio
46
- //
47
- // @include fluid-ratio([$ratio, $width, $children])
48
- // - $ratio : Ratio e.g. 16/9
49
- // - $width : Fluid width
50
- // - $children : Child elements to keep within the ratio
51
- @mixin fluid-ratio(
52
- $ratio : $default-fluid-ratio,
53
- $width : $default-fluid-ratio-width,
54
- $children : $default-fluid-ratio-children
55
- ) {
56
- position: relative;
57
- height: 0;
58
- padding-top: (1 / $ratio) * $width;
59
- width: $width;
60
-
61
- @if $children {
62
- > #{$children} {
63
- display: block;
64
- position: absolute;
65
- width: 100%;
66
- height: 100%;
67
- top: 0;
68
- margin: 0;
69
- padding: 0;
70
- }
71
- }
72
- }
@@ -1,34 +0,0 @@
1
- // ----------------------------------------------------------------------------
2
- // Pseudo Elements
3
-
4
- // Add content before an element.
5
- //
6
- // @include before($content)
7
- // $content: The string to add before.
8
- @mixin before($content) {
9
- &:before {
10
- content: $content;
11
- @content;
12
- }
13
- }
14
-
15
- // Add content after an element.
16
- //
17
- // @include after($content)
18
- // $content: The string to add after.
19
- @mixin after($content) {
20
- &:after {
21
- content: $content;
22
- @content;
23
- }
24
- }
25
-
26
- // Wrap content before and after an element.
27
- //
28
- // @include wrap($content)
29
- // $content: The strings to add before and after.
30
- @mixin wrap-content($content: "“" "”") {
31
- $content: if(length($content) < 2, $content $content, $content);
32
- @include before(nth($content,1)) { @content; };
33
- @include after(nth($content,2)) { @content; };
34
- }
@@ -1,28 +0,0 @@
1
- // ---------------------------------------------------------------------------
2
- // Pixels and Rhythms
3
-
4
- // Returns the nearest half-rhythm value for a given pixel length
5
- //
6
- // px-to-rhythm($px [, $from, $round])
7
- // - $px : The pixel value to convert.
8
- // - $from : Optional context font-size.
9
- // - $round : Optional direction ["up" | "down"] to round the results.
10
- @function px-to-rhythm(
11
- $px,
12
- $from: $base-font-size,
13
- $round: up
14
- ) {
15
- $rough: 2 * $px / $base-line-height;
16
- $lines: if($round == down, floor($rough) / 2, ceil($rough) / 2);
17
- @return rhythm($lines, $from);
18
- }
19
-
20
- // Returns the nearest half-rhythm value based on an images height
21
- //
22
- // rhythm-image($image [, $from, $round])
23
- // - $image : The image whos height we will use.
24
- // - $from : Optional context font-size.
25
- // - $round : Optional direction ["up" | "down"] to round the results.
26
- @function rhythm-image($image, $from: $base-font-size, $round: up) {
27
- @return px-to-rhythm(image-height($image), $from, $round);
28
- }
@@ -1,40 +0,0 @@
1
- // ----------------------------------------------------------------------------
2
- // Sass List Controls
3
-
4
- // Return a list with items in reverse order.
5
- //
6
- // reverse($list)
7
- // - $list: The list to reverse.
8
- @function reverse($list) {
9
- $l: length($list);
10
- $reverse: compact();
11
- @for $i from 0 to $l { $reverse: append($reverse,nth($list,$l - $i)); }
12
- @return $reverse;
13
- }
14
-
15
- // Return a list with all duplicates removed
16
- //
17
- // remove-duplicates($list)
18
- // - $list: The list to clean up.
19
- @function remove-duplicates($list) {
20
- $clean: compact();
21
- @each $item in $list {
22
- @if not index($clean, $item) { $clean: append($clean, $item) }
23
- }
24
- @return $clean;
25
- }
26
-
27
- // Return a list with specific items removed
28
- //
29
- // filter($list, $target)
30
- // - $list : The list to filter.
31
- // - $target : An item to be removed from the list.
32
- @function filter($list, $target) {
33
- $clean: compact();
34
- @if index($list, $target) {
35
- @each $item in $list {
36
- $clean: if($item == $target, $clean, append($clean, $item));
37
- }
38
- } @else { $clean: $list; }
39
- @return $clean;
40
- }
@@ -1,157 +0,0 @@
1
- // ---------------------------------------------------------------------------
2
- // Imports
3
-
4
- @import "a11y";
5
-
6
- // ---------------------------------------------------------------------------
7
- // CSS Tabs and Accordion
8
-
9
- // Create tabs with pure css & html.
10
- //
11
- // # Markup (within a shared container):
12
- // 1. radio or checkbox inputs : [id*="SLUG"]
13
- // 2. labels for those inpults : [for*="SLUG"]
14
- // 3. content for each tab : [class*="SLUG"];
15
- //
16
- // - The labels and content can be nested,
17
- // as long as you pass that nesting information along to the `tabs` mixin.
18
- // You can also change the default setting with `$default-nested-selectors`.
19
- // - You can also change the selector attributes with the
20
- // `$toggle-attribute`, `$title-attribute`, & `$content-attribute` settings.
21
- // - By default, we use the ':checked' attribute to know what tabs are active.
22
- // You can change that `$default-checked-selector` setting,
23
- // or the `$checked` argument in the `tabs` mixin.
24
- //
25
- // # Styles
26
- // 1. hidden content : %hide-tab-content { ... };
27
- // 2. visible content : %show-tab-content { ... };
28
- // 3. active tab title : %active-tab-title { ... };
29
- //
30
- // There are some very basic default styles that you can use to get started.
31
- // Simply `@include tab-defaults` and see it in action.
32
- //
33
- // # Tabs Example:
34
- //
35
- // section.mytabs
36
- // input[type="radio"]#first-tab-toggle
37
- // input[type="radio"]#second-tab-toggle
38
- // input[type="radio"]#third-tab-toggle
39
- //
40
- // label[for="first-tab-toggle"]
41
- // "First Tab"
42
- // label[for="second-tab-toggle"]
43
- // "Second Tab"
44
- // label[for="third-tab-toggle"]
45
- // "Third Tab"
46
- //
47
- // article.first
48
- // "Content for the first tab"
49
- // article.second
50
- // "Content for the first tab"
51
- // article.third
52
- // "Content for the first tab"
53
- //
54
- // @include tab-defaults;
55
- // @include tabs(first second third);
56
- //
57
- // # Accordion Example
58
- //
59
- // section.accordion
60
- // input[type="checkbox"]#first-toggle
61
- // input[type="checkbox"]#second-toggle
62
- // input[type="checkbox"]#third-toggle
63
- //
64
- // article
65
- // label[for="first-toggle"]
66
- // "First Section"
67
- // div.first
68
- // "Content for the first section"
69
- //
70
- // article
71
- // label[for="second-toggle"]
72
- // "Second Section"
73
- // div.second
74
- // "Content for the first section"
75
- //
76
- // article
77
- // label[for="third-toggle"]
78
- // "Third Section"
79
- // div.third
80
- // "Content for the first section"
81
- //
82
- // @include tab-defaults;
83
- // @include tabs(first second third, article);
84
-
85
- // ---------------------------------------------------------------------------
86
- // Settings
87
-
88
- // We don't need the radio-inputs to display.
89
- %hide-tab-toggle { @include gone; }
90
-
91
- // The CSS3 `:checked` selector is not supported by IE7 and IE8.
92
- // For legacy support, use `[aria-checked="true"]` applied with JavaScrip.
93
- $default-checked-selector : ':checked' !default;
94
- $default-nested-selectors : null !default;
95
-
96
- // Change the attributes used for each selector.
97
- // These attributes need to be different,
98
- // since everything else is the same in the selectors.
99
- $toggle-attribute : id !default;
100
- $title-attribute : for !default;
101
- $content-attribute : class !default;
102
-
103
- // ---------------------------------------------------------------------------
104
- // Mixins
105
-
106
- // Default styles for the content and the tab titles
107
- //
108
- // @include tab-defaults
109
- // - %hide-tab-content: Applied to hidden tabs.
110
- // - %show-tab-content: Applied to visible tabs.
111
- // - %active-tab-title: Applied to the tab-title for the active tab.
112
- @mixin tab-defaults {
113
- %hide-tab-content { display: none; }
114
- %show-tab-content { display: block; }
115
- %active-tab-title { font-weight: bold; }
116
- }
117
-
118
- // Create tabs for the given slugs
119
- //
120
- // @include make-tabs($slugs [, $nested, $checked])
121
- // - $slugs : The slugs to use in tab selectors.
122
- // - $nested : If the tabs or content are nested, add those selectors as well.
123
- // - One selector will be used for both
124
- // - Two selectors will be split: first tabs, then content
125
- // - Use `null` to unset one e.g. '.tab-selector null'
126
- // - $checked : How we know when a toggle is checked e.g. ':checked'.
127
- @mixin tabs(
128
- $slugs,
129
- $nested: $default-nested-selectors,
130
- $checked: $default-checked-selector
131
- ) {
132
- $nested-tabs: $nested;
133
- $nested-content: $nested;
134
- @if length($nested) > 1 {
135
- $nested-tabs: nth($nested, 1);
136
- $nested-content: nth($nested, 2);
137
- }
138
-
139
- @each $slug in $slugs {
140
- $toggle : '[#{$toggle-attribute}*="#{$slug}"]';
141
- $title : '[#{$title-attribute}*="#{$slug}"]';
142
- $content : '[#{$content-attribute}*="#{$slug}"]';
143
-
144
- #{$content} { @extend %hide-tab-content; }
145
- #{$toggle} {
146
- @extend %hide-tab-toggle;
147
- &#{$checked} {
148
- & ~ #{$nested-tabs} #{$title} {
149
- @extend %active-tab-title !optional;
150
- }
151
- & ~ #{$nested-content} #{$content} {
152
- @extend %show-tab-content;
153
- }
154
- }
155
- }
156
- }
157
- }
@@ -1,41 +0,0 @@
1
- // ----------------------------------------------------------------------------
2
- // Typography
3
-
4
- // Default size of the dropcap (in px)
5
- $default-dropcap-size : $base-font-size * 2 !default;
6
-
7
- // Default number of rhythm-lines for dropcap line-height
8
- $default-dropcap-lines : false !default;
9
-
10
- // The default padding on a dropcap letter
11
- $default-dropcap-padding : null !default;
12
-
13
- // The default font settings (null == inherit)
14
- $default-dropcap-font-family : null !default;
15
-
16
- // Creates a dropcap using the :first-letter selector
17
- //
18
- // dropcap([$size, $lines, $padding, $from-size]) { @content }
19
- // - $size : Optional font-size of your dropcap.
20
- // - $lines : Optional lines of rhythm for the dropcap line-height.
21
- // - $padding : Optional padding around the dropcap.
22
- // - $from-size : Optional context font size, if using relative sizing.
23
- // - $font-family : Optional font-stack for the dropcap.
24
- // - @content : Optionally override the default dropcap styles as needed.
25
- @mixin dropcap(
26
- $size : $default-dropcap-size,
27
- $lines : $default-dropcap-lines,
28
- $padding : $default-dropcap-padding,
29
- $from-size : $base-font-size,
30
- $font-family : $default-dropcap-font-family
31
- ) {
32
- $lines: if($lines, $lines, lines-for-font-size($size));
33
- &:first-letter {
34
- @include adjust-font-size-to($size,$lines,$from-size);
35
- font-family: $font-family;
36
- float: left;
37
- padding: $padding;
38
-
39
- @content;
40
- }
41
- }