fortitude-sass 0.6.1 → 0.6.3

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.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/app/assets/stylesheets/fortitude/api/blocks/_badge.scss +32 -54
  4. data/app/assets/stylesheets/fortitude/api/blocks/_bare-list.scss +1 -5
  5. data/app/assets/stylesheets/fortitude/api/blocks/_block-list.scss +17 -19
  6. data/app/assets/stylesheets/fortitude/api/blocks/_box.scss +13 -12
  7. data/app/assets/stylesheets/fortitude/api/blocks/_button.scss +28 -79
  8. data/app/assets/stylesheets/fortitude/api/blocks/_container.scss +11 -7
  9. data/app/assets/stylesheets/fortitude/api/blocks/_flag.scss +67 -140
  10. data/app/assets/stylesheets/fortitude/api/blocks/_flashbar.scss +2 -2
  11. data/app/assets/stylesheets/fortitude/api/blocks/_fluid-container.scss +1 -1
  12. data/app/assets/stylesheets/fortitude/api/blocks/_inline-list.scss +2 -2
  13. data/app/assets/stylesheets/fortitude/api/blocks/_input.scss +178 -160
  14. data/app/assets/stylesheets/fortitude/api/blocks/_layout.scss +103 -62
  15. data/app/assets/stylesheets/fortitude/api/blocks/_list-navigation.scss +3 -3
  16. data/app/assets/stylesheets/fortitude/api/blocks/_media.scss +74 -32
  17. data/app/assets/stylesheets/fortitude/api/blocks/_modal.scss +0 -1
  18. data/app/assets/stylesheets/fortitude/api/blocks/_navigationbar.scss +0 -1
  19. data/app/assets/stylesheets/fortitude/api/blocks/_shade.scss +1 -7
  20. data/app/assets/stylesheets/fortitude/api/blocks/_tabs-navigation.scss +9 -24
  21. data/app/assets/stylesheets/fortitude/api/blocks/_tabs.scss +8 -2
  22. data/app/assets/stylesheets/fortitude/api/blocks/_text.scss +0 -1
  23. data/app/assets/stylesheets/fortitude/api/blocks/_tooltip.scss +52 -21
  24. data/app/assets/stylesheets/fortitude/api/blocks/_ui-list.scss +17 -22
  25. data/app/assets/stylesheets/fortitude/api/blocks/_wings.scss +0 -1
  26. data/app/assets/stylesheets/fortitude/base/_lists.scss +2 -9
  27. data/app/assets/stylesheets/fortitude/blocks/_box.scss +0 -4
  28. data/app/assets/stylesheets/fortitude/blocks/_flag.scss +67 -59
  29. data/app/assets/stylesheets/fortitude/blocks/_input.scss +10 -7
  30. data/app/assets/stylesheets/fortitude/blocks/_layout.scss +8 -8
  31. data/app/assets/stylesheets/fortitude/blocks/_media.scss +36 -27
  32. data/app/assets/stylesheets/fortitude/blocks/_navigationbar.scss +22 -0
  33. data/app/assets/stylesheets/fortitude/blocks/_ui-list.scss +2 -2
  34. data/app/assets/stylesheets/fortitude/tools/_functions.scss +4 -0
  35. data/bower.json +1 -1
  36. data/lib/fortitude-sass/version.rb +1 -1
  37. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2a5adc340645e6f1b280f8bbe346363c9ebd0a4a
4
- data.tar.gz: 3567c40cb455d91631853935536a023a7052b927
3
+ metadata.gz: 731bcb5d145e27096d45146dde3e1b8272451234
4
+ data.tar.gz: 0e989205a6f18e1a951fc7953110038510b84ca2
5
5
  SHA512:
6
- metadata.gz: b17e6ed930db0c7cb436a3170bac1a5e5393399913cfcbe43a2055e8d9f7c4f33c823f5758711b01da7e89a18bb27fe5fffd2284fd0cb17f91763795c6f141fb
7
- data.tar.gz: 5ae75c9818639223b65478b262c721aadbff7da4f97485bfefe036116053388e02f7d75edea23fe46fa6d93e3fe3443c3d461915391792b31ac551643f9ac04a
6
+ metadata.gz: a4ce4346cfff8519f5d0ca811359cdc73ee8c01f658ea1cff4c6334be56aa36dcd694630124efe351787897c97aff90de1fa35d8d1a075d95b755a4a772ea2cf
7
+ data.tar.gz: d398abbed8870bfb4ddc4b76867f6cb9f7d86517adb663913b6c9e0359d18beda869cd6c8b73fc8292e034a43b3c5db60a064ae50ed1215ff9d78fcdab008939
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fortitude-sass (0.6.1)
4
+ fortitude-sass (0.6.3)
5
5
  autoprefixer-rails
