nfg_ui 0.14.6.3 → 0.15.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (22) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_custom.scss +1 -0
  3. data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_check_in.scss +39 -0
  4. data/app/assets/stylesheets/nfg_ui/network_for_good/core/_variables.scss +6 -0
  5. data/app/assets/stylesheets/nfg_ui/network_for_good/core/entity_branding/application.scss +1 -1
  6. data/app/assets/stylesheets/nfg_ui/network_for_good/core/entity_branding/nfg_theme/_badge.scss +2 -2
  7. data/app/assets/stylesheets/nfg_ui/network_for_good/core/entity_branding/nfg_theme/_buttons.scss +24 -23
  8. data/app/assets/stylesheets/nfg_ui/network_for_good/core/entity_branding/nfg_theme/_custom-forms.scss +14 -14
  9. data/app/assets/stylesheets/nfg_ui/network_for_good/core/entity_branding/nfg_theme/_forms.scss +3 -3
  10. data/app/assets/stylesheets/nfg_ui/network_for_good/core/entity_branding/nfg_theme/_functions.scss +0 -13
  11. data/app/assets/stylesheets/nfg_ui/network_for_good/core/entity_branding/nfg_theme/_nav.scss +2 -2
  12. data/app/assets/stylesheets/nfg_ui/network_for_good/core/entity_branding/nfg_theme/_navbar.scss +4 -4
  13. data/app/assets/stylesheets/nfg_ui/network_for_good/core/entity_branding/nfg_theme/_reboot.scss +12 -2
  14. data/app/assets/stylesheets/nfg_ui/network_for_good/core/entity_branding/nfg_theme/_type.scss +5 -5
  15. data/app/assets/stylesheets/nfg_ui/network_for_good/core/entity_branding/nfg_theme/_utilities.scss +3 -3
  16. data/app/assets/stylesheets/nfg_ui/network_for_good/core/entity_branding/nfg_theme/custom/_nav_step.scss +5 -5
  17. data/app/assets/stylesheets/nfg_ui/network_for_good/core/entity_branding/plugins/_datetimepicker.scss +9 -9
  18. data/app/assets/stylesheets/nfg_ui/network_for_good/core/entity_branding/plugins/_select2.scss +4 -4
  19. data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_print.scss +6 -0
  20. data/app/views/nfg_ui/_entity_branding_styles.html.haml +54 -0
  21. data/lib/nfg_ui/version.rb +1 -1
  22. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 070500f7b7f69f086db555b9360f4595253e09eee2ed5ba40d1172d29a769bc3
4
- data.tar.gz: fe8fcbbc2533e246c48ad07c5e1594c81b5a131dba991c6f9c49f88c98a41b07
3
+ metadata.gz: 9b354ba900a6e46b2eda8601e69b7de3f58e05656328c7e28892bf892fbc8dc2
4
+ data.tar.gz: f02ffac702d1686da3d6552e950a40cbb5b83c8e42aec255fb137ce74c6ef0be
5
5
  SHA512:
6
- metadata.gz: 9212b6b7cf44c324e03404703d1bc4107d08a42ca579f95459cb92fb547c36f8084df6390ac5fdec7da2c4cb971f1874d02d87eaa33ed12b6b30c324902ca534
7
- data.tar.gz: ba33f2fe53328addcc063e588c763fad7f36801830b93c08683dde1e3ec106aca09f22da57135320abf77853f89f42ab6e50297a06b7d6dddfc1493cb361dd3c
6
+ metadata.gz: ad68314c9bdb5faf2afda14487120d9f4927b50bc1d1944b22acaa9b8b3d669141b831119a327003543b6880abd2359205937c70b0a97026ef07a355ccddb959
7
+ data.tar.gz: '0972a216ccd1eacb2d43386cc0a574d94a6de43c2037711eb1228adf384c0891302efa40c11a782899d8e7d82713de1b70aa6a1d669d43f0d7c4bc12bb7aef4c'
@@ -3,6 +3,7 @@
3
3
  @import 'custom/bee';
