stipe 0.0.5.0 → 0.0.5.1

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.
data/readme.md CHANGED
@@ -12,6 +12,9 @@ To use the Stipe gem, using Bundler `gem 'stipe'`
12
12
  Stipe is a Compass Extension, so Compass is set as a depdency. You will need to include `require 'stipe'` in your config.rb file.
13
13
 
14
14
  # Stipe Changelog
15
+ ## 0.0.5.1
16
+ * Adding new configutation support for form UI
17
+
15
18
  ## 0.0.5.0
16
19
  * Updated stipe manifest to allow for single import
17
20
 
@@ -8,22 +8,36 @@ $input_disabled_text: lighten($input_disabled, 50%) !default;
8
8
 
9
9
  $form_field_background_color: $white !default;
10
10
  $form_field_focus_color: $white !default;
11
- $form_field_fail_bkg: $white !default;
11
+ $form_field_fail_bkg: $alpha_color_juliet !default;
12
12
 
13
13
  $form_field_border: $charlie_gray !default;
14
- $form_field_border_fail: $alpha_color !default;
14
+ $form_field_border_fail: $alpha_color_echo !default;
15
15
  $form_field_focus_border_color: $charlie_gray !default;
16
+ $form_field_border_radius: $standard_round_corner !default;
16
17
 
17
18
  $form_field_text: $primary_text !default;
18
- $error_text: $alpha_color !default;
19
- $form_field_fail: $alpha_color !default;
20
- $form_field_text_fail: $alpha_color !default;
21
- $instructional_text: $charlie_gray !default;
22
- $placeholder_text: $hotel_gray !default;
19
+ //$error_text: $alpha_color !default; //not used!?
20
+ //$form_field_fail: $alpha_color !default; //not used!?
21
+ $form_field_text_fail: $alpha_color_echo !default;
22
+ $form_field_height: 35 !default;
23
+ $form_field_padding: 6 !default;
24
+
23
25
  $form_label_color: $alpha_gray !default;
24
26
  $form_label_weight: bold !default;
25
- $form_field_height: 3em !default;
26
- $form_field_padding: 6 !default;
27
+ $form_label_lineheight: 20 !default;
28
+ $optional_field_text_color: $delta_gray !default;
29
+
30
+ $instructional_text: $charlie_gray !default;
31
+
32
+ $placeholder_text: $hotel_gray !default;
33
+
34
+ $inline_alert_weight: bold !default;
35
+ $inline_alert_lineheight: 30 !default;
36
+ $inline_alert_left_padding: 12 !default;
37
+ $inline_alert_bkg_color: $alpha_color_delta !default;
38
+ $inline_alert_text_color: $white !default;
39
+ $inline_alert_top_margin: 12 !default;
40
+ $inline_alert_border_width: 1 !default;
27
41
 
28
42
  @import "forms/mixins";
29
43
  @import "forms/extends";
@@ -7,58 +7,38 @@
7
7
  // disabled input fields
8
8
  // ------------------------------------------------------------
9
9
  %disabled_inputs {
10
- background-color: $input_disabled_bkg;
11
- border-color: $input_disabled_border;
12
- color: $input_disabled_text;
13
- &:hover {
14
- border-color: $input_disabled_border;
15
- }
10
+ @include disabled_inputs;
16
11
  }
17
12
 
18
13
  // form labels
19
14
  // ------------------------------------------------------------
20
15
  %form_labels {
21
- display: block;
22
- font-weight: $form_label_weight;
23
- line-height: em(20);
24
- color: $form_label_color;
25
- span {
26
- padding-left: .25em;
27
- font-weight: normal;
28
- }
29
- fieldset & {
30
- @include grid(12,12, $grid_uom:percent);
31
- }
16
+ @include form_labels;
32
17
  }
33
18
 
34
19
  // default error
35
20
  // ------------------------------------------------------------