6
6
  execjs
7
7
  sass (~> 3.3)
@@ -13,7 +13,7 @@ GEM
13
13
  autoprefixer-rails (5.1.7)
14
14
  execjs
15
15
  json
16
- execjs (2.3.0)
16
+ execjs (2.4.0)
17
17
  json (1.8.2)
18
18
  rake (10.4.2)
19
19
  sass (3.4.13)
@@ -2,96 +2,74 @@
2
2
  #BADGE
3
3
  \*------------------------------------*/
4
4
 
5
- /**
6
- * A simple badge object.
7
- **/
5
+ $fortitude-badge-border-radius: 0 !default;
6
+ $fortitude-badge-border-style: solid !default;
7
+ $fortitude-badge-border-width: 0 !default;
8
+ $fortitude-badge-font-size: $fortitude-base-font-size !default;
9
+
10
+ $fortitude-badge-height--default: $fortitude-base-spacing-unit * 1.3 !default;
11
+ $fortitude-badge-horizontal-padding--default: 1rem !default;
8
12
 
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
13
  $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
+ $fortitude-badge-horizontal-padding--small: 0.5rem !default;
14
15
 
15
- $fortitude-badge-border-width: 0 !default;
16
- $fortitude-badge-border-style: solid !default;
17
- $fortitude-badge-border-radius: 0 !default;
16
+ $fortitude-badge-height--large: double($fortitude-base-spacing-unit) !default;
17
+ $fortitude-badge-horizontal-padding--large: 2rem !default;
18
18
 
19
19
  $fortitude-enable-badge--small: false !default;
20
20
  $fortitude-enable-badge--large: false !default;
21
21
  $fortitude-enable-badge--pill: false !default;
22
22
 