4
4
  @import 'custom/builder_layout';
5
5
  @import 'custom/campaign_card';
6
+ @import 'custom/check_in';
6
7
  @import 'custom/content_section';
7
8
  @import 'custom/custom_questions_questionnaire';
8
9
  @import 'custom/custom_receipt_language';
@@ -0,0 +1,39 @@
1
+ $check-in-header-height: ($spacer * 2.25);
2
+
3
+ // Contains the header fixed to the top of the browser on all devices
4
+ .check-in-header {
5
+ position: fixed;
6
+ top: 0;
7
+ right: 0;
8
+ left: 0;
9
+ z-index: $zindex-fixed + 1;
10
+ border-bottom: $border-width solid $blue-800;
11
+ }
12
+
13
+ // Shared styles between header and title
14
+ .check-in-header, .check-in-title {
15
+ padding: ($spacer * .5);
16
+ background-color: $blue-700;
17
+ }
18
+
19
+ // Container that provides padding to the top of the page to move content below header and above the footer (small devices only)
20
+ .check-in-container {
21
+ padding-top: $check-in-header-height;
22
+ @include media-breakpoint-down(sm) {
23
+ padding-bottom: ($spacer * 5);
24
+ }
25
+ }
26
+
27
+ // Shows the CTAs fixed to the bottom of the browser on small devices
28
+ .check-in-footer {
29
+ @include media-breakpoint-down(sm) {
30
+ position: fixed;
31
+ right: 0;
32
+ bottom: 0;
33
+ left: 0;
34
+ z-index: $zindex-fixed + 1;
35
+ padding: ($spacer * .5);
36
+ border-top: $border-width solid $border-color;
37
+ background-color: $white;
38
+ }
39
+ }
@@ -1,3 +1,9 @@
1
+ //**********
2
+ // NOTE:
3
+ // if $white, $gray-800, or any of the $yiq-* variables are updated,
4
+ // update them here as well: /app/views/nfg_ui/_entity_branding_styles.html.haml
5
+ //**********
6
+
1
7
  // Variables
2
8
  //
3
9
  // Variables should follow the `$component-state-property-size` formula for
@@ -4,13 +4,13 @@
4
4
  @import 'nfg_ui/network_for_good/core/variables';
5
5
 
6
6
  // NFG Theme - listed individually because we need functions and reboot first
7
- @import 'nfg_theme/functions';
8
7
  @import 'nfg_theme/reboot';
9
8
  @import 'nfg_theme/badge';
10
9
  @import 'nfg_theme/buttons';
11
10
  @import 'nfg_theme/custom-forms';
12
11
  @import 'nfg_theme/custom';
13
12
  @import 'nfg_theme/forms';
13
+ @import 'nfg_theme/functions';
14
14
  @import 'nfg_theme/nav';
15
15
  @import 'nfg_theme/navbar';
16
16
  @import 'nfg_theme/type';
@@ -1,5 +1,5 @@
1
1
  // Specific styles for entity branding
2
2
  .badge-primary {
3
- background: scale-color($primary, $lightness: 80%);
4
- border-color: $primary;
3
+ background: var(--brand-primary-scale-light);
4
+ border-color: var(--brand-primary);
5
5
  }
@@ -1,54 +1,55 @@
1
1
  // Specific styles for entity branding