36
21
  %fail {
37
- border-color: $form_field_border_fail !important;
38
- color: $form_field_text_fail !important;
39
- input & {
40
- background: $form_field_fail_bkg;
41
- }
42
- &:focus {
43
- background: $form_field_fail_bkg !important;
44
- }
45
- select, input[type="text"], input[type="date"] {
46
- background: $form_field_fail_bkg;
47
- border-color: $form_field_border_fail;
48
- color: $form_field_text_fail;
49
- @include input_placeholder($form_field_text_fail);
50
- &:focus {
51
- background: $form_field_fail_bkg;
52
- }
53
- }
54
- &:after {
55
- background: $form_field_fail_bkg;
56
- border-color: $form_field_border_fail;
57
- }
22
+ @include fail;
58
23
  }
59
24
 
25
+ // instructional text
26
+ // ------------------------------------------------------------
27
+ %instructional {
28
+ @include instructional;
29
+ }
30
+
31
+ // inline form alert UI
32
+ // ------------------------------------------------------------
33
+ %inline_alert {
34
+ @include inline_alert;
35
+ }
36
+
37
+
60
38
  // notification alerts / panels
61
39
  // ------------------------------------------------------------
40
+ // these extend need to be refactored for use
41
+ // see mixin as well
62
42
  %default_alert_panel {
63
43
  @include alert_boxes ($alert_background_color, 10, 14, 10);
64
44
  }
@@ -73,13 +53,12 @@
73
53
  color: $white;
74
54
  font-weight: bold;
75
55
  }
56
+ // these extend need to be refactored for use
57
+
76
58
 
77
59
  // form text
78
60
  // ------------------------------------------------------------
79
- %instructional {
80
- color: $instructional_text;
81
- }
82
-
61
+ // These all need to be refacotred to see if they are really necessary
83
62
  %note {
84
63
  @extend %instructional;
85
64
  @include small;
@@ -3,7 +3,8 @@
3
3
  border: 1px solid $form_field_border;
4
4
  background: $form_field_background_color;
5
5
  font-size: em($font-size);
6
- height: $height;
6
+ height: em($height);
7
+ @include border_radius(em($form_field_border_radius));
7
8
  @include grid(12.25, alphaomega, $grid_padding_l:$padding, $grid_padding_r:$padding);
8
9
  @include input_placeholder($placeholder_text);
9
10
 
@@ -14,19 +15,50 @@
14
15
  }
15
16
  }
16
17
 
17
- @mixin field_focus {
18
+ @mixin disabled_inputs {
19
+ background-color: $input_disabled_bkg;
20
+ border-color: $input_disabled_border;
21
+ color: $input_disabled_text;
18
22
  &:hover {
19
- border-color: $form_field_focus_border_color;
23
+ border-color: $input_disabled_border;
24
+ }
25
+ }
26
+
27
+ @mixin fail {
28
+ border-color: $form_field_border_fail !important;
29
+ color: $form_field_text_fail !important;
30
+ input & {
31
+ background: $form_field_fail_bkg;
20
32
  }
21
33
  &:focus {
22
- background-color: $form_field_focus_color;
23
- border-color: $form_field_focus_border_color;
24
- outline: none;
34
+ background: $form_field_fail_bkg !important;
35
+ }
36
+ label {
37
+ color: $form_field_text_fail !important;
38
+ }
39
+ select, input[type="text"], input[type="date"], input[type="password"] {
40
+ background: $form_field_fail_bkg;
41
+ border-color: $form_field_border_fail;
42
+ color: $form_field_text_fail;
43
+ @include input_placeholder($form_field_text_fail);
44
+ &:focus {
45
+ background: $form_field_fail_bkg;
46
+ }
25
47
  }
26
48
  }
27
49
 
50
+ @mixin inline_alert {
51
+ line-height: em($inline_alert_lineheight);
52
+ font-weight: $inline_alert_weight;
53
+ @include border_radius(em($form_field_border_radius));
54
+ border: #{$inline_alert_border_width}px $standard_border_style $form_field_border_fail;
55
+ padding-left: em($inline_alert_left_padding);
56
+ background: $inline_alert_bkg_color;
57
+ color: $inline_alert_text_color;
58
+ margin-top: em($inline_alert_top_margin);
59
+ }
28
60
 
29
-
61
+ // this mixin need to be refactored for use
30
62
  @mixin alert_boxes ($background_color, $padding_tb: $grid_padding_tb, $padding_l: $grid_padding_l, $padding_r: $grid_padding_r, $margin_bottom: 0) {
31
63
  background-color: $background_color;
32
64
  @include grid(12.25, $grid_uom:combo, $grid_child: alphaomega, $grid_padding_l: $padding_l, $grid_padding_r: $padding_r);
@@ -34,3 +66,36 @@
34
66
  padding-bottom: #{$padding_tb / $em}em;
35
67
  margin-bottom: #{$margin_bottom / $em}em;
36
68
  }
69
+
70
+ @mixin field_focus {
71
+ &:hover {
72
+ border-color: $form_field_focus_border_color;
73
+ }
74
+ &:focus {
75
+ background-color: $form_field_focus_color;
76
+ border-color: $form_field_focus_border_color;
77
+ outline: none;
78
+ }
79
+ }
80
+
81
+
82
+ @mixin form_labels {
83
+ display: block;
84
+ font-weight: $form_label_weight;
85
+ line-height: em($form_label_lineheight);
86
+ color: $form_label_color;
87
+ span {
88
+ padding-left: .25em;
89
+ font-weight: normal;
90
+ color: $optional_field_text_color;
91
+ }
92
+ fieldset & {
93
+ @include grid(12, alphaomega);
94
+ }
95
+ }
96
+
97
+ @mixin instructional {
98
+ color: $instructional_text;
99
+ line-height: 1.5em;
100
+ margin-top: 0.5em;
101
+ }
@@ -2,21 +2,21 @@
2
2
  // General font size function that will convert intigers into em values
3
3
  // font-size: em(12);
4
4
  @function em($target, $context: $font_size) {
5
- @return ($target / $context) * 1em;
5
+ @return ($target / $context) * 1em;
6
6
  }
7
7
 
8
8
  @function rem($target, $context: $font_size) {
9
- @return ($target / $context) * 1rem;
9
+ @return ($target / $context) * 1rem;
10
10
  }
11
11
 
12
12
  // Baseline height calculations
13
13
  // line-height: baseline($baseline_size);
14
14
  @function baseline($baseline_size) {
15
- @return ($line / $baseline_size) * ceil($baseline_size / $line) * 1em;
15
+ @return ($line / $baseline_size) * ceil($baseline_size / $line) * 1em;
16
16
  }
17
17
 
18
18
  // Baseline margin calculations
19
19
  // margin-bottom: baseline-margin($baseline_size);
20
20
  @function baseline-margin($baseline_size) {
21
- @return ($line / $baseline_size) * 1em;
21
+ @return ($line / $baseline_size) * 1em;
22
22
  }
@@ -3,7 +3,7 @@
3
3
  Much of your Typography has already been addressed with Toadstool. Simply use [Toadstool's config file](http://goo.gl/PqQSK) to address your `$font_size, $heading_1 - 6, $small_point_size and $large_point_size`. As well designate your `$primary_font_family, $secondary_font_family and $heading_font_family` variables.
4
4
 
5
5
  ##Typography functions
6
- The functions indludes here are the part of Toadstool's design foundation. Functions for calculating `em` and `rem` values as well as calculating baseline heights for vertical rhythm.
6
+ The functions indluded here are the part of Toadstool's design foundation. Functions for calculating `em` and `rem` values as well as calculating baseline heights for vertical rhythm.
7
7
 
8
8
  ##Typography defaults
9
9
  How does this work? Stipe's typography library contains a `_default.scss` file that is carried into the Toadstool project via the [_typograhy.scss](http://goo.gl/1YrDS) file. This file contains the basic bootstrap stylings for `html`, `h1-h6`, `p`, `b`, and `a` tags. Toadstool's [_typography.scss](http://goo.gl/d9yvC) file will mirror the default settings from Stipe. Feel free to edit as necessary, but I have found these pre-defined styles to be pretty stable.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stipe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5.0
4
+ version: 0.0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: