administrate-bootstrap-theme 0.2.2 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +65 -32
  3. data/app/assets/javascripts/administrate-bootstrap-theme/{bootstrap/bootstrap.bundle.js → bootstrap.bundle.js} +1058 -973
  4. data/app/assets/stylesheets/administrate-bootstrap-theme/_base.scss +4 -21
  5. data/app/assets/stylesheets/administrate-bootstrap-theme/_variables.scss +4 -0
  6. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_card.scss +7 -6
  7. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_carousel.scss +2 -2
  8. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_dropdown.scss +4 -4
  9. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_functions.scss +100 -3
  10. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_grid.scss +11 -0
  11. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_helpers.scss +2 -0
  12. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_images.scss +1 -1
  13. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_mixins.scss +1 -0
  14. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_modal.scss +5 -15
  15. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_navbar.scss +30 -1
  16. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_offcanvas.scss +8 -2
  17. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_placeholders.scss +51 -0
  18. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_popover.scss +10 -10
  19. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_reboot.scss +12 -8
  20. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_root.scss +40 -2
  21. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_tables.scss +9 -5
  22. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_toasts.scss +3 -3
  23. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_tooltip.scss +4 -4
  24. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_transitions.scss +6 -0
  25. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_utilities.scss +44 -8
  26. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_variables.scss +206 -29
  27. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-grid.scss +3 -1
  28. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-reboot.scss +2 -4
  29. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-utilities.scss +1 -1
  30. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap.scss +2 -1
  31. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_floating-labels.scss +3 -1
  32. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-check.scss +1 -1
  33. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-control.scss +1 -1
  34. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-range.scss +1 -1
  35. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-select.scss +5 -0
  36. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_stacks.scss +15 -0
  37. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_vr.scss +8 -0
  38. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_backdrop.scss +14 -0
  39. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_buttons.scss +1 -1
  40. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_grid.scss +35 -9
  41. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_utilities.scss +27 -6
  42. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_visually-hidden.scss +1 -1
  43. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/vendor/_rfs.scss +55 -13
  44. data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_autumn.scss +8 -0
  45. data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_default.scss +8 -0
  46. data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_forest.scss +9 -0
  47. data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_industrial.scss +8 -0
  48. data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_water.scss +8 -0
  49. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_content_body.scss +28 -10
  50. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_content_header.scss +4 -6
  51. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_form.scss +6 -6
  52. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_navigation.scss +26 -3
  53. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_pagination.scss +1 -1
  54. data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_lato.scss +5 -0
  55. data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_montserrat.scss +5 -0
  56. data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_open_sans.scss +5 -0
  57. data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_roboto.scss +5 -0
  58. data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_source_sans_pro.scss +5 -0
  59. data/app/assets/stylesheets/administrate-bootstrap-theme/theme.scss +10 -61
  60. data/lib/administrate-bootstrap-theme/version.rb +3 -1
  61. data/lib/generators/administrate_bootstrap_theme/install/USAGE +10 -0
  62. data/lib/generators/administrate_bootstrap_theme/install/install_generator.rb +33 -0
  63. data/package.json +2 -3
  64. metadata +22 -8
  65. data/app/assets/javascripts/administrate-bootstrap-theme/flatpickr/flatpickr.js +0 -2673
  66. data/app/assets/javascripts/administrate-bootstrap-theme/theme.js +0 -22
  67. data/app/assets/stylesheets/administrate-bootstrap-theme/flatpickr/flatpickr.scss +0 -791
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap Reboot v5.0.1 (https://getbootstrap.com/)
2
+ * Bootstrap Reboot v5.1.3 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2021 The Bootstrap Authors
4
4
  * Copyright 2011-2021 Twitter, Inc.
5
5
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -8,8 +8,6 @@
8
8
 
9
9
  @import "functions";
10
10
  @import "variables";
11
- // Prevent the usage of custom properties since we don't add them to `:root` in reboot
12
- $font-family-base: $font-family-sans-serif; // stylelint-disable-line scss/dollar-variable-default
13
- $font-family-code: $font-family-monospace; // stylelint-disable-line scss/dollar-variable-default
14
11
  @import "mixins";
12
+ @import "root";
15
13
  @import "reboot";
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap Utilities v5.0.1 (https://getbootstrap.com/)
2
+ * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2021 The Bootstrap Authors
4
4
  * Copyright 2011-2021 Twitter, Inc.
5
5
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap v5.0.1 (https://getbootstrap.com/)
2
+ * Bootstrap v5.1.3 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2021 The Bootstrap Authors
4
4
  * Copyright 2011-2021 Twitter, Inc.
5
5
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -43,6 +43,7 @@
43
43
  @import "carousel";
44
44
  @import "spinners";
45
45
  @import "offcanvas";
46
+ @import "placeholders";
46
47
 
47
48
  // Helpers
48
49
  @import "helpers";
@@ -4,7 +4,7 @@
4
4
  > .form-control,
5
5
  > .form-select {
6
6
  height: $form-floating-height;
7
- padding: $form-floating-padding-y $form-floating-padding-x;
7
+ line-height: $form-floating-line-height;
8
8
  }
9
9
 
10
10
  > label {
@@ -21,6 +21,8 @@
21
21
 
22
22
  // stylelint-disable no-duplicate-selectors
23
23
  > .form-control {
24
+ padding: $form-floating-padding-y $form-floating-padding-x;
25
+
24
26
  &::placeholder {
25
27
  color: transparent;
26
28
  }
@@ -17,7 +17,7 @@
17
17
  .form-check-input {
18
18
  width: $form-check-input-width;
19
19
  height: $form-check-input-width;
20
- margin-top: ($line-height-base - $form-check-input-width) / 2; // line-height minus check height
20
+ margin-top: ($line-height-base - $form-check-input-width) * .5; // line-height minus check height
21
21
  vertical-align: top;
22
22
  background-color: $form-check-input-bg;
23
23
  background-repeat: no-repeat;
@@ -199,7 +199,7 @@ textarea {
199
199
  // stylelint-enable selector-no-qualifying-type
200
200
 
201
201
  .form-control-color {
202
- max-width: 3rem;
202
+ width: $form-color-width;
203
203
  height: auto; // Override fixed browser height
204
204
  padding: $input-padding-y;
205
205
 
@@ -27,7 +27,7 @@
27
27
  &::-webkit-slider-thumb {
28
28
  width: $form-range-thumb-width;
29
29
  height: $form-range-thumb-height;
30
- margin-top: ($form-range-track-height - $form-range-thumb-height) / 2; // Webkit specific
30
+ margin-top: ($form-range-track-height - $form-range-thumb-height) * .5; // Webkit specific
31
31
  @include gradient-bg($form-range-thumb-bg);
32
32
  border: $form-range-thumb-border;
33
33
  @include border-radius($form-range-thumb-border-radius);
@@ -7,6 +7,8 @@
7
7
  display: block;
8
8
  width: 100%;
9
9
  padding: $form-select-padding-y $form-select-indicator-padding $form-select-padding-y $form-select-padding-x;
10
+ // stylelint-disable-next-line property-no-vendor-prefix
11
+ -moz-padding-start: subtract($form-select-padding-x, 3px); // See https://github.com/twbs/bootstrap/issues/32636
10
12
  font-family: $form-select-font-family;
11
13
  @include font-size($form-select-font-size);
12
14
  font-weight: $form-select-font-weight;
@@ -20,6 +22,7 @@
20
22
  border: $form-select-border-width solid $form-select-border-color;
21
23
  @include border-radius($form-select-border-radius, 0);
22
24
  @include box-shadow($form-select-box-shadow);
25
+ @include transition($form-select-transition);
23
26
  appearance: none;
24
27
 
25
28
  &:focus {
@@ -57,6 +60,7 @@
57
60
  padding-bottom: $form-select-padding-y-sm;
58
61
  padding-left: $form-select-padding-x-sm;
59
62
  @include font-size($form-select-font-size-sm);
63
+ @include border-radius($form-select-border-radius-sm);
60
64
  }
61
65
 
62
66
  .form-select-lg {
@@ -64,4 +68,5 @@
64
68
  padding-bottom: $form-select-padding-y-lg;
65
69
  padding-left: $form-select-padding-x-lg;
66
70
  @include font-size($form-select-font-size-lg);
71
+ @include border-radius($form-select-border-radius-lg);
67
72
  }
@@ -0,0 +1,15 @@
1
+ // scss-docs-start stacks
2
+ .hstack {
3
+ display: flex;
4
+ flex-direction: row;
5
+ align-items: center;
6
+ align-self: stretch;
7
+ }
8
+
9
+ .vstack {
10
+ display: flex;
11
+ flex: 1 1 auto;
12
+ flex-direction: column;
13
+ align-self: stretch;
14
+ }
15
+ // scss-docs-end stacks
@@ -0,0 +1,8 @@
1
+ .vr {
2
+ display: inline-block;
3
+ align-self: stretch;
4
+ width: 1px;
5
+ min-height: 1em;
6
+ background-color: currentColor;
7
+ opacity: $hr-opacity;
8
+ }
@@ -0,0 +1,14 @@
1
+ // Shared between modals and offcanvases
2
+ @mixin overlay-backdrop($zindex, $backdrop-bg, $backdrop-opacity) {
3
+ position: fixed;
4
+ top: 0;
5
+ left: 0;
6
+ z-index: $zindex;
7
+ width: 100vw;
8
+ height: 100vh;
9
+ background-color: $backdrop-bg;
10
+
11
+ // Fade for backdrop
12
+ &.fade { opacity: 0; }
13
+ &.show { opacity: $backdrop-opacity; }
14
+ }
@@ -11,7 +11,7 @@
11
11
  $hover-background: if($color == $color-contrast-light, shade-color($background, $btn-hover-bg-shade-amount), tint-color($background, $btn-hover-bg-tint-amount)),
12
12
  $hover-border: if($color == $color-contrast-light, shade-color($border, $btn-hover-border-shade-amount), tint-color($border, $btn-hover-border-tint-amount)),
13
13
  $hover-color: color-contrast($hover-background),
14
- $active-background: if($color == $color-contrast-light, shade-color($background,$btn-active-bg-shade-amount), tint-color($background, $btn-active-bg-tint-amount)),
14
+ $active-background: if($color == $color-contrast-light, shade-color($background, $btn-active-bg-shade-amount), tint-color($background, $btn-active-bg-tint-amount)),
15
15
  $active-border: if($color == $color-contrast-light, shade-color($border, $btn-active-border-shade-amount), tint-color($border, $btn-active-border-tint-amount)),
16
16
  $active-color: color-contrast($active-background),
17
17
  $disabled-background: $background,
@@ -1,4 +1,4 @@
1
- /// Grid system
1
+ // Grid system
2
2
  //
3
3
  // Generate semantic grid columns with these mixins.
4
4
 
@@ -7,9 +7,10 @@
7
7
  --#{$variable-prefix}gutter-y: 0;
8
8
  display: flex;
9
9
  flex-wrap: wrap;
10
- margin-top: calc(var(--#{$variable-prefix}gutter-y) * -1); // stylelint-disable-line function-disallowed-list
11
- margin-right: calc(var(--#{$variable-prefix}gutter-x) / -2); // stylelint-disable-line function-disallowed-list
12
- margin-left: calc(var(--#{$variable-prefix}gutter-x) / -2); // stylelint-disable-line function-disallowed-list
10
+ // TODO: Revisit calc order after https://github.com/react-bootstrap/react-bootstrap/issues/6039 is fixed
11
+ margin-top: calc(-1 * var(--#{$variable-prefix}gutter-y)); // stylelint-disable-line function-disallowed-list
12
+ margin-right: calc(-.5 * var(--#{$variable-prefix}gutter-x)); // stylelint-disable-line function-disallowed-list
13
+ margin-left: calc(-.5 * var(--#{$variable-prefix}gutter-x)); // stylelint-disable-line function-disallowed-list
13
14
  }
14
15
 
15
16
  @mixin make-col-ready($gutter: $grid-gutter-width) {
@@ -21,15 +22,16 @@
21
22
  flex-shrink: 0;
22
23
  width: 100%;
23
24
  max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid
24
- padding-right: calc(var(--#{$variable-prefix}gutter-x) / 2); // stylelint-disable-line function-disallowed-list
25
- padding-left: calc(var(--#{$variable-prefix}gutter-x) / 2); // stylelint-disable-line function-disallowed-list
25
+ padding-right: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
26
+ padding-left: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
26
27
  margin-top: var(--#{$variable-prefix}gutter-y);
27
28
  }
28
29
 
29
30
  @mixin make-col($size: false, $columns: $grid-columns) {
30
31
  @if $size {
31
32
  flex: 0 0 auto;
32
- width: percentage($size / $columns);
33
+ width: percentage(divide($size, $columns));
34
+
33
35
  } @else {
34
36
  flex: 1 1 0;
35
37
  max-width: 100%;
@@ -42,7 +44,7 @@
42
44
  }
43
45
 
44
46
  @mixin make-col-offset($size, $columns: $grid-columns) {
45
- $num: $size / $columns;
47
+ $num: divide($size, $columns);
46
48
  margin-left: if($num == 0, 0, percentage($num));
47
49
  }
48
50
 
@@ -54,7 +56,7 @@
54
56
  @mixin row-cols($count) {
55
57
  > * {
56
58
  flex: 0 0 auto;
57
- width: 100% / $count;
59
+ width: divide(100%, $count);
58
60
  }
59
61
  }
60
62
 
@@ -123,3 +125,27 @@
123
125
  }
124
126
  }
125
127
  }
128
+
129
+ @mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {
130
+ @each $breakpoint in map-keys($breakpoints) {
131
+ $infix: breakpoint-infix($breakpoint, $breakpoints);
132
+
133
+ @include media-breakpoint-up($breakpoint, $breakpoints) {
134
+ @if $columns > 0 {
135
+ @for $i from 1 through $columns {
136
+ .g-col#{$infix}-#{$i} {
137
+ grid-column: auto / span $i;
138
+ }
139
+ }
140
+
141
+ // Start with `1` because `0` is and invalid value.
142
+ // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.
143
+ @for $i from 1 through ($columns - 1) {
144
+ .g-start#{$infix}-#{$i} {
145
+ grid-column-start: $i;
146
+ }
147
+ }
148
+ }
149
+ }
150
+ }
151
+ }
@@ -41,25 +41,46 @@
41
41
  }
42
42
  }
43
43
 
44
+ $is-css-var: map-get($utility, css-var);
45
+ $is-local-vars: map-get($utility, local-vars);
44
46
  $is-rtl: map-get($utility, rtl);
45
47
 
46
48
  @if $value != null {
47
49
  @if $is-rtl == false {
48
50
  /* rtl:begin:remove */
49
51
  }
50
- .#{$property-class + $infix + $property-class-modifier} {
51
- @each $property in $properties {
52
- #{$property}: $value if($enable-important-utilities, !important, null);
52
+
53
+ @if $is-css-var {
54
+ .#{$property-class + $infix + $property-class-modifier} {
55
+ --#{$variable-prefix}#{$property-class}: #{$value};
53
56
  }
54
- }
55
57
 
56
- @each $pseudo in $state {
57
- .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
58
+ @each $pseudo in $state {
59
+ .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
60
+ --#{$variable-prefix}#{$property-class}: #{$value};
61
+ }
62
+ }
63
+ } @else {
64
+ .#{$property-class + $infix + $property-class-modifier} {
58
65
  @each $property in $properties {
66
+ @if $is-local-vars {
67
+ @each $local-var, $value in $is-local-vars {
68
+ --#{$variable-prefix}#{$local-var}: #{$value};
69
+ }
70
+ }
59
71
  #{$property}: $value if($enable-important-utilities, !important, null);
60
72
  }
61
73
  }
74
+
75
+ @each $pseudo in $state {
76
+ .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
77
+ @each $property in $properties {
78
+ #{$property}: $value if($enable-important-utilities, !important, null);
79
+ }
80
+ }
81
+ }
62
82
  }
83
+
63
84
  @if $is-rtl == false {
64
85
  /* rtl:end:remove */
65
86
  }
@@ -3,7 +3,7 @@
3
3
  // Hide content visually while keeping it accessible to assistive technologies
4
4
  //
5
5
  // See: https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/
6
- // See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
6
+ // See: https://kittygiraudel.com/2016/10/13/css-hide-and-seek/
7
7
 
8
8
  @mixin visually-hidden() {
9
9
  position: absolute !important;
@@ -4,7 +4,7 @@
4
4
  //
5
5
  // Automated responsive values for font sizes, paddings, margins and much more
6
6
  //
7
- // Licensed under MIT (https://github.com/twbs/rfs/blob/master/LICENSE)
7
+ // Licensed under MIT (https://github.com/twbs/rfs/blob/main/LICENSE)
8
8
 
9
9
  // Configuration
10
10
 
@@ -52,12 +52,54 @@ $enable-rfs: true !default;
52
52
  // Cache $rfs-base-value unit
53
53
  $rfs-base-value-unit: unit($rfs-base-value);
54
54
 
55
+ @function divide($dividend, $divisor, $precision: 10) {
56
+ $sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);
57
+ $dividend: abs($dividend);
58
+ $divisor: abs($divisor);
59
+ @if $dividend == 0 {
60
+ @return 0;
61
+ }
62
+ @if $divisor == 0 {
63
+ @error "Cannot divide by 0";
64
+ }
65
+ $remainder: $dividend;
66
+ $result: 0;
67
+ $factor: 10;
68
+ @while ($remainder > 0 and $precision >= 0) {
69
+ $quotient: 0;
70
+ @while ($remainder >= $divisor) {
71
+ $remainder: $remainder - $divisor;
72
+ $quotient: $quotient + 1;
73
+ }
74
+ $result: $result * 10 + $quotient;
75
+ $factor: $factor * .1;
76
+ $remainder: $remainder * 10;
77
+ $precision: $precision - 1;
78
+ @if ($precision < 0 and $remainder >= $divisor * 5) {
79
+ $result: $result + 1;
80
+ }
81
+ }
82
+ $result: $result * $factor * $sign;
83
+ $dividend-unit: unit($dividend);
84
+ $divisor-unit: unit($divisor);
85
+ $unit-map: (
86
+ "px": 1px,
87
+ "rem": 1rem,
88
+ "em": 1em,
89
+ "%": 1%
90
+ );
91
+ @if ($dividend-unit != $divisor-unit and map-has-key($unit-map, $dividend-unit)) {
92
+ $result: $result * map-get($unit-map, $dividend-unit);
93
+ }
94
+ @return $result;
95
+ }
96
+
55
97
  // Remove px-unit from $rfs-base-value for calculations
56
98
  @if $rfs-base-value-unit == px {
57
- $rfs-base-value: $rfs-base-value / ($rfs-base-value * 0 + 1);
99
+ $rfs-base-value: divide($rfs-base-value, $rfs-base-value * 0 + 1);
58
100
  }
59
101
  @else if $rfs-base-value-unit == rem {
60
- $rfs-base-value: $rfs-base-value / ($rfs-base-value * 0 + 1 / $rfs-rem-value);
102
+ $rfs-base-value: divide($rfs-base-value, divide($rfs-base-value * 0 + 1, $rfs-rem-value));
61
103
  }
62
104
 
63
105
  // Cache $rfs-breakpoint unit to prevent multiple calls
@@ -65,14 +107,14 @@ $rfs-breakpoint-unit-cache: unit($rfs-breakpoint);
65
107
 
66
108
  // Remove unit from $rfs-breakpoint for calculations
67
109
  @if $rfs-breakpoint-unit-cache == px {
68
- $rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1);
110
+ $rfs-breakpoint: divide($rfs-breakpoint, $rfs-breakpoint * 0 + 1);
69
111
  }
70
112
  @else if $rfs-breakpoint-unit-cache == rem or $rfs-breakpoint-unit-cache == "em" {
71
- $rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1 / $rfs-rem-value);
113
+ $rfs-breakpoint: divide($rfs-breakpoint, divide($rfs-breakpoint * 0 + 1, $rfs-rem-value));
72
114
  }
73
115
 
74
116
  // Calculate the media query value
75
- $rfs-mq-value: if($rfs-breakpoint-unit == px, #{$rfs-breakpoint}px, #{$rfs-breakpoint / $rfs-rem-value}#{$rfs-breakpoint-unit});
117
+ $rfs-mq-value: if($rfs-breakpoint-unit == px, #{$rfs-breakpoint}px, #{divide($rfs-breakpoint, $rfs-rem-value)}#{$rfs-breakpoint-unit});
76
118
  $rfs-mq-property-width: if($rfs-mode == max-media-query, max-width, min-width);
77
119
  $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height);
78
120
 
@@ -164,11 +206,11 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
164
206
 
165
207
  @if $unit == px {
166
208
  // Convert to rem if needed
167
- $val: $val + ' ' + if($rfs-unit == rem, #{$value / ($value * 0 + $rfs-rem-value)}rem, $value);
209
+ $val: $val + ' ' + if($rfs-unit == rem, #{divide($value, $value * 0 + $rfs-rem-value)}rem, $value);
168
210
  }
169
211
  @else if $unit == rem {
170
212
  // Convert to px if needed
171
- $val: $val + ' ' + if($rfs-unit == px, #{$value / ($value * 0 + 1) * $rfs-rem-value}px, $value);
213
+ $val: $val + ' ' + if($rfs-unit == px, #{divide($value, $value * 0 + 1) * $rfs-rem-value}px, $value);
172
214
  }
173
215
  @else {
174
216
  // If $value isn't a number (like inherit) or $value has a unit (not px or rem, like 1.5em) or $ is 0, just print the value
@@ -205,21 +247,21 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
205
247
 
206
248
  @else {
207
249
  // Remove unit from $value for calculations
208
- $value: $value / ($value * 0 + if($unit == px, 1, 1 / $rfs-rem-value));
250
+ $value: divide($value, $value * 0 + if($unit == px, 1, divide(1, $rfs-rem-value)));
209
251
 
210
252
  // Only add the media query if the value is greater than the minimum value
211
253
  @if abs($value) <= $rfs-base-value or not $enable-rfs {
212
- $val: $val + ' ' + if($rfs-unit == rem, #{$value / $rfs-rem-value}rem, #{$value}px);
254
+ $val: $val + ' ' + if($rfs-unit == rem, #{divide($value, $rfs-rem-value)}rem, #{$value}px);
213
255
  }
214
256
  @else {
215
257
  // Calculate the minimum value
216
- $value-min: $rfs-base-value + (abs($value) - $rfs-base-value) / $rfs-factor;
258
+ $value-min: $rfs-base-value + divide(abs($value) - $rfs-base-value, $rfs-factor);
217
259
 
218
260
  // Calculate difference between $value and the minimum value
219
261
  $value-diff: abs($value) - $value-min;
220
262
 
221
263
  // Base value formatting
222
- $min-width: if($rfs-unit == rem, #{$value-min / $rfs-rem-value}rem, #{$value-min}px);
264
+ $min-width: if($rfs-unit == rem, #{divide($value-min, $rfs-rem-value)}rem, #{$value-min}px);
223
265
 
224
266
  // Use negative value if needed
225
267
  $min-width: if($value < 0, -$min-width, $min-width);
@@ -228,7 +270,7 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
228
270
  $variable-unit: if($rfs-two-dimensional, vmin, vw);
229
271
 
230
272
  // Calculate the variable width between 0 and $rfs-breakpoint
231
- $variable-width: #{$value-diff * 100 / $rfs-breakpoint}#{$variable-unit};
273
+ $variable-width: #{divide($value-diff * 100, $rfs-breakpoint)}#{$variable-unit};
232
274
 
233
275
  // Return the calculated value
234
276
  $val: $val + ' calc(' + $min-width + if($value < 0, ' - ', ' + ') + $variable-width + ')';
@@ -0,0 +1,8 @@
1
+ $navigation-bg: #722a00;
2
+ $navigation-bg-active: #d51;
3
+ $navigation-fg: #eee;
4
+
5
+ $primary: #b87800;
6
+ $secondary: #614107;
7
+ $main-content-bg: #fcfafa;
8
+ $main-content-fg: #302725;
@@ -0,0 +1,8 @@
1
+ $navigation-bg: #055160;
2
+ $navigation-bg-active: #d51;
3
+ $navigation-fg: #eee;
4
+
5
+ $primary: #0d6ecd;
6
+ $secondary: #075261;
7
+ $main-content-bg: #f4f8fb;
8
+ $main-content-fg: #253029;
@@ -0,0 +1,9 @@
1
+ $navigation-bg: #025514;
2
+ $navigation-bg-active: #37ac02;
3
+ $navigation-fg: #eee;
4
+
5
+ $primary: #007219;
6
+ $secondary: #566356;
7
+ $danger: #ee6c6c;
8
+ $main-content-bg: #fdfdfd;
9
+ $main-content-fg: #1b3b1e;
@@ -0,0 +1,8 @@
1
+ $navigation-bg: #333;
2
+ $navigation-bg-active: #d51;
3
+ $navigation-fg: #eee;
4
+
5
+ $primary: #6f6f6f;
6
+ $secondary: #404040;
7
+ $main-content-bg: #fafafa;
8
+ $main-content-fg: #202020;
@@ -0,0 +1,8 @@
1
+ $navigation-bg: #0059b3;
2
+ $navigation-bg-active: #0099ff;
3
+ $navigation-fg: #eee;
4
+
5
+ $primary: #0d6ecd;
6
+ $secondary: #3b3d61;
7
+ $main-content-bg: #f4f8fb;
8
+ $main-content-fg: #222;
@@ -1,13 +1,17 @@
1
1
  .main-content__body {
2
2
  @extend .container-fluid, .mb-3;
3
3
 
4
+ table {
5
+ @extend .table-striped;
6
+ }
7
+
4
8
  > dl {
5
9
  @extend .row;
6
10
 
7
11
  dt {
8
12
  @extend .col-2, .text-end;
9
13
 
10
- min-height: 32px;
14
+ min-height: 2rem;
11
15
  }
12
16
 
13
17
  dd {
@@ -16,16 +20,20 @@
16
20
  }
17
21
 
18
22
  a {
19
- text-decoration: none;
23
+ @extend .text-decoration-none;
20
24
  }
21
25
 
22
26
  table {
23
27
  @extend .table;
24
28
  }
25
29
 
30
+ .attribute-data > table {
31
+ @extend .table-bordered;
32
+ }
33
+
26
34
  .attribute--nested {
27
35
  > div {
28
- display: flex;
36
+ @extend .d-flex;
29
37
  }
30
38
 
31
39
  legend {
@@ -38,27 +46,37 @@
38
46
  }
39
47
 
40
48
  .cell-label__sort-indicator > svg {
41
- height: 20px;
42
- width: 20px;
49
+ height: 1.2rem;
50
+ width: 1.2rem;
43
51
  }
44
52
 
45
53
  .cell-label__sort-indicator--desc > svg {
46
54
  transform: rotate(180deg);
47
55
  }
48
56
 
57
+ .form-actions > input {
58
+ @extend .btn-primary;
59
+ }
60
+
49
61
  .js-table-row {
50
62
  > td {
51
- padding: 0.25rem 0.25rem;
52
- text-align: center;
63
+ @extend .text-center, .p-1;
53
64
 
54
65
  &.cell-data {
55
- padding: 0.5rem 0.5rem;
56
- text-align: left;
66
+ @extend .text-start, .p-2;
57
67
  }
58
68
  }
59
69
 
70
+ .action-show {
71
+ @extend .link-secondary;
72
+ }
73
+
60
74
  .action-edit {
61
- @extend .btn, .btn-sm;
75
+ @extend .btn, .btn-sm, .btn-secondary;
76
+ }
77
+
78
+ [data-method="delete"] {
79
+ @extend .btn-danger;
62
80
  }
63
81
 
64
82
  [data-method="delete"] {
@@ -15,20 +15,18 @@
15
15
  }
16
16
 
17
17
  > h1 {
18
- @extend .nav, .col-12, .col-lg-auto, .me-lg-auto, .mb-2, .justify-content-center, .mb-md-0;
19
-
20
- font-size: 1.6rem;
18
+ @extend .nav, .h3, .col-12, .col-lg-auto, .me-lg-auto, .mb-2, .justify-content-center, .mb-md-0;
21
19
  }
22
20
 
23
21
  svg {
24
22
  &.search__eyeglass-icon, &.search__clear-icon {
25
- height: 20px;
26
- width: 20px;
23
+ height: 1.2rem;
24
+ width: 1.2rem;
27
25
  }
28
26
  }
29
27
 
30
28
  .button {
31
- @extend .btn, .btn-sm;
29
+ @extend .btn, .btn-sm, .btn-primary;
32
30
  }
33
31
 
34
32
  .search__input {
@@ -16,14 +16,14 @@
16
16
  }
17
17
 
18
18
  .field-unit__field {
19
- @extend .col-10;
19
+ @extend .col-10, .position-relative;
20
20
 
21
21
  > input:not([type="checkbox"]) {
22
22
  @extend .form-control;
23
23
  }
24
24
 
25
25
  > input[type="checkbox"] {
26
- @extend .form-check-input
26
+ @extend .form-check-input, .mt-2;
27
27
  }
28
28
 
29
29
  > select {
@@ -32,7 +32,8 @@
32
32
 
33
33
  > textarea {
34
34
  @extend .form-control;
35
- min-height: 150px;
35
+
36
+ min-height: 10rem;
36
37
  }
37
38
  }
38
39
 
@@ -40,10 +41,9 @@
40
41
  @extend .col-2;
41
42
 
42
43
  > label {
43
- @extend .col-form-label;
44
+ @extend .col-form-label, .pb-1, .w-100;
45
+
44
46
  border-bottom: 1px dashed #ccc;
45
- padding-bottom: 0;
46
- width: 100%;
47
47
  }
48
48
  }
49
49