2
+
2
3
  .btn-primary {
3
- color: color-yiq($primary);
4
- background-color: $primary;
5
- border-color: $primary;
4
+ color: var(--brand-primary-yiq);
5
+ background-color: var(--brand-primary);
6
+ border-color: var(--brand-primary);
6
7
  &:hover {
7
- color: color-yiq(darken($primary, 10%));
8
- background-color: darken($primary, 10%);
9
- border-color: darken($primary, 10%);
8
+ color: var(--brand-primary-dark-yiq);
9
+ background-color: var(--brand-primary-dark);
10
+ border-color: var(--brand-primary-dark);
10
11
  }
11
12
  &:focus,
12
13
  &.focus {
13
- box-shadow: 0 0 0 $input-btn-focus-width transparentize($primary, 0.8);
14
+ box-shadow: 0 0 0 $input-btn-focus-width var(--brand-primary-transparent);
14
15
  }
15
16
  &.disabled, &:disabled {
16
- color: color-yiq($primary);
17
- background-color: $primary;
18
- border-color: $primary;
17
+ color: var(--brand-primary-yiq);
18
+ background-color: var(--brand-primary);
19
+ border-color: var(--brand-primary);
19
20
  }
20
21
  &:not(:disabled):not(.disabled):active,
21
22
  &:not(:disabled):not(.disabled).active,
22
23
  .show > &.dropdown-toggle {
23
- color: color-yiq($primary);
24
- background-color: $primary;
25
- border-color: $primary;
26
- box-shadow: 0 0 0 $input-btn-focus-width transparentize($primary, 0.8);
27
- &:focus { box-shadow: 0 0 0 $input-btn-focus-width transparentize($primary, 0.8); }
24
+ color: var(--brand-primary-yiq);
25
+ background-color: var(--brand-primary);
26
+ border-color: var(--brand-primary);
27
+ box-shadow: 0 0 0 $input-btn-focus-width var(--brand-primary-transparent);
28
+ &:focus { box-shadow: 0 0 0 $input-btn-focus-width var(--brand-primary-transparent); }
28
29
  }
29
30
  }
30
31
 
31
32
  .btn-secondary, .btn-outline-secondary {
32
- color: color-yiq($primary, $yiq-text-dark, $primary);
33
- &:hover { color: color-yiq($primary, $yiq-text-dark, $primary) !important; }
33
+ color: var(--brand-primary-yiq-text-dark);
34
+ &:hover { color: var(--brand-primary-yiq-text-dark) !important; }
34
35
  &:not(:disabled):not(.disabled):active,
35
36
  &:not(:disabled):not(.disabled).active,
36
37
  .show > &.dropdown-toggle {
37
- color: color-yiq($primary, $yiq-text-dark, $primary) !important;
38
+ color: var(--brand-primary-yiq-text-dark) !important;
38
39
  }
39
40
  }
40
41
 
41
42
  .btn-link {
42
- color: color-yiq($primary, $yiq-text-dark, $primary);
43
- &:hover { color: color-yiq(darken($primary, 15%), $yiq-text-dark, darken($primary, 15%)); }
44
- &:focus { box-shadow: 0 0 0 $input-btn-focus-width transparentize($primary, 0.8); }
43
+ color: var(--brand-primary-yiq-text-dark);
44
+ &:hover { color: var(--brand-primary-yiq-text-darkest); }
45
+ &:focus { box-shadow: 0 0 0 $input-btn-focus-width var(--brand-primary-transparent); }
45
46
  }
46
47
 
47
48
  .bg-dark {
48
49
  .btn-primary {
49
- h1, h2, h3, h4, h5, h6, p, label { color: color-yiq($primary); }
50
+ h1, h2, h3, h4, h5, h6, p, label { color: var(--brand-primary-yiq); }
50
51
  }
51
52
  .btn-outline-secondary {
52
- h1, h2, h3, h4, h5, h6, p, label { color: color-yiq($primary, $yiq-text-dark, $primary); }
53
+ h1, h2, h3, h4, h5, h6, p, label { color: var(--brand-primary-yiq-text-dark); }
53
54
  }
54
55
  }