23
- @mixin fortitude-badge($fortitude-extension: null) {
24
- /**
25
- * 1. Allow us to style box model properties.
26
- * 2. Line different sized badges up a little nicer.
27
- * 3. Make badges inherit font styles (often necessary when styling `input`s as
28
- * badges).
29
- * 4. Reset/normalize some styles.
30
- * 5. Fixes odd inner spacing in IE7.
31
- * 6. Subtract the border size from the padding value so that badges do not
32
- * grow larger as we add borders.
33
- * 7. Set badge text to nowrap.
34
- **/
23
+ @mixin fortitude-badge($extensions: ()) {
24
+ $is-small: fortitude-contains($extensions, small);
25
+ $is-large: fortitude-contains($extensions, large);
26
+ $is-pill: fortitude-contains($extensions, pill);
27
+
35
28
  border: $fortitude-badge-border-width $fortitude-badge-border-style transparent;
36
29
  display: inline-block;
37
- /* [1] */
38
30
  vertical-align: middle;
39
- /* [2] */
40
31
  font: inherit;
41
- /* [3] */
42
32
  background-color: transparent;
43
- /* [4] */
44
33
  text-align: center;
45
- /* [4] */
46
34
  font-size: $fortitude-badge-font-size;
47
- height: $fortitude-badge-height;
35
+ height: $fortitude-badge-height--default;
48
36
  overflow: visible;
49
- /* [5] */
50
37
  white-space: nowrap;
51
- /* [7] */
52
- line-height: $fortitude-base-line-height;
53
- @if $fortitude-extension == small {
38
+
39
+ @if $is-small {
54
40
  @include fortitude-badge--small;
55
- }
56
- @else if $fortitude-extension == large {
41
+ } @else if $is-large {
57
42
  @include fortitude-badge--large;
43
+ } @else {
44
+ margin: fortitude-block-margin($fortitude-badge-height--default, $fortitude-badge-border-width) 0;
45
+ padding: fortitude-block-padding($fortitude-badge-height--default, $fortitude-badge-border-width) $fortitude-badge-horizontal-padding--default;
58
46
  }
59
- @else {
60
- margin: fortitude-block-margin($fortitude-badge-height, $fortitude-badge-border-width) 0;
61
- /* [4] */
62
- padding: fortitude-block-padding($fortitude-badge-height, $fortitude-badge-border-width) quarter($fortitude-base-spacing-unit);
63
- /* [6] */
47
+
48
+ @if not $is-large {
49
+ line-height: $fortitude-base-line-height;
64
50
  }
65
- @if $fortitude-extension == pill {
51
+
52
+ @if $is-pill {
66
53
  @include fortitude-badge--pill;
67
- }
68
- @else if $fortitude-badge-border-radius != 0 {
54
+ } @else if $fortitude-badge-border-radius != 0 {
69
55
  border-radius: $fortitude-badge-border-radius;
70
56
  }
71
57
  }
72
58
 
73
59
  @mixin fortitude-badge--small {
74
60
  margin: fortitude-block-margin($fortitude-badge-height--small, $fortitude-badge-border-width) 0;
75
- /* [4] */
76
- padding: fortitude-block-padding($fortitude-badge-height--small, $fortitude-badge-border-width) quarter($fortitude-base-spacing-unit);
77
- /* [6] */
61
+ padding: fortitude-block-padding($fortitude-badge-height--small, $fortitude-badge-border-width) $fortitude-badge-horizontal-padding--small;
78
62
  }
79
63
 
80
64
  @mixin fortitude-badge--large {
81
65
  margin: fortitude-block-margin($fortitude-badge-height--large, $fortitude-badge-border-width) 0;
82
- /* [4] */
83
- padding: fortitude-block-padding($fortitude-badge-height--large, $fortitude-badge-border-width) quarter($fortitude-base-spacing-unit);
84
- /* [6] */
66
+ padding: fortitude-block-padding($fortitude-badge-height--large, $fortitude-badge-border-width) $fortitude-badge-horizontal-padding--large;
67
+
85
68
  @if $fortitude-block-height > $fortitude-block-line-height {
86
69
  line-height: ceil($fortitude-block-height / $fortitude-block-line-height) * $fortitude-block-line-height;
87
70
  }
88
71
  }
89
72
 
90
73
  @mixin fortitude-badge--pill {
91
- /**
92
- * 1. Overly-large value to ensure the radius rounds the whole end of the
93
- * badge.
94
- **/
95
- border-radius: 10rem;
96
- /* [1] */
74
+ border-radius: 100rem;
97
75
  }
@@ -2,11 +2,7 @@
2
2
  #BARE-LIST
3
3
  \*------------------------------------*/
4
4
 
5
- /**
6
- * The bare-list object simply removes any indents and bullet points from lists.
7
- **/
8
-
9
- @mixin fortitude-bare-list {
5
+ @mixin fortitude-bare-list($extensions: ()) {
10
6
  list-style: none;
11
7
  margin: 0;
12
8
  padding: 0;
@@ -2,40 +2,38 @@
2
2
  #BLOCK-LIST
3
3
  \*------------------------------------*/
4
4
 
5
- /**
6
- * The block list object creates blocky list items out of a `ul` or `ol`.
7
- **/
5
+ $fortitude-block-list-padding--default: $fortitude-base-spacing-unit !default;
8
6
 
9
- // Predefine the variables below in order to alter and enable specific features.
10
- $fortitude-block-list-padding: $fortitude-base-spacing-unit !default;
11
- $fortitude-block-list-padding--small: halve($fortitude-block-list-padding) !default;
12
- $fortitude-block-list-padding--large: double($fortitude-block-list-padding) !default;
7
+ $fortitude-block-list-padding--small: halve($fortitude-block-list-padding--default) !default;
8
+
9
+ $fortitude-block-list-padding--large: double($fortitude-block-list-padding--default) !default;
13
10
 
14
11
  $fortitude-enable-block-list--small: false !default;
15
12
  $fortitude-enable-block-list--large: false !default;
16
13
 
17
- @mixin fortitude-block-list {
14
+ @mixin fortitude-block-list($extensions: ()) {
18
15
  margin: 0;
19
16
  padding: 0;
20
17
  list-style: none;
21
18
  }
22
19
 
23
- @mixin fortitude-block-list__item($fortitude-extension: null) {
24
- @if $fortitude-extension == small {
25
- @include fortitude-block-list--small__item;
26
- }
27
- @else if $fortitude-extension == large {
28
- @include fortitude-block-list--large__item;
29
- }
30
- @else {
31
- padding: $fortitude-block-list-padding;
20
+ @mixin fortitude-block-list__item($extensions: ()) {
21
+ $is-small: fortitude-contains($extensions, small);
22
+ $is-large: fortitude-contains($extensions, large);
23
+
24
+ @if $is-small {
25
+ @include fortitude-block-list__item--small;
26
+ } @else if $is-large {
27
+ @include fortitude-block-list__item--large;
28
+ } @else {
29
+ padding: $fortitude-block-list-padding--default;
32
30
  }
33
31
  }
34
32
 
35
- @mixin fortitude-block-list--small__item {
33
+ @mixin fortitude-block-list__item--small {
36
34
  padding: $fortitude-block-list-padding--small;
37
35
  }
38
36
 
39
- @mixin fortitude-block-list--large__item {
37
+ @mixin fortitude-block-list__item--large {
40
38
  padding: $fortitude-block-list-padding--large;
41
39
  }
@@ -2,22 +2,23 @@
2
2
  #BOX
3
3
  \*------------------------------------*/
4
4
 
5
- /**
6
- * The box object simply boxes off content.
7
- **/
8
- // Predefine the variables below in order to alter and enable specific features.
9
- $fortitude-box-border-width: 0 !default;
10
5
  $fortitude-box-border-style: solid !default;
6
+ $fortitude-box-border-width: 0 !default;
7
+
11
8
  $fortitude-box-border-radius--rounded: 0.2rem !default;
12
9
 
13
- @mixin fortitude-box {
14
- /**
15
- * 1. So we can apply the `.box` class to naturally-inline elements.
16
- * 2. So we can style the border colors in our extensions.
17
- **/
10
+ @mixin fortitude-box($extensions: ()) {
11
+ $is-rounded: fortitude-contains($extensions, rounded);
12
+
18
13
  @include fortitude-clearfix;
19
14
  display: block;
20
- /* [1] */
21
15
  border: $fortitude-box-border-width $fortitude-box-border-style transparent;
22
- /* [2] */
16
+
17
+ @if $is-rounded {
18
+ @include fortitude-box--rounded;
19
+ }
20
+ }
21
+
22
+ @mixin fortitude-box--rounded {
23
+ border-radius: $fortitude-box-border-radius--rounded;
23
24
  }
@@ -2,19 +2,16 @@
2
2
  #BUTTON
3
3
  \*------------------------------------*/
4
4
 
5
- /**
6
- * A simple button object.
7
- **/
8
-
9
- // Predefine the variables below in order to alter and enable specific features.
10
- $fortitude-button-border-width: 0 !default;
11
- $fortitude-button-border-style: solid !default;
12
5
  $fortitude-button-border-radius: 0.2rem !default;
6
+ $fortitude-button-border-style: solid !default;
7
+ $fortitude-button-border-width: 0 !default;
8
+
9
+ $fortitude-button-height--default: $fortitude-base-spacing-unit + 1.6rem !default;
10
+ $fortitude-button-horizontal-padding--default: fortitude-block-padding($fortitude-button-height--default, $fortitude-button-border-width) * 2 !default;
13
11
 
14
- $fortitude-button-height: $fortitude-base-spacing-unit + 1.6rem !default;
15
- $fortitude-button-horizontal-padding: fortitude-block-padding($fortitude-button-height, $fortitude-button-border-width) * 2 !default;
16
12
  $fortitude-button-height--small: $fortitude-base-spacing-unit + 1rem !default;
17
13
  $fortitude-button-horizontal-padding--small: fortitude-block-padding($fortitude-button-height--small, $fortitude-button-border-width) * 2 !default;
14
+
18
15
  $fortitude-button-height--large: double($fortitude-base-spacing-unit) + 2rem !default;
19
16
  $fortitude-button-horizontal-padding--large: fortitude-block-padding($fortitude-button-height--large, $fortitude-button-border-width) * 2 !default;
20
17
 
@@ -23,133 +20,85 @@ $fortitude-enable-button--large: false !default;
23
20
  $fortitude-enable-button--full: false !default;
24
21
  $fortitude-enable-button--pill: false !default;
25
22
 
26
- // Here we set a variable assuming that `box-sizing: border-box;` is not set
27
- // globally. If it has been previously been defined, the following variable will
28
- // be overriden and will be set to `true`.
29
23
  $fortitude-global-border-box: false !default;
30
24
 
31
- @mixin fortitude-button($fortitude-extension: null) {
32
- /**
33
- * 1. Allow us to style box model properties.
34
- * 2. Line different sized buttons up a little nicer.
35
- * 3. Make buttons inherit font styles (often necessary when styling `input`s as
36
- * buttons).
37
- * 4. Reset/normalize some styles.
38
- * 5. Force all button-styled elements to appear clickable.
39
- * 6. Fixes odd inner spacing in IE7.
40
- * 7. Subtract the border size from the padding value so that buttons do not
41
- * grow larger as we add borders.
42
- * 8. Set badge text to nowrap.
43
- * 9. set position: relative in case if button has a `button__target`
44
- * the position of the target will be inside of the button.
45
- * 10. Required to combine fluid widths and fixed gutters.
46
- **/
25
+ @mixin fortitude-button($extensions: ()) {
26
+ $is-small: fortitude-contains($extensions, small);
27
+ $is-large: fortitude-contains($extensions, large);
28
+ $is-full: fortitude-contains($extensions, full);
29
+ $is-pill: fortitude-contains($extensions, pill);
30
+
47
31
  background-color: transparent;
48
32
  border: $fortitude-button-border-width $fortitude-button-border-style transparent;
49
33
  display: inline-block;
50
- /* [1] */
51
34
  vertical-align: middle;
52
- /* [2] */
53
35
  font: inherit;
54
- /* [3] */
55
36
  font-size: $fortitude-base-font-size;
56
37
  text-align: center;
57
- /* [4] */
58
38
  cursor: pointer;
59
- /* [5] */
60
39
  overflow: visible;
61
- /* [6] */
62
40
  white-space: nowrap;
63
- /* [8] */
64
41
  position: relative;
65
- /* [9] */
66
- @if $fortitude-extension == small {
42
+
43
+ @if $is-small {
67
44
  @include fortitude-button--small;
68
- }
69
- @else if $fortitude-extension == large {
45
+ } @else if $is-large {
70
46
  @include fortitude-button--large;
47
+ } @else {
48
+ margin: fortitude-block-margin($fortitude-button-height--default, $fortitude-button-border-width) 0;
49
+ padding: fortitude-block-padding($fortitude-button-height--default, $fortitude-button-border-width) $fortitude-button-horizontal-padding--default;
71
50
  }
72
- @else {
73
- margin: fortitude-block-margin($fortitude-button-height, $fortitude-button-border-width) 0;
74
- /* [4] */
75
- padding: fortitude-block-padding($fortitude-button-height, $fortitude-button-border-width) $fortitude-button-horizontal-padding;
76
- /* [7] */
51
+
52
+ @if $is-full {
53
+ @include fortitude-button--full;
77
54
  }
78
- @if $fortitude-extension == pill {
55
+
56
+ @if $is-pill {
79
57
  @include fortitude-button--pill;
80
58
  }
81
- @else if $fortitude-button-border-radius != 0 {
82
- border-radius: $fortitude-button-border-radius;
83
- }
84
- @if $fortitude-extension == full {
85
- @include fortitude-button--full;
86
- }
59
+
87
60
  @if $fortitude-global-border-box == false {
88
61
  box-sizing: border-box;
89
- /* [10] */
90
62
  }
63
+
91
64
  &,
92
65
  &:hover,
93
66
  &:active,
94
67
  &:focus,
95
68
  &:visited {
96
69
  text-decoration: none;
97
- /* [4] */
98
70
  }
71
+
99
72
  &::-moz-focus-inner {
100
- /**
101
- * Fix a Firefox bug whereby `input type="submit"` gains 0.2rem extra padding.
102
- **/
103
73
  border: 0;
104
74
  padding: 0;
105
75
  }
106
76
  }
107
77
 
108
78
  @mixin fortitude-button--small {
109
- /**
110
- * 1. Reset/normalize some styles.
111
- * 2. Subtract the border size from the padding value so that buttons do not
112
- * grow larger as we add borders.
113
- **/
114
79
  margin: fortitude-block-margin($fortitude-button-height--small, $fortitude-button-border-width) 0;
115
- /* [1] */
116
80
  padding: fortitude-block-padding($fortitude-button-height--small, $fortitude-button-border-width) $fortitude-button-horizontal-padding--small;
117
- /* [2] */
118
81
  }
119
82
 
120
83
  @mixin fortitude-button--large {
121
- /**
122
- * 1. Reset/normalize some styles.
123
- * 2. Subtract the border size from the padding value so that buttons do not
124
- * grow larger as we add borders.
125
- **/
126
84
  margin: fortitude-block-margin($fortitude-button-height--large, $fortitude-button-border-width) 0;
127
- /* [1] */
128
85
  padding: fortitude-block-padding($fortitude-button-height--large, $fortitude-button-border-width) $fortitude-button-horizontal-padding--large;
129
- /* [2] */
130
86
  }
131
87
 
132
88
  @mixin fortitude-button--full {
133
89
  width: 100%;
90
+
134
91
  @if $fortitude-global-border-box == false {
135
- /**
136
- * Remove paddings so that widths and paddings don’t conflict.
137
- **/
138
92
  padding-right: 0;
139
93
  padding-left: 0;
140
94
  }
141
95
  }
142
96
 
143
97
  @mixin fortitude-button--pill {
144
- /**
145
- * 1. Overly-large value to ensure the radius rounds the whole end of the
146
- * button.
147
- **/
148
98
  border-radius: 10rem;
149
- /* [1] */
150
99
  }
151
100
 
152
- @mixin fortitude-button__target {
101
+ @mixin fortitude-button__target($extensions: ()) {
153
102
  position: absolute;
154
103
  opacity: 0;
155
104
  border: 0;