fortitude-sass 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +7 -0
- data/.npmignore +9 -0
- data/.scss-lint.yml +13 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +48 -0
- data/README.md +19 -0
- data/app/assets/javascripts/fortitude/jquery/blocks/flashbar.js +13 -0
- data/app/assets/javascripts/fortitude/jquery/blocks/select-input.js +26 -0
- data/app/assets/javascripts/fortitude/jquery/blocks/shade.js +48 -0
- data/app/assets/javascripts/fortitude/jquery/generic/transition-end.js +50 -0
- data/app/assets/javascripts/fortitude/jquery/generic/viewport.js +7 -0
- data/app/assets/javascripts/fortitude/jquery/index.js +3 -0
- data/app/assets/javascripts/fortitude.jquery.js +45 -0
- data/app/assets/stylesheets/fortitude/base/_hr.scss +10 -0
- data/app/assets/stylesheets/fortitude/base/_images.scss +32 -0
- data/app/assets/stylesheets/fortitude/base/_lists.scss +15 -0
- data/app/assets/stylesheets/fortitude/base/_page.scss +28 -0
- data/app/assets/stylesheets/fortitude/blocks/_badge.scss +141 -0
- data/app/assets/stylesheets/fortitude/blocks/_bare-list.scss +17 -0
- data/app/assets/stylesheets/fortitude/blocks/_block-list.scss +83 -0
- data/app/assets/stylesheets/fortitude/blocks/_box.scss +23 -0
- data/app/assets/stylesheets/fortitude/blocks/_button.scss +229 -0
- data/app/assets/stylesheets/fortitude/blocks/_container.scss +67 -0
- data/app/assets/stylesheets/fortitude/blocks/_flag.scss +426 -0
- data/app/assets/stylesheets/fortitude/blocks/_flashbar.scss +22 -0
- data/app/assets/stylesheets/fortitude/blocks/_fluid-container.scss +12 -0
- data/app/assets/stylesheets/fortitude/blocks/_inline-list.scss +19 -0
- data/app/assets/stylesheets/fortitude/blocks/_input.scss +377 -0
- data/app/assets/stylesheets/fortitude/blocks/_layout.scss +288 -0
- data/app/assets/stylesheets/fortitude/blocks/_list-navigation.scss +34 -0
- data/app/assets/stylesheets/fortitude/blocks/_media.scss +289 -0
- data/app/assets/stylesheets/fortitude/blocks/_shade.scss +51 -0
- data/app/assets/stylesheets/fortitude/blocks/_table.scss +31 -0
- data/app/assets/stylesheets/fortitude/blocks/_tabs-navigation.scss +58 -0
- data/app/assets/stylesheets/fortitude/blocks/_tabs.scss +19 -0
- data/app/assets/stylesheets/fortitude/blocks/_text.scss +67 -0
- data/app/assets/stylesheets/fortitude/blocks/_ui-list.scss +97 -0
- data/app/assets/stylesheets/fortitude/generic/_box-sizing.scss +23 -0
- data/app/assets/stylesheets/fortitude/generic/_clearfix.scss +3 -0
- data/app/assets/stylesheets/fortitude/generic/_normalize.scss +200 -0
- data/app/assets/stylesheets/fortitude/generic/_reset.scss +53 -0
- data/app/assets/stylesheets/fortitude/settings/_defaults.scss +58 -0
- data/app/assets/stylesheets/fortitude/tools/_functions.scss +115 -0
- data/app/assets/stylesheets/fortitude/tools/_mixins.scss +58 -0
- data/app/assets/stylesheets/fortitude/trumps/_responsive-border.scss +35 -0
- data/app/assets/stylesheets/fortitude/trumps/_responsive-column.scss +37 -0
- data/app/assets/stylesheets/fortitude/trumps/_responsive-display.scss +35 -0
- data/app/assets/stylesheets/fortitude/trumps/_responsive-float.scss +13 -0
- data/app/assets/stylesheets/fortitude/trumps/_responsive-font.scss +13 -0
- data/app/assets/stylesheets/fortitude/trumps/_responsive-height.scss +13 -0
- data/app/assets/stylesheets/fortitude/trumps/_responsive-line-height.scss +13 -0
- data/app/assets/stylesheets/fortitude/trumps/_responsive-margin.scss +129 -0
- data/app/assets/stylesheets/fortitude/trumps/_responsive-padding.scss +65 -0
- data/app/assets/stylesheets/fortitude/trumps/_responsive-text.scss +17 -0
- data/app/assets/stylesheets/fortitude.scss +40 -0
- data/bin/fortitude +6 -0
- data/bower.json +43 -0
- data/config.rb +36 -0
- data/dist/fortitude.css +5242 -0
- data/dist/fortitude.css.map +7 -0
- data/dist/fortitude.jquery.js +45 -0
- data/fortitude-black.png +0 -0
- data/fortitude.gemspec +32 -0
- data/fortitude.png +0 -0
- data/lib/fortitude-sass/engine.rb +5 -0
- data/lib/fortitude-sass/generator.rb +80 -0
- data/lib/fortitude-sass/version.rb +3 -0
- data/lib/fortitude-sass.rb +27 -0
- data/lib/tasks/install.rake +20 -0
- data/package.json +24 -0
- metadata +187 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 63f35a2c3be05caf94aaa1df32e27c3f5d9bbf59
|
4
|
+
data.tar.gz: 104240afcecd8a834b26b69fe2b94df1750a3e44
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: eb19a0f19c1166661a2ede820870d9dc379a6ef9eb95928a7138b0043bb4c1335a29d00d116ad45f6d051ffc7c9889b60c37202b6e7f70bc904e5b1716c10515
|
7
|
+
data.tar.gz: af726f7d48abdf7008779cefe88674651e2098bf6d50946e0803b225523580b6292f79a8ab7d51889bf60bbb91f1c24bf114ea024805da67c3004d73c32f9cac
|
data/.gitignore
ADDED
data/.npmignore
ADDED
data/.scss-lint.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
fortitude-sass (0.2.2)
|
5
|
+
autoprefixer-rails
|
6
|
+
sass
|
7
|
+
thor
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: http://rubygems.org/
|
11
|
+
specs:
|
12
|
+
aruba (0.6.0)
|
13
|
+
childprocess (>= 0.3.6)
|
14
|
+
cucumber (>= 1.1.1)
|
15
|
+
rspec-expectations (>= 2.7.0)
|
16
|
+
autoprefixer-rails (2.2.0.20140727)
|
17
|
+
execjs
|
18
|
+
builder (3.2.2)
|
19
|
+
childprocess (0.5.3)
|
20
|
+
ffi (~> 1.0, >= 1.0.11)
|
21
|
+
cucumber (1.3.16)
|
22
|
+
builder (>= 2.1.2)
|
23
|
+
diff-lcs (>= 1.1.3)
|
24
|
+
gherkin (~> 2.12)
|
25
|
+
multi_json (>= 1.7.5, < 2.0)
|
26
|
+
multi_test (>= 0.1.1)
|
27
|
+
diff-lcs (1.2.5)
|
28
|
+
execjs (2.2.1)
|
29
|
+
ffi (1.9.3)
|
30
|
+
gherkin (2.12.2)
|
31
|
+
multi_json (~> 1.3)
|
32
|
+
multi_json (1.10.1)
|
33
|
+
multi_test (0.1.1)
|
34
|
+
rake (10.3.2)
|
35
|
+
rspec-expectations (3.0.3)
|
36
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
37
|
+
rspec-support (~> 3.0.0)
|
38
|
+
rspec-support (3.0.3)
|
39
|
+
sass (3.3.14)
|
40
|
+
thor (0.19.1)
|
41
|
+
|
42
|
+
PLATFORMS
|
43
|
+
ruby
|
44
|
+
|
45
|
+
DEPENDENCIES
|
46
|
+
aruba (~> 0.4)
|
47
|
+
fortitude-sass!
|
48
|
+
rake
|
data/README.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
fortitude-sass
|
2
|
+
==============
|
3
|
+
|
4
|
+
Rock Solid CSS Framework
|
5
|
+
|
6
|
+
if you want you can check out our style guide to see how we're using certain fortitude components.
|
7
|
+
|
8
|
+
https://hired.com/library
|
9
|
+
|
10
|
+
|
11
|
+
## Open Source by Hired
|
12
|
+
|
13
|
+
[Hired](https://hired.com/?utm_source=opensource&utm_medium=fortitude&utm_campaign=readme) is a marketplace for top engineering talent to find full-time technology jobs. Talented Ruby developers (like yourself) are in extremely high demand! On Hired, apply once and receive 5 to 15 competing job offers in one week from 800+ technology companies. Average Ruby engineer salaries on Hired are around $120,000 per year!
|
14
|
+
|
15
|
+
<a href="https://hired.com/?utm_source=opensource&utm_medium=fortitude&utm_campaign=readme-banner" target="_blank">
|
16
|
+
<img src="https://dmrxx81gnj0ct.cloudfront.net/public/hired-banner-light-1-728x90.png" alt="Hired" width="728" height="90" align="center"/>
|
17
|
+
</a>
|
18
|
+
|
19
|
+
We are Ruby developers ourselves, and we use all of our open source projects in production. We always encourge forks, pull requests, and issues. Get in touch with the Hired Engineering team at _opensource@hired.com_.
|
@@ -0,0 +1,13 @@
|
|
1
|
+
(function($) {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
$(document).
|
5
|
+
on('close:ft:flashbar', '.flashbar', function() {
|
6
|
+
$(this).remove();
|
7
|
+
}).
|
8
|
+
on('click.ft.flashbar.data-api', '.flashbar__close', function(event) {
|
9
|
+
$(this).closest('.flashbar').trigger('close:ft:flashbar');
|
10
|
+
event.preventDefault();
|
11
|
+
});
|
12
|
+
|
13
|
+
})(jQuery);
|
@@ -0,0 +1,26 @@
|
|
1
|
+
(function($) {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
var $document = $(document);
|
5
|
+
|
6
|
+
function setClassName() {
|
7
|
+
var $this = $(this),
|
8
|
+
className = $this.find(':selected').attr('class') || "",
|
9
|
+
data = $this.data('ft.select') || {};
|
10
|
+
|
11
|
+
if (className !== data.previousClass) {
|
12
|
+
$this.
|
13
|
+
addClass(className).
|
14
|
+
removeClass(data.previousClass).
|
15
|
+
data('ft.select', $.merge({previousClass: className}, data));
|
16
|
+
}
|
17
|
+
|
18
|
+
}
|
19
|
+
|
20
|
+
$document.on('change.ft.select.data-api', 'select:not([multiple])', setClassName);
|
21
|
+
|
22
|
+
$document.on('DOMContentLoaded', function() {
|
23
|
+
$document.find('select').data('ft.select', {previousClass: ""}).each(setClassName);
|
24
|
+
});
|
25
|
+
|
26
|
+
})(jQuery);
|
@@ -0,0 +1,48 @@
|
|
1
|
+
(function($) {
|
2
|
+
'use strict';
|
3
|
+
var $html = $('html');
|
4
|
+
|
5
|
+
function transitionEndOpen() {
|
6
|
+
var $html = $('html');
|
7
|
+
$html.removeClass('html--shade--is-transitioning');
|
8
|
+
}
|
9
|
+
|
10
|
+
function transitionEndClose() {
|
11
|
+
var $html = $('html');
|
12
|
+
$html.removeClass('html--shade--is-transitioning');
|
13
|
+
$(document).trigger('close:ft:shade');
|
14
|
+
}
|
15
|
+
|
16
|
+
$(document).
|
17
|
+
on('open:ft:shade', '.shade', function(event) {
|
18
|
+
if(!$html.hasClass('html--shade--is-active')) {
|
19
|
+
var $this = $(this);
|
20
|
+
|
21
|
+
// set the transitioning class
|
22
|
+
$html.addClass('html--shade--is-transitioning');
|
23
|
+
|
24
|
+
// set additional class in seperate event queue.
|
25
|
+
setTimeout(function() {
|
26
|
+
$html.addClass('html--shade--is-active');
|
27
|
+
}, 0);
|
28
|
+
|
29
|
+
// watch the transitionEnd event to remove the transitioning class.
|
30
|
+
$this.transitionEnd(transitionEndOpen);
|
31
|
+
}
|
32
|
+
}).
|
33
|
+
on('close:ft:shade', '.shade', function(event) {
|
34
|
+
if($html.hasClass('html--shade--is-active')) {
|
35
|
+
var $this = $(this);
|
36
|
+
$html.
|
37
|
+
addClass('html--shade--is-transitioning').
|
38
|
+
removeClass('html--shade--is-active')
|
39
|
+
|
40
|
+
$this.transitionEnd(transitionEndOpen);
|
41
|
+
}
|
42
|
+
}).
|
43
|
+
on('click.ft.shade.data-api', '.shade', function(event) {
|
44
|
+
$(this).trigger('close:ft:shade');
|
45
|
+
event.preventDefault();
|
46
|
+
});
|
47
|
+
|
48
|
+
})(jQuery);
|
@@ -0,0 +1,50 @@
|
|
1
|
+
(function ($) {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
function transitionEnd() {
|
5
|
+
var el = document.createElement('fortitude');
|
6
|
+
|
7
|
+
var transEndEventNames = {
|
8
|
+
WebkitTransition : 'webkitTransitionEnd',
|
9
|
+
MozTransition : 'transitionend',
|
10
|
+
OTransition : 'oTransitionEnd otransitionend',
|
11
|
+
transition : 'transitionend'
|
12
|
+
};
|
13
|
+
|
14
|
+
for (var name in transEndEventNames) {
|
15
|
+
if (el.style[name] !== undefined) {
|
16
|
+
return { end: transEndEventNames[name] };
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
return false;
|
21
|
+
}
|
22
|
+
|
23
|
+
function parseTansitionDuration(duration) {
|
24
|
+
var split = duration.split(/(ms|s)/, 2);
|
25
|
+
var result = split[1] === "ms" ? parseFloat(split[0]) : parseFloat(split[0]) * 1000;
|
26
|
+
return result || 0;
|
27
|
+
}
|
28
|
+
|
29
|
+
|
30
|
+
$.support.transition = transitionEnd()
|
31
|
+
|
32
|
+
$.fn.transitionEnd = function (callback) {
|
33
|
+
var self = this;
|
34
|
+
var called = false;
|
35
|
+
var $this = $(self);
|
36
|
+
var duration = parseTansitionDuration(getComputedStyle($this.get(0), null).transitionDuration);
|
37
|
+
var _callback = function () {
|
38
|
+
called = true;
|
39
|
+
$this.off($.support.transition.end, _callback);
|
40
|
+
if (timeoutId) {
|
41
|
+
clearTimeout(timeoutId);
|
42
|
+
}
|
43
|
+
|
44
|
+
callback.apply(self, arguments);
|
45
|
+
};
|
46
|
+
$this.on($.support.transition.end, _callback);
|
47
|
+
var timeoutId = setTimeout(_callback, duration);
|
48
|
+
};
|
49
|
+
|
50
|
+
})(jQuery);
|
@@ -0,0 +1,7 @@
|
|
1
|
+
(function($) {
|
2
|
+
// zoom fix on input elements
|
3
|
+
var $viewport = $('meta[name="viewport"]');
|
4
|
+
$(document).on('focus blur', ':input', function(event) {
|
5
|
+
$viewport.attr('content', 'width=device-width,initial-scale=1,maximum-scale=' + (event.type === 'focusout' || event.type === 'blur' ? 5 : 1));
|
6
|
+
});
|
7
|
+
})(jQuery);
|
@@ -0,0 +1,45 @@
|
|
1
|
+
(function($) {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
$(document).on('click.ft.flashbar.data-api', '.flashbar__close', function(event) {
|
5
|
+
var $this = $(this);
|
6
|
+
|
7
|
+
$this.closest('.flashbar').remove();
|
8
|
+
|
9
|
+
event.preventDefault();
|
10
|
+
|
11
|
+
});
|
12
|
+
|
13
|
+
})(jQuery);
|
14
|
+
|
15
|
+
(function($) {
|
16
|
+
'use strict';
|
17
|
+
// select placeholder polyfill
|
18
|
+
$(document).on('change.ft.select.data-api', 'select:not([multiple])', function(event) {
|
19
|
+
var $this = $(this),
|
20
|
+
optionClassName = $this.find(':selected').attr('class'),
|
21
|
+
lastOptionClassName = $this.data('lastOptionClassName');
|
22
|
+
|
23
|
+
if (optionClassName !== lastOptionClassName) {
|
24
|
+
$this.addClass(optionClassName);
|
25
|
+
$this.removeClass(lastOptionClassName);
|
26
|
+
$this.data('lastOptionClassName', optionClassName || '');
|
27
|
+
}
|
28
|
+
|
29
|
+
event.preventDefault();
|
30
|
+
|
31
|
+
});
|
32
|
+
|
33
|
+
setTimeout(function() {
|
34
|
+
$(document).find('.select-input').trigger('change');
|
35
|
+
}, 0);
|
36
|
+
|
37
|
+
})(jQuery);
|
38
|
+
|
39
|
+
(function($) {
|
40
|
+
// zoom fix on input elements
|
41
|
+
var $viewport = $('meta[name="viewport"]');
|
42
|
+
$(document).on('focus blur', ':input', function(event) {
|
43
|
+
$viewport.attr('content', 'width=device-width,initial-scale=1,maximum-scale=' + (event.type === 'focusout' || event.type === 'blur' ? 5 : 1));
|
44
|
+
});
|
45
|
+
})(jQuery);
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
#HORIZONTAL RULE
|
3
|
+
\*------------------------------------*/
|
4
|
+
|
5
|
+
hr {
|
6
|
+
border-top: halve($fortitude-base-spacing-unit) - 0.1rem solid transparent;
|
7
|
+
border-bottom: 0.1rem solid;
|
8
|
+
border-right-color: transparent;
|
9
|
+
border-left-color: transparent;
|
10
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
#IMAGES
|
3
|
+
\*------------------------------------*/
|
4
|
+
|
5
|
+
/**
|
6
|
+
* 1. Fluid images for responsive purposes.
|
7
|
+
* 2. Offset `alt` text from surrounding copy.
|
8
|
+
* 3. fix 2px pseudo margin with vertical-align.
|
9
|
+
*/
|
10
|
+
img {
|
11
|
+
max-width: 100%; /* [1] */
|
12
|
+
font-style: italic; /* [2] */
|
13
|
+
vertical-align: middle; /* [3] */
|
14
|
+
}
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
/**
|
21
|
+
* If a `width` and/or `height` attribute have been explicitly defined, let’s
|
22
|
+
* not make the image fluid.
|
23
|
+
*/
|
24
|
+
img[width],
|
25
|
+
img[height] {
|
26
|
+
max-width: none;
|
27
|
+
}
|
28
|
+
|
29
|
+
|
30
|
+
img.responsive {
|
31
|
+
width: 100%;
|
32
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
#PAGE
|
3
|
+
\*------------------------------------*/
|
4
|
+
|
5
|
+
/**
|
6
|
+
* High-, page-level styling.
|
7
|
+
*
|
8
|
+
* 1. Set the default `font-size` and `line-height` for the entire project,
|
9
|
+
* sourced from our default variables. The `font-size` is calculated to exist
|
10
|
+
* in ems, the `line-height` is calculated to exist unitlessly.
|
11
|
+
* 2. Force scrollbars to always be visible to prevent awkward ‘jumps’ when
|
12
|
+
* navigating between pages that do/do not have enough content to produce
|
13
|
+
* scrollbars naturally.
|
14
|
+
* 3. Ensure the page always fills at least the entire height of the viewport.
|
15
|
+
*/
|
16
|
+
html {
|
17
|
+
font-size: $fortitude-base-rem-font-size; /* [1] */
|
18
|
+
line-height: $fortitude-base-line-height / $fortitude-base-font-size; /* [1] */
|
19
|
+
background-color: $fortitude-base-background-color;
|
20
|
+
color: $fortitude-base-color;
|
21
|
+
overflow-y: scroll; /* [2] */
|
22
|
+
min-height: 100%; /* [3] */
|
23
|
+
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
24
|
+
}
|
25
|
+
|
26
|
+
body {
|
27
|
+
@include fortitude-font-size($fortitude-base-font-size, true);
|
28
|
+
}
|
@@ -0,0 +1,141 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
#BADGE
|
3
|
+
\*------------------------------------*/
|
4
|
+
|
5
|
+
/**
|
6
|
+
* A simple badge object.
|
7
|
+
*/
|
8
|
+
|
9
|
+
// Predefine the variables below in order to alter and enable specific features.
|
10
|
+
$fortitude-badge-height: $fortitude-base-spacing-unit * 1.3 !default;
|
11
|
+
$fortitude-badge-height--small: $fortitude-base-spacing-unit !default;
|
12
|
+
$fortitude-badge-height--large: double($fortitude-base-spacing-unit) !default;
|
13
|
+
$fortitude-badge-font-size: $fortitude-base-font-size !default;
|
14
|
+
|
15
|
+
$fortitude-badge-border-width: 0.1rem !default;
|
16
|
+
$fortitude-badge-border-style: solid !default;
|
17
|
+
$fortitude-badge-border-radius: 0 !default;
|
18
|
+
|
19
|
+
$fortitude-enable-badge--small: false !default;
|
20
|
+
$fortitude-enable-badge--large: false !default;
|
21
|
+
$fortitude-enable-badge--pill: false !default;
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
@mixin fortitude-badge($extension: null) {
|
28
|
+
/**
|
29
|
+
* 1. Allow us to style box model properties.
|
30
|
+
* 2. Line different sized badges up with text.
|
31
|
+
* 3. Make badges inherit font styles (often necessary when styling `input`s as
|
32
|
+
* badges).
|
33
|
+
* 4. Reset/normalize some styles.
|
34
|
+
* 6. Fixes odd inner spacing in IE7.
|
35
|
+
* 7. Subtract the border size from the padding value so that badges do not
|
36
|
+
* grow larger as we add borders.
|
37
|
+
* 8. Set badge text to nowrap.
|
38
|
+
*/
|
39
|
+
display: inline-block; /* [1] */
|
40
|
+
vertical-align: middle; /* [2] */
|
41
|
+
font: inherit; /* [3] */
|
42
|
+
text-align: center; /* [4] */
|
43
|
+
font-size: $fortitude-badge-font-size;
|
44
|
+
margin: -0.2rem 0 0; /* [4] */
|
45
|
+
height: $fortitude-badge-height;
|
46
|
+
overflow: visible; /* [6] */
|
47
|
+
white-space: nowrap; /* [8] */
|
48
|
+
line-height: $fortitude-base-line-height;
|
49
|
+
|
50
|
+
@if ($extension == small) {
|
51
|
+
@include fortitude-badge--small;
|
52
|
+
} @else if ($extension == large) {
|
53
|
+
@include fortitude-badge--large;
|
54
|
+
} @else {
|
55
|
+
padding: fortitude-block-padding($fortitude-badge-height, $fortitude-badge-border-width) quarter($fortitude-base-spacing-unit); /* [7] */
|
56
|
+
}
|
57
|
+
|
58
|
+
@if($fortitude-badge-border-width != 0) {
|
59
|
+
border: $fortitude-badge-border-width $fortitude-badge-border-style transparent;
|
60
|
+
} @else {
|
61
|
+
border: 0; /* [4] */
|
62
|
+
}
|
63
|
+
|
64
|
+
@if ($extension == pill) {
|
65
|
+
@include fortitude-badge--pill;
|
66
|
+
} @else if($fortitude-badge-border-radius != 0) {
|
67
|
+
border-radius: $fortitude-badge-border-radius;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
@mixin fortitude-badge--small {
|
72
|
+
padding: fortitude-block-padding($fortitude-badge-height--small, $fortitude-badge-border-width) quarter($fortitude-base-spacing-unit); /* [7] */
|
73
|
+
}
|
74
|
+
|
75
|
+
@mixin fortitude-badge--large {
|
76
|
+
padding: fortitude-block-padding($fortitude-badge-height--large, $fortitude-badge-border-width) quarter($fortitude-base-spacing-unit); /* [7] */
|
77
|
+
@if ($fortitude-block-height > $fortitude-block-line-height) {
|
78
|
+
line-height: ceil($fortitude-block-height / $fortitude-block-line-height) * $fortitude-block-line-height;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
@mixin fortitude-badge--pill {
|
83
|
+
/**
|
84
|
+
* 1. Overly-large value to ensure the radius rounds the whole end of the
|
85
|
+
* badge.
|
86
|
+
*/
|
87
|
+
|
88
|
+
border-radius: 10rem; /* [1] */
|
89
|
+
}
|
90
|
+
|
91
|
+
.#{$fortitude-namespace}badge {
|
92
|
+
@include fortitude-badge;
|
93
|
+
}
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
@if ($fortitude-enable-badge--small == true) {
|
100
|
+
|
101
|
+
/**
|
102
|
+
* Small badges.
|
103
|
+
*/
|
104
|
+
|
105
|
+
.#{$fortitude-namespace}badge--small {
|
106
|
+
@include fortitude-badge--small;
|
107
|
+
}
|
108
|
+
|
109
|
+
}
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
@if ($fortitude-enable-badge--large == true) {
|
116
|
+
|
117
|
+
/**
|
118
|
+
* Large badges.
|
119
|
+
*/
|
120
|
+
|
121
|
+
.#{$fortitude-namespace}badge--large {
|
122
|
+
@include fortitude-badge--large;
|
123
|
+
}
|
124
|
+
|
125
|
+
}
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
@if ($fortitude-enable-badge--pill == true) {
|
132
|
+
|
133
|
+
/**
|
134
|
+
* Round-ended badges.
|
135
|
+
*/
|
136
|
+
|
137
|
+
.#{$fortitude-namespace}badge--pill {
|
138
|
+
@include fortitude-badge--pill;
|
139
|
+
}
|
140
|
+
|
141
|
+
}
|