@@ -3,42 +3,42 @@
3
3
  .custom-control {
4
4
  .custom-control-input {
5
5
  &:checked {
6
- ~ .custom-control-label, ~ .custom-control-label::before { border-color: $primary; }
6
+ ~ .custom-control-label, ~ .custom-control-label::before { border-color: var(--brand-primary); }
7
7
  ~ .custom-control-label::before {
8
- background-color: $primary;
9
- box-shadow: 0 0 0 ($spacer * .125) transparentize($primary, 0.8);
8
+ background-color: var(--brand-primary);
9
+ box-shadow: 0 0 0 ($spacer * .125) var(--brand-primary-transparent);
10
10
  }
11
11
  }
12
12
  &:not(:disabled):active ~ .custom-control-label::before {
13
- background-color: lighten($primary, 35%);
14
- border-color: lighten($primary, 35%);
13
+ background-color: var(--brand-primary-light);
14
+ border-color: var(--brand-primary-light);
15
15
  }
16
16
  }
17
17
  &.custom-control-block {
18
- .custom-control-input:checked ~ .custom-control-label { box-shadow: 0 0 0 ($spacer * .125) transparentize($primary, 0.8); }
18
+ .custom-control-input:checked ~ .custom-control-label { box-shadow: 0 0 0 ($spacer * .125) var(--brand-primary-transparent); }
19
19
  }
20
20
  }
21
21
 
22
22
  .custom-select {
23
23
  &:active, &:focus {
24
- border-color: $primary;
25
- box-shadow: 0 0 0 ($spacer * .125) transparentize($primary, 0.8);
24
+ border-color: var(--brand-primary);
25
+ box-shadow: 0 0 0 ($spacer * .125) var(--brand-primary-transparent);
26
26
  }
27
27
  }
28
28
 
29
29
  .custom-file-input {
30
30
  &:focus ~ .custom-file-label {
31
- border-color: $primary;
32
- &::after { border-color: $primary; }
31
+ border-color: var(--brand-primary);
32
+ &::after { border-color: var(--brand-primary); }
33
33
  }
34
34
  }
35
35
 
36
36
  .custom-switch {
37
37
  .custom-control-input:checked ~ .custom-control-label {
38
- &::after { border-color: $primary; }
38
+ &::after { border-color: var(--brand-primary); }
39
39
  &::before {
40
- background-color: $primary;
41
- border-color: $primary;
40
+ background-color: var(--brand-primary);
41
+ border-color: var(--brand-primary);
42
42
  }
43
43
  }
44
44
  }
@@ -48,7 +48,7 @@
48
48
  .custom-control-input {
49
49
  .was-validated &:valid {
50
50
  &:checked {
51
- ~ .custom-control-label::before { background-color: $primary; }
51
+ ~ .custom-control-label::before { background-color: var(--brand-primary); }
52
52
  }
53
53
  }
54
54
  }
@@ -1,8 +1,8 @@
1
1
  // Specific styles for entity branding
2
2
  .form-control {
3
3
  &:focus {
4
- border-color: $primary;
5
- box-shadow: 0 0 0 ($spacer * .125) transparentize($primary, 0.8);
4
+ border-color: var(--brand-primary);
5
+ box-shadow: 0 0 0 ($spacer * .125) var(--brand-primary-transparent);
6
6
  }
7
7
  }
8
8
 
@@ -11,6 +11,6 @@
11
11
  .form-control,
12
12
  .custom-select {
13
13
  .was-validated &:valid {
14
- &:focus { border-color: $primary; }
14
+ &:focus { border-color: var(--brand-primary); }
15
15
  }
16
16
  }
@@ -14,16 +14,3 @@
14
14
  @return $light;
15
15
  }
16
16
  }
17
-
18
- // This function replaces the hex color code with proper URL-encoding for color in SVG paths
19
- @function encodecolor($string) {
20
- @if type-of($string) == 'color' {
21
- $hex: str-slice(ie-hex-str($string), 4);
22
- $string:unquote("#{$hex}");
23
- }
24
- $string: '%23' + $string;
25
- @return $string;
26
- }
27
-
28
- // Entity variable for custom select and select2 arrow icons
29
- $custom-select-indicator: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='#{encodecolor($primary)}' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E");
@@ -3,7 +3,7 @@
3
3
  &.flex-column {
4
4
  .nav-link {
5
5
  &:hover, &.active {
6
- &:after { background: $primary; }
6
+ &:after { background: var(--brand-primary); }
7
7
  }
8
8
  }
9
9
  }
@@ -11,7 +11,7 @@
11
11
  .nav-tabs {
12
12
  .nav-link {
13
13
  &:hover, &.active {
14
- &:after { background: $primary; }
14
+ &:after { background: var(--brand-primary); }
15
15
  }
16
16
  }
17
17
  }
@@ -3,16 +3,16 @@
3
3
  .navbar-light {
4
4
  .navbar-brand,
5
5
  .navbar-toggler {
6
- color: color-yiq($primary, $yiq-text-dark, $primary);
7
- &:hover, &:focus { color: color-yiq($primary, $yiq-text-dark, $primary); }
6
+ color: var(--brand-primary-yiq-text-dark);
7
+ &:hover, &:focus { color: var(--brand-primary-yiq-text-dark); }
8
8
  }
9
9
  .navbar-nav {
10
10
  .nav-link {
11
- &:hover, &:focus { color: color-yiq($primary, darken($primary, 10%), $primary); }
11
+ &:hover, &:focus { color: var(--brand-primary-yiq-text-darker); }
12
12
  }
13
13
  .open > .nav-link,
14
14
  .active > .nav-link,
15
15
  .nav-link.open,
16
- .nav-link.active { color: color-yiq($primary, darken($primary, 10%), $primary); }
16
+ .nav-link.active { color: var(--brand-primary-yiq-text-darker); }
17
17
  }
18
18
  }
@@ -1,6 +1,16 @@
1
1
  // Specific styles for entity branding
2
2
 
3
3
  a {
4
- color: color-yiq($primary, $yiq-text-dark, $primary);
5
- &:not(.btn):hover, &:not(.btn):focus { color: darken($primary, 15%) !important; }
4
+ color: var(--brand-primary-yiq-text-dark);
5
+ &:not([class*="btn"], [class*="nav"]) {
6
+ color: var(--brand-primary-yiq-text-dark);
7
+ text-decoration: underline;
8
+ &:hover, &:focus {
9
+ text-decoration: none;
10
+ }
11
+ }
12
+ .bg-dark & {
13
+ color: $white;
14
+ &:hover, &:focus { color: $white; }
15
+ }
6
16
  }
@@ -1,16 +1,16 @@
1
1
  // Specific styles for entity branding
2
2
 
3
3
  a.no-link-color {
4
- &:hover, &:active, &:focus { color: $primary !important; }
4
+ &:hover, &:active, &:focus { color: var(--brand-primary) !important; }
5
5
  }
6
6
 
7
- .text-primary { color: color-yiq($primary, $yiq-text-dark, $primary) !important; }
7
+ .text-primary { color: var(--brand-primary-yiq-text-dark) !important; }
8
8
 
9
9
  a.text-primary {
10
- color: color-yiq($primary, darken($primary, 15%), $primary) !important;
11
- &:hover, &:focus { color: darken($primary, 15%) !important; }
10
+ color: var(--brand-primary-yiq-text-darker) !important;
11
+ &:hover, &:focus { color: var(--brand-primary-dark) !important; }
12
12
  }
13
13
 
14
14
  .bg-dark {
15
- .text-primary { color: color-yiq($primary, $primary, $yiq-text-light) !important; }
15
+ .text-primary { color: var(--brand-primary-yiq-text-light) !important; }
16
16
  }
@@ -1,8 +1,8 @@
1
1
  // Specific styles for entity branding
2
2
 
3
3
  .bg-primary {
4
- color: color-yiq($primary) !important;
5
- background-color: $primary !important;
4
+ color: var(--brand-primary-yiq) !important;
5
+ background-color: var(--brand-primary) !important;
6
6
  }
7
7
 
8
- .border-primary { border-color: $primary !important; }
8
+ .border-primary { border-color: var(--brand-primary) !important; }
@@ -5,16 +5,16 @@
5
5
  .nav-item {
6
6
 
7
7
  &.visited, &.active {
8
- &::before { background-color: $primary; }
8
+ &::before { background-color: var(--brand-primary); }
9
9
  .step-indicator {
10
- color: color-yiq($primary);
11
- background-color: $primary;
12
- border-color: $primary;
10
+ color: var(--brand-primary-yiq);
11
+ background-color: var(--brand-primary);
12
+ border-color: var(--brand-primary);
13
13
  }
14
14
  }
15
15
 
16
16
  .step-indicator {
17
- &::after { box-shadow: 0 0 0 ($spacer * .25) transparentize($primary, 0.8); }
17
+ &::after { box-shadow: 0 0 0 ($spacer * .25) var(--brand-primary-transparent); }
18
18
  }
19
19
  }
20
20
  }
@@ -8,8 +8,8 @@
8
8
  .next,
9
9
  .timepicker-picker a.btn {
10
10
  &:hover, &:active, &.active {
11
- color: color-yiq($primary) !important;
12
- background-color: $primary !important;
11
+ color: var(--brand-primary-yiq) !important;
12
+ background-color: var(--brand-primary) !important;
13
13
  }
14
14
  }
15
15
 
@@ -17,8 +17,8 @@
17
17
  .today {
18
18
  &.active {
19
19
  &:hover, &:active {
20
- color: color-yiq($primary) !important;
21
- background-color: $primary !important;
20
+ color: var(--brand-primary-yiq) !important;
21
+ background-color: var(--brand-primary) !important;
22
22
  }
23
23
  }
24
24
  }
@@ -26,19 +26,19 @@
26
26
 
27
27
  //** Datepicker specific
28
28
  .datepicker {
29
- .prev, .next { color: color-yiq($primary, $yiq-text-dark, $primary); }
29
+ .prev, .next { color: var(--brand-primary-yiq-text-dark); }
30
30
  }
31
31
 
32
32
  //** Timepicker picker section
33
- .timepicker-picker td a { color: color-yiq($primary, $yiq-text-dark, $primary); }
33
+ .timepicker-picker td a { color: var(--brand-primary-yiq-text-dark); }
34
34
 
35
35
  //** Time/Date Toggle
36
36
  .picker-switch.accordion-toggle {
37
37
  a {
38
- color: color-yiq($primary, $yiq-text-dark, $primary);
38
+ color: var(--brand-primary-yiq-text-dark);
39
39
  &:hover, &:active {
40
- color: color-yiq($primary) !important;
41
- background-color: $primary !important;
40
+ color: var(--brand-primary-yiq) !important;
41
+ background-color: var(--brand-primary) !important;
42
42
  }
43
43
  }
44
44
  }
@@ -3,11 +3,11 @@
3
3
  .select2-container--default {
4
4
  &.select2-container--focus .select2-selection--multiple,
5
5
  &.select2-container--open .select2-selection--single {
6
- border-color: $primary !important;
7
- box-shadow: 0 0 0 ($spacer * .125) transparentize($primary, 0.8);
6
+ border-color: var(--brand-primary) !important;
7
+ box-shadow: 0 0 0 ($spacer * .125) var(--brand-primary-transparent);
8
8
  }
9
9
  .select2-search--dropdown .select2-search__field:focus {
10
- border-color: $primary !important;
11
- box-shadow: 0 0 0 ($spacer * .125) transparentize($primary, 0.8);
10
+ border-color: var(--brand-primary) !important;
11
+ box-shadow: 0 0 0 ($spacer * .125) var(--brand-primary-transparent);
12
12
  }
13
13
  }
@@ -18,3 +18,9 @@
18
18
  ul, ol, img { page-break-inside: avoid; }
19
19
  }
20
20
  }
21
+
22
+ .page-break {
23
+ margin-top: ($spacer * 4);
24
+ margin-bottom: ($spacer * 4);
25
+ @media print { page-break-after: always; }
26
+ }
@@ -0,0 +1,54 @@
1
+ - brand_primary = local_assigns[:brand_primary]
2
+
3
+ :scss
4
+
5
+ //**********
6
+ // NOTE:
7
+ // if $white, $gray-800, or any of the $yiq-* variables are updated,
8
+ // update them here as well: /app/assets/stylesheets/nfg_ui/network_for_good/core/_variables.scss
9
+ //**********
10
+
11
+ // Brings in core variables needed (ex: $yiq-text-dark) because @import doesn't work in auctions (rails_6 branch)
12
+ // @import 'nfg_ui/network_for_good/core/variables';
13
+ $yiq-contrasted-threshold: 147;
14
+ $yiq-text-dark: #313A3E; // $gray-800
15
+ $yiq-text-light: #FFFFFF; // $white
16
+
17
+ // Brings in color-yiq function for color contrasts because @import doesn't work in auctions (rails_6 branch)
18
+ // @import 'nfg_ui/network_for_good/core/entity_branding/nfg_theme/functions';
19
+ @function color-yiq($color, $dark: $yiq-text-dark, $light: $yiq-text-light) {
20
+ $r: red($color);
21
+ $g: green($color);
22
+ $b: blue($color);
23
+
24
+ $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
25
+
26
+ @if ($yiq >= $yiq-contrasted-threshold) {
27
+ @return $dark;
28
+ } @else {
29
+ @return $light;
30
+ }
31
+ }
32
+
33
+ // CSS variables that override bootstrap's default colors with the entity's colors
34
+ $brand-colors: (
35
+ brand-primary: #{brand_primary},
36
+ brand-primary-scale-light: scale-color(#{brand_primary}, $lightness: 80%),
37
+ brand-primary-light: lighten(#{brand_primary}, 35%),
38
+ brand-primary-dark: darken(#{brand_primary}, 10%),
39
+ brand-primary-dark-yiq: color-yiq(darken(#{brand_primary}, 10%)),
40
+ brand-primary-transparent: transparentize(#{brand_primary}, 0.8),
41
+ brand-primary-yiq: color-yiq(#{brand_primary}),
42
+ brand-primary-yiq-text-dark: color-yiq(#{brand_primary}, $yiq-text-dark, #{brand_primary}),
43
+ brand-primary-yiq-text-darker: color-yiq(#{brand_primary}, darken(#{brand_primary}, 10%), #{brand_primary}),
44
+ brand-primary-yiq-text-darkest: color-yiq(darken(#{brand_primary}, 15%), $yiq-text-dark, darken(#{brand_primary}, 15%)),
45
+ brand-primary-yiq-text-light: color-yiq(#{brand_primary}, #{brand_primary}, $yiq-text-light)
46
+ );
47
+
48
+ // CSS variables at root
49
+ :root {
50
+ // Loop over each name, color
51
+ @each $name, $color in $brand-colors {
52
+ --\#{$name}: \#{$color};
53
+ }
54
+ }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NfgUi
4
- VERSION = '0.14.6.3'
4
+ VERSION = '0.15.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nfg_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.6.3
4
+ version: 0.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Roehm
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-07-22 00:00:00.000000000 Z
12
+ date: 2022-08-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bootstrap
@@ -435,6 +435,7 @@ files:
435
435
  - app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_bee.scss
436
436
  - app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_builder_layout.scss
437
437
  - app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_campaign_card.scss
438
+ - app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_check_in.scss
438
439
  - app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_content_section.scss
439
440
  - app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_custom_questions_questionnaire.scss
440
441
  - app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_custom_receipt_language.scss
@@ -596,6 +597,7 @@ files:
596
597
  - app/helpers/nfg_ui/components/email_helpers.rb
597
598
  - app/helpers/nfg_ui/components/resource_themes_helper.rb
598
599
  - app/helpers/nfg_ui/components/tooltip_helper.rb
600
+ - app/views/nfg_ui/_entity_branding_styles.html.haml
599
601
  - app/views/nfg_ui/app_icons/_icons.html.haml
600
602
  - app/views/nfg_ui/email/README.md
601
603
  - app/views/nfg_ui/email/_alert.html.inky-haml