fortitude-sass 0.4.9 → 0.5.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/.gitignore +6 -5
- data/Gemfile.lock +1 -1
- data/app/assets/stylesheets/fortitude/base/_hr.scss +7 -7
- data/app/assets/stylesheets/fortitude/base/_images.scss +10 -12
- data/app/assets/stylesheets/fortitude/base/_lists.scss +6 -8
- data/app/assets/stylesheets/fortitude/base/_page.scss +14 -10
- data/app/assets/stylesheets/fortitude/blocks/_badge.scss +28 -137
- data/app/assets/stylesheets/fortitude/blocks/_bare-list.scss +0 -12
- data/app/assets/stylesheets/fortitude/blocks/_block-list.scss +20 -74
- data/app/assets/stylesheets/fortitude/blocks/_box.scss +1 -27
- data/app/assets/stylesheets/fortitude/blocks/_button.scss +38 -219
- data/app/assets/stylesheets/fortitude/blocks/_container.scss +2 -50
- data/app/assets/stylesheets/fortitude/blocks/_flag.scss +113 -397
- data/app/assets/stylesheets/fortitude/blocks/_flashbar.scss +0 -18
- data/app/assets/stylesheets/fortitude/blocks/_fluid-container.scss +2 -11
- data/app/assets/stylesheets/fortitude/blocks/_inline-list.scss +3 -15
- data/app/assets/stylesheets/fortitude/blocks/_input.scss +14 -355
- data/app/assets/stylesheets/fortitude/blocks/_layout.scss +77 -263
- data/app/assets/stylesheets/fortitude/blocks/_list-navigation.scss +6 -29
- data/app/assets/stylesheets/fortitude/blocks/_media.scss +104 -265
- data/app/assets/stylesheets/fortitude/blocks/_modal.scss +2 -2
- data/app/assets/stylesheets/fortitude/blocks/_navigationbar.scss +26 -43
- data/app/assets/stylesheets/fortitude/blocks/_shade.scss +2 -21
- data/app/assets/stylesheets/fortitude/blocks/_table.scss +11 -21
- data/app/assets/stylesheets/fortitude/blocks/_tabs-navigation.scss +8 -51
- data/app/assets/stylesheets/fortitude/blocks/_tabs.scss +1 -13
- data/app/assets/stylesheets/fortitude/blocks/_text.scss +7 -7
- data/app/assets/stylesheets/fortitude/blocks/_tooltip.scss +1 -171
- data/app/assets/stylesheets/fortitude/blocks/_ui-list.scss +20 -88
- data/app/assets/stylesheets/fortitude/blocks/_wings.scss +27 -28
- data/app/assets/stylesheets/fortitude/generic/_box-sizing.scss +8 -11
- data/app/assets/stylesheets/fortitude/generic/_clearfix.scss +1 -1
- data/app/assets/stylesheets/fortitude/generic/_normalize.scss +2 -4
- data/app/assets/stylesheets/fortitude/generic/_reset.scss +5 -32
- data/app/assets/stylesheets/fortitude/settings/_defaults.scss +15 -33
- data/app/assets/stylesheets/fortitude/tools/_functions.scss +57 -60
- data/app/assets/stylesheets/fortitude/tools/_mixins.scss +38 -35
- data/app/assets/stylesheets/fortitude/trumps/_responsive-border.scss +25 -32
- data/app/assets/stylesheets/fortitude/trumps/_responsive-column.scss +18 -19
- data/app/assets/stylesheets/fortitude/trumps/_responsive-display.scss +2 -9
- data/app/assets/stylesheets/fortitude/trumps/_responsive-float.scss +10 -10
- data/app/assets/stylesheets/fortitude/trumps/_responsive-font.scss +11 -9
- data/app/assets/stylesheets/fortitude/trumps/_responsive-height.scss +8 -6
- data/app/assets/stylesheets/fortitude/trumps/_responsive-line-height.scss +11 -10
- data/app/assets/stylesheets/fortitude/trumps/_responsive-margin.scss +88 -127
- data/app/assets/stylesheets/fortitude/trumps/_responsive-padding.scss +45 -62
- data/app/assets/stylesheets/fortitude/trumps/_responsive-text.scss +12 -13
- data/app/assets/stylesheets/fortitude/trumps/_screen-lock.scss +1 -1
- data/app/assets/stylesheets/fortitude.scss +24 -0
- data/bower.json +1 -1
- data/lib/fortitude-sass/version.rb +1 -1
- metadata +2 -13
- data/app/assets/stylesheets/fortitude/theme/base/_page.scss +0 -19
- data/app/assets/stylesheets/fortitude/theme/extensions/_badge.scss +0 -7
- data/app/assets/stylesheets/fortitude/theme/extensions/_box.scss +0 -13
- data/app/assets/stylesheets/fortitude/theme/extensions/_button.scss +0 -7
- data/app/assets/stylesheets/fortitude/theme/extensions/_flashbar.scss +0 -6
- data/app/assets/stylesheets/fortitude/theme/extensions/_navigationbar.scss +0 -50
- data/app/assets/stylesheets/fortitude/theme/extensions/_text.scss +0 -5
- data/app/assets/stylesheets/fortitude/theme/extensions/_wings.scss +0 -9
- data/app/assets/stylesheets/fortitude/theme/settings/_colors.scss +0 -53
- data/app/assets/stylesheets/fortitude/theme/settings/_defaults.scss +0 -5
- data/app/assets/stylesheets/fortitude/theme.scss +0 -11
@@ -1,97 +1,29 @@
|
|
1
|
-
/*------------------------------------*\
|
2
|
-
#UI-LIST
|
3
|
-
\*------------------------------------*/
|
4
|
-
|
5
|
-
/**
|
6
|
-
* The UI list object creates blocky list items with a keyline separator out of
|
7
|
-
* a `ul` or `ol`.
|
8
|
-
*/
|
9
|
-
|
10
|
-
// Predefine the variables below in order to alter and enable specific features.
|
11
|
-
$fortitude-ui-list-padding: $fortitude-base-spacing-unit !default;
|
12
|
-
$fortitude-ui-list-padding--small: halve($fortitude-ui-list-padding) !default;
|
13
|
-
$fortitude-ui-list-padding--large: double($fortitude-ui-list-padding) !default;
|
14
|
-
|
15
|
-
$fortitude-ui-list-border-width: 0.1rem !default;
|
16
|
-
$fortitude-ui-list-border-style: solid !default;
|
17
|
-
$fortitude-ui-list-border-color: #ccc !default;
|
18
|
-
|
19
|
-
$fortitude-enable-ui-list--small: false !default;
|
20
|
-
$fortitude-enable-ui-list--large: false !default;
|
21
|
-
|
22
|
-
@mixin fortitude-ui-list {
|
23
|
-
border: 0 $fortitude-ui-list-border-style $fortitude-ui-list-border-color;
|
24
|
-
margin: 0;
|
25
|
-
padding: 0;
|
26
|
-
list-style: none;
|
27
|
-
border-top-width: $fortitude-ui-list-border-width;
|
28
|
-
}
|
29
|
-
|
30
|
-
@mixin fortitude-ui-list__item($extension: null) {
|
31
|
-
border: 0 $fortitude-ui-list-border-style $fortitude-ui-list-border-color;
|
32
|
-
border-bottom-width: $fortitude-ui-list-border-width;
|
33
|
-
|
34
|
-
@if ($extension == small) {
|
35
|
-
@include fortitude-ui-list--small__item;
|
36
|
-
} @else if ($extension == large) {
|
37
|
-
@include fortitude-ui-list--large__item;
|
38
|
-
} @else {
|
39
|
-
padding: $fortitude-ui-list-padding;
|
40
|
-
}
|
41
|
-
}
|
42
|
-
|
43
|
-
@mixin fortitude-ui-list--small__item {
|
44
|
-
padding: $fortitude-ui-list-padding--small;
|
45
|
-
}
|
46
|
-
|
47
|
-
@mixin fortitude-ui-list--large__item {
|
48
|
-
padding: $fortitude-ui-list-padding--large;
|
49
|
-
}
|
50
|
-
|
51
|
-
|
52
1
|
.#{$fortitude-namespace}ui-list {
|
53
|
-
|
2
|
+
@include fortitude-ui-list;
|
54
3
|
}
|
55
4
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
@if ($fortitude-enable-ui-list--small == true) {
|
65
|
-
|
66
|
-
/**
|
67
|
-
* Small ui-lists.
|
68
|
-
*/
|
69
|
-
|
70
|
-
.#{$fortitude-namespace}ui-list--small {
|
71
|
-
|
72
|
-
> .#{$fortitude-namespace}ui-list__item {
|
73
|
-
@include fortitude-ui-list--small__item;
|
74
|
-
}
|
5
|
+
.#{$fortitude-namespace}ui-list__item {
|
6
|
+
@include fortitude-ui-list__item;
|
7
|
+
}
|
75
8
|
|
9
|
+
@if $fortitude-enable-ui-list--small == true {
|
10
|
+
/**
|
11
|
+
* Small ui-lists.
|
12
|
+
**/
|
13
|
+
.#{$fortitude-namespace}ui-list--small {
|
14
|
+
> .#{$fortitude-namespace}ui-list__item {
|
15
|
+
@include fortitude-ui-list--small__item;
|
76
16
|
}
|
77
|
-
|
17
|
+
}
|
78
18
|
}
|
79
19
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
* Large ui-lists.
|
88
|
-
*/
|
89
|
-
|
90
|
-
.#{$fortitude-namespace}ui-list--large {
|
91
|
-
|
92
|
-
> .#{$fortitude-namespace}ui-list__item {
|
93
|
-
@include fortitude-ui-list--large__item;
|
94
|
-
}
|
95
|
-
|
20
|
+
@if $fortitude-enable-ui-list--large == true {
|
21
|
+
/**
|
22
|
+
* Large ui-lists.
|
23
|
+
**/
|
24
|
+
.#{$fortitude-namespace}ui-list--large {
|
25
|
+
> .#{$fortitude-namespace}ui-list__item {
|
26
|
+
@include fortitude-ui-list--large__item;
|
96
27
|
}
|
28
|
+
}
|
97
29
|
}
|
@@ -1,43 +1,42 @@
|
|
1
|
-
|
1
|
+
.#{$fortitude-namespace}wings {
|
2
2
|
display: table;
|
3
3
|
width: 100%;
|
4
|
+
}
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
.#{$fortitude-namespace}wings__target {
|
7
|
+
display: table-cell;
|
8
|
+
vertical-align: middle;
|
9
|
+
white-space: nowrap;
|
10
|
+
width: 0.1rem;
|
11
|
+
padding: 0 double($fortitude-base-spacing-unit);
|
12
|
+
}
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
}
|
14
|
+
.#{$fortitude-namespace}wings__wing {
|
15
|
+
position: relative;
|
16
|
+
display: inline-block;
|
17
|
+
height: 100%;
|
18
|
+
width: 100%;
|
19
|
+
&::before {
|
20
|
+
content: '';
|
21
|
+
vertical-align: middle;
|
22
|
+
position: absolute;
|
23
|
+
height: 0.5rem;
|
24
|
+
top: -0.1rem;
|
25
|
+
left: 0;
|
26
|
+
right: 0;
|
27
|
+
bottom: 0;
|
28
|
+
margin: auto;
|
29
29
|
}
|
30
30
|
}
|
31
31
|
|
32
|
-
|
33
|
-
|
32
|
+
.#{$fortitude-namespace}wings--thin {
|
33
|
+
.#{$fortitude-namespace}wings__wing {
|
34
34
|
&::before {
|
35
35
|
height: 0.1rem;
|
36
36
|
}
|
37
37
|
}
|
38
38
|
}
|
39
39
|
|
40
|
-
|
40
|
+
.#{$fortitude-namespace}wings__target--narrow {
|
41
41
|
padding: 0 $fortitude-base-spacing-unit;
|
42
42
|
}
|
43
|
-
|
@@ -4,20 +4,17 @@
|
|
4
4
|
|
5
5
|
/**
|
6
6
|
* Set the global `box-sizing` state to `border-box`.
|
7
|
-
|
7
|
+
**/
|
8
8
|
* {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
&,
|
10
|
+
&:before,
|
11
|
+
&:after {
|
12
|
+
-webkit-box-sizing: border-box;
|
13
|
+
-moz-box-sizing: border-box;
|
14
|
+
box-sizing: border-box;
|
15
|
+
}
|
16
16
|
}
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
18
|
// If we have included this file, set a variable to tell the rest of the
|
22
19
|
// framework that global `box-sizing: border-box` has been set.
|
23
20
|
$fortitude-global-border-box: true;
|
@@ -158,13 +158,11 @@ input {
|
|
158
158
|
}
|
159
159
|
}
|
160
160
|
&[type="search"] {
|
161
|
-
|
162
|
-
@if ($fortitude-global-border-box == false) {
|
161
|
+
@if $fortitude-global-border-box == false {
|
163
162
|
-webkit-appearance: textfield;
|
164
163
|
-moz-box-sizing: content-box;
|
165
164
|
box-sizing: content-box;
|
166
165
|
}
|
167
|
-
|
168
166
|
&::-webkit-search-cancel-button, &::-webkit-search-decoration {
|
169
167
|
-webkit-appearance: none;
|
170
168
|
}
|
@@ -197,4 +195,4 @@ table {
|
|
197
195
|
|
198
196
|
td, th {
|
199
197
|
padding: 0;
|
200
|
-
}
|
198
|
+
}
|
@@ -5,7 +5,7 @@
|
|
5
5
|
/**
|
6
6
|
* As well as using normalize.css, it is often advantageous to remove all
|
7
7
|
* margins from certain elements.
|
8
|
-
|
8
|
+
**/
|
9
9
|
body,
|
10
10
|
h1, h2, h3, h4, h5, h6,
|
11
11
|
p, blockquote, pre,
|
@@ -13,41 +13,14 @@ dl, dd, ol, ul,
|
|
13
13
|
form, fieldset, legend,
|
14
14
|
table, th, td, caption,
|
15
15
|
hr, figure {
|
16
|
-
|
17
|
-
|
16
|
+
margin: 0;
|
17
|
+
padding: 0;
|
18
18
|
}
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
20
|
/**
|
25
21
|
* Give a help cursor to elements that give extra info on `:hover`.
|
26
|
-
|
22
|
+
**/
|
27
23
|
abbr[title],
|
28
24
|
dfn[title] {
|
29
|
-
|
25
|
+
cursor: help;
|
30
26
|
}
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
/**
|
37
|
-
* Remove underlines from potentially troublesome elements.
|
38
|
-
*/
|
39
|
-
// u,
|
40
|
-
// ins {
|
41
|
-
// text-decoration: none;
|
42
|
-
// }
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
/**
|
49
|
-
* Apply faux underlines to inserted text via `border-bottom`.
|
50
|
-
*/
|
51
|
-
// ins {
|
52
|
-
// border-bottom: 0.1rem solid;
|
53
|
-
// }
|
@@ -6,53 +6,35 @@
|
|
6
6
|
// adjusted, you should redfine the variables in your own overrides file and
|
7
7
|
// include it in your project before this file.
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
9
|
/**
|
14
10
|
* High-level base settings.
|
15
11
|
* 1. Make sure to change the breakpoints in blocks/_container.scss
|
16
12
|
* if you change $fortitude-breakpoints.
|
17
|
-
|
18
|
-
|
19
|
-
$fortitude-app-id: fortitude !default;
|
20
|
-
$fortitude-base-font-size: 1.2rem !default;
|
21
|
-
$fortitude-base-line-height: 2rem !default;
|
22
|
-
$fortitude-base-color: #333 !default;
|
23
|
-
$fortitude-base-background-color: #fff !default;
|
24
|
-
$fortitude-class-breakpoints: (
|
25
|
-
xs: null,
|
26
|
-
sm: 768px,
|
27
|
-
md: 992px,
|
28
|
-
lg: 1200px
|
29
|
-
) !default; /* [1] */
|
30
|
-
$fortitude-breakpoints: (
|
31
|
-
xs: (max-width: 767px),
|
32
|
-
sm: (min-width: 768px, max-width: 991px),
|
33
|
-
md: (min-width: 992px, max-width: 1199px),
|
34
|
-
lg: (min-width: 1200px)
|
35
|
-
) !default; /* [1] */
|
36
|
-
|
13
|
+
**/
|
37
14
|
|
15
|
+
$fortitude-app-id: fortitude !default;
|
16
|
+
$fortitude-base-font-size: 1.2rem !default;
|
17
|
+
$fortitude-base-line-height: 2rem !default;
|
18
|
+
$fortitude-base-color: #333 !default;
|
19
|
+
$fortitude-base-background-color: #fff !default;
|
20
|
+
$fortitude-class-breakpoints: (xs: null, sm: 768px, md: 992px, lg: 1200px) !default;
|
38
21
|
|
22
|
+
/* [1] */
|
23
|
+
$fortitude-breakpoints: (xs: (max-width: 767px), sm: (min-width: 768px, max-width: 991px), md: (min-width: 992px, max-width: 1199px), lg: (min-width: 1200px)) !default;
|
39
24
|
|
25
|
+
/* [1] */
|
40
26
|
|
41
27
|
// Namespace.
|
42
28
|
//
|
43
29
|
// Would you like Fortitude’ classes to be prepended with a namespace? If so,
|
44
30
|
// define it here.
|
45
|
-
$fortitude-namespace:
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
31
|
+
$fortitude-namespace: null !default;
|
50
32
|
|
51
33
|
// These variables are framework variables, sourced from variables defined
|
52
34
|
// above. Feel free to use these variables throughout your project, but do not
|
53
35
|
// modify or reassign them.
|
54
36
|
|
55
|
-
$fortitude-base-spacing-unit:
|
56
|
-
$fortitude-base-spacing-unit--small:
|
57
|
-
$fortitude-base-spacing-unit--large:
|
58
|
-
$fortitude-base-rem-font-size:
|
37
|
+
$fortitude-base-spacing-unit: $fortitude-base-line-height;
|
38
|
+
$fortitude-base-spacing-unit--small: round($fortitude-base-line-height / 2);
|
39
|
+
$fortitude-base-spacing-unit--large: round($fortitude-base-line-height * 2);
|
40
|
+
$fortitude-base-rem-font-size: 0.625rem;
|
@@ -5,10 +5,6 @@
|
|
5
5
|
// fortitude makes use of a few functions that are also available for you to use
|
6
6
|
// later on in your extension of the framework.
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
8
|
// Maths helpers.
|
13
9
|
//
|
14
10
|
// Halve and double numbers, returning rounded integers. E.g.:
|
@@ -18,98 +14,99 @@
|
|
18
14
|
// }
|
19
15
|
//
|
20
16
|
@function quarter($fortitude-value) {
|
21
|
-
|
17
|
+
@return $fortitude-value / 4;
|
22
18
|
}
|
23
19
|
|
24
20
|
@function halve($fortitude-value) {
|
25
|
-
|
21
|
+
@return $fortitude-value / 2;
|
26
22
|
}
|
27
23
|
|
28
24
|
@function double($fortitude-value) {
|
29
|
-
|
25
|
+
@return $fortitude-value * 2;
|
30
26
|
}
|
31
27
|
|
32
28
|
@function quadruple($fortitude-value) {
|
33
|
-
|
29
|
+
@return $fortitude-value * 4;
|
34
30
|
}
|
35
31
|
|
36
|
-
|
37
32
|
@function fortitude-strip-unit($fortitude-value) {
|
38
33
|
@return $fortitude-value / ($fortitude-value * 0 + 1);
|
39
34
|
}
|
40
35
|
|
41
36
|
@function fortitude-px-to-rem($fortitude-value) {
|
42
|
-
|
37
|
+
@return fortitude-strip-unit($fortitude-value) * 0.1rem;
|
43
38
|
}
|
44
39
|
|
45
40
|
@function fortitude-rem-to-px($fortitude-value) {
|
46
|
-
|
41
|
+
@return fortitude-strip-unit($fortitude-value) * 10px;
|
47
42
|
}
|
48
43
|
|
49
44
|
@function fortitude-block-spacing-unit-height($fortitude-block-height, $fortitude-block-spacing-unit: $fortitude-base-spacing-unit) {
|
50
|
-
|
51
|
-
|
45
|
+
$fortitude-value: ceil($fortitude-block-height / $fortitude-block-spacing-unit) * $fortitude-block-spacing-unit;
|
46
|
+
@return $fortitude-value;
|
52
47
|
}
|
53
48
|
|
54
49
|
@function fortitude-block-spacing-unit-delta($fortitude-block-height, $fortitude-block-spacing-unit: $fortitude-base-spacing-unit) {
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
50
|
+
$fortitude-block-spacing-unit-height: fortitude-block-spacing-unit-height($fortitude-block-height, $fortitude-block-spacing-unit);
|
51
|
+
$fortitude-value: halve($fortitude-block-spacing-unit-height - $fortitude-block-height);
|
52
|
+
// normalize value 0rem to 0.
|
53
|
+
@if fortitude-strip-unit($fortitude-value) == 0 {
|
54
|
+
$fortitude-value: 0;
|
55
|
+
}
|
56
|
+
@return $fortitude-value;
|
61
57
|
}
|
62
58
|
|
63
59
|
@function fortitude-block-negitive-padding($fortitude-block-height, $fortitude-block-border-width: 0rem, $fortitude-block-spacing-unit: $fortitude-base-spacing-unit) {
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
60
|
+
$fortitude-value: halve($fortitude-block-height - $fortitude-block-spacing-unit - double($fortitude-block-border-width));
|
61
|
+
// normalize value 0rem to 0.
|
62
|
+
@if $fortitude-value > 0 {
|
63
|
+
$fortitude-value: 0;
|
64
|
+
}
|
65
|
+
@return $fortitude-value;
|
69
66
|
}
|
70
67
|
|
71
68
|
@function fortitude-block-margin($fortitude-block-height, $fortitude-block-border-width: 0rem, $fortitude-block-spacing-unit: $fortitude-base-spacing-unit) {
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
69
|
+
$fortitude-block-spacing-unit-height: fortitude-block-spacing-unit-height($fortitude-block-height, $fortitude-block-spacing-unit);
|
70
|
+
$fortitude-value: halve($fortitude-block-spacing-unit-height - $fortitude-block-height);
|
71
|
+
@if $fortitude-value < 0 {
|
72
|
+
$fortitude-value: fortitude-block-negitive-padding($fortitude-block-height, $fortitude-block-border-width, $fortitude-block-spacing-unit) + fortitude-block-spacing-unit-delta($fortitude-block-height, $fortitude-block-spacing-unit);
|
73
|
+
}
|
74
|
+
// normalize value 0rem to 0.
|
75
|
+
@if fortitude-strip-unit($fortitude-value) == 0 {
|
76
|
+
$fortitude-value: 0;
|
77
|
+
}
|
78
|
+
@return $fortitude-value;
|
82
79
|
}
|
83
80
|
|
84
81
|
@function fortitude-block-padding($fortitude-block-height, $fortitude-block-border-width: 0rem, $fortitude-block-line-height: $fortitude-base-line-height) {
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
82
|
+
$fortitude-value: halve($fortitude-block-height - $fortitude-block-line-height - double($fortitude-block-border-width));
|
83
|
+
// normalize value 0rem to 0.
|
84
|
+
@if $fortitude-value <= 0 {
|
85
|
+
$fortitude-value: 0;
|
86
|
+
}
|
87
|
+
@return $fortitude-value;
|
90
88
|
}
|
91
89
|
|
92
|
-
@function fortitude-map-to-query($map) {
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
}
|
99
|
-
$query: str-insert($query, $part, str-length($query)+1);
|
90
|
+
@function fortitude-map-to-query($fortitude-map) {
|
91
|
+
$fortitude-query: "";
|
92
|
+
@for $fortitude-index from 1 through length($fortitude-map) {
|
93
|
+
$fortitude-query-part: "(#{nth(nth($fortitude-map, $fortitude-index), 1)}:#{nth(nth($fortitude-map, $fortitude-index), 2)})";
|
94
|
+
@if $fortitude-index != length($fortitude-map) {
|
95
|
+
$fortitude-query-part: str-insert($fortitude-query-part, " and ", str-length($fortitude-query-part) + 1);
|
100
96
|
}
|
101
|
-
|
97
|
+
$fortitude-query: str-insert($fortitude-query, $fortitude-query-part, str-length($fortitude-query) + 1);
|
98
|
+
}
|
99
|
+
@return $fortitude-query;
|
102
100
|
}
|
103
101
|
|
104
|
-
@function fortitude-query($object) {
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
}
|
102
|
+
@function fortitude-query($fortitude-object) {
|
103
|
+
@if type-of($fortitude-object) == map {
|
104
|
+
@return fortitude-map-to-query($fortitude-object);
|
105
|
+
}
|
106
|
+
@else if type-of($fortitude-object) == number {
|
107
|
+
@return fortitude-map-to-query((min-width: $fortitude-object));
|
108
|
+
}
|
109
|
+
@else {
|
110
|
+
@return null;
|
111
|
+
}
|
112
|
+
}
|