bootstrap-italia 2.14.0 → 2.15.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.
@@ -1,3 +1,3 @@
1
1
  :root {
2
- --bootstrap-italia-version: '2.14.0';
2
+ --bootstrap-italia-version: '2.15.1';
3
3
  }
@@ -202,7 +202,7 @@
202
202
  left: 50%;
203
203
  margin-left: $v-gap * 5;
204
204
  right: 0;
205
- bottom: $crs-landcape-bottom;
205
+ bottom: $crs-landscape-bottom;
206
206
  text-align: left;
207
207
  justify-content: left;
208
208
  margin-bottom: 8px;
@@ -16,6 +16,22 @@
16
16
  padding: 8px 0;
17
17
  }
18
18
 
19
+ // Navbar mobile backdrop, inspired by "modal" approach
20
+ .navbar-backdrop {
21
+ // scss-docs-start modal-backdrop-css-vars
22
+ --#{$prefix}backdrop-zindex: #{$zindex-modal-backdrop};
23
+ --#{$prefix}backdrop-bg: #{$modal-backdrop-bg};
24
+ --#{$prefix}backdrop-opacity: #{$modal-backdrop-opacity};
25
+ // scss-docs-end modal-backdrop-css-vars
26
+
27
+ @include overlay-backdrop(var(--#{$prefix}backdrop-zindex), var(--#{$prefix}backdrop-bg), var(--#{$prefix}backdrop-opacity));
28
+
29
+ @media (min-width: #{map-get($grid-breakpoints, lg)}) {
30
+ display: none; // to handle resize from md to lg when open
31
+ }
32
+ }
33
+
34
+ // navbar mobile
19
35
  .navbar {
20
36
  background: $navbar-bg-color;
21
37
 
@@ -30,23 +46,22 @@
30
46
  display: none;
31
47
  }
32
48
 
33
- // navbar mobile
34
49
  .navbar-collapsable {
35
50
  position: fixed;
36
51
  top: 0;
37
52
  right: 0;
38
53
  left: 0;
39
54
  bottom: 0;
40
- z-index: 100;
55
+ z-index: #{$zindex-modal};
41
56
  display: none;
42
- width: 100%; //-occupa sempre tutta lo spazio orizzontale disponibile
57
+ width: calc(100% - 48px); // occupa sempre tutta lo spazio orizzontale disponibile (BSI v2.15:) meno 48px a destra per il close e backdrop
43
58
 
44
59
  .menu-wrapper {
45
60
  background: $navigation-bg-color;
46
61
  position: absolute;
47
62
  top: 0;
48
63
  bottom: 0;
49
- right: $navigation-h-padding * 2;
64
+ right: 0; // $navigation-h-padding * 2; < removed in BSI v2.15
50
65
  left: 0;
51
66
  pointer-events: all;
52
67
  overflow-y: auto;
@@ -351,9 +366,9 @@
351
366
  right: auto;
352
367
  left: auto;
353
368
  bottom: auto;
354
- z-index: auto;
369
+ z-index: 1; // auto; xxx auto doesn't handle resize from md to lg when open
355
370
  background: none;
356
- display: block !important; //-sovrascrive l'inline style di jquery
371
+ display: block !important;
357
372
  transition: none;
358
373
 
359
374
  .overlay {
@@ -1,45 +0,0 @@
1
- /**
2
- * --------------------------------------------------------------------------
3
- * Bootstrap Italia (https://italia.github.io/bootstrap-italia/)
4
- * Authors: https://github.com/italia/bootstrap-italia/blob/main/AUTHORS
5
- * Licensed under BSD-3-Clause license (https://github.com/italia/bootstrap-italia/blob/main/LICENSE)
6
- * --------------------------------------------------------------------------
7
- */
8
-
9
- /**
10
- * Prevents page scroll
11
- */
12
-
13
- const CLASS_SCROLL_DISABLED = 'pagescroll-scroll-disabled';
14
-
15
- let disabled = false;
16
- let currentScrollPos = typeof document === 'undefined' ? 0 : document.scrollingElement ? document.scrollingElement.scrollTop : 0;
17
- const htmlContainer = typeof document === 'undefined' ? null : document.querySelector('html');
18
-
19
- function disablePageScroll() {
20
- if (typeof document === 'undefined') {
21
- return
22
- }
23
- disabled = true;
24
- currentScrollPos = document.scrollingElement.scrollTop;
25
- htmlContainer.classList.add(CLASS_SCROLL_DISABLED);
26
- }
27
-
28
- function enablePageScroll() {
29
- if (typeof document === 'undefined') {
30
- return
31
- }
32
- disabled = false;
33
- htmlContainer.classList.remove(CLASS_SCROLL_DISABLED);
34
- }
35
-
36
- if (typeof document !== 'undefined') {
37
- document.addEventListener('scroll', () => {
38
- if (disabled) {
39
- document.scrollingElement.scrollTop = currentScrollPos;
40
- }
41
- });
42
- }
43
-
44
- export { disablePageScroll, enablePageScroll };
45
- //# sourceMappingURL=pageScroll.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pageScroll.js","sources":["../../../src/js/plugins/util/pageScroll.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap Italia (https://italia.github.io/bootstrap-italia/)\n * Authors: https://github.com/italia/bootstrap-italia/blob/main/AUTHORS\n * Licensed under BSD-3-Clause license (https://github.com/italia/bootstrap-italia/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * Prevents page scroll\n */\n\nconst CLASS_SCROLL_DISABLED = 'pagescroll-scroll-disabled'\n\nlet disabled = false\nlet currentScrollPos = typeof document === 'undefined' ? 0 : document.scrollingElement ? document.scrollingElement.scrollTop : 0\nconst htmlContainer = typeof document === 'undefined' ? null : document.querySelector('html')\n\nexport function disablePageScroll() {\n if (typeof document === 'undefined') {\n return\n }\n disabled = true\n currentScrollPos = document.scrollingElement.scrollTop\n htmlContainer.classList.add(CLASS_SCROLL_DISABLED)\n}\n\nexport function enablePageScroll() {\n if (typeof document === 'undefined') {\n return\n }\n disabled = false\n htmlContainer.classList.remove(CLASS_SCROLL_DISABLED)\n}\n\nif (typeof document !== 'undefined') {\n document.addEventListener('scroll', () => {\n if (disabled) {\n document.scrollingElement.scrollTop = currentScrollPos\n }\n })\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,MAAM,qBAAqB,GAAG;;AAE9B,IAAI,QAAQ,GAAG;AACf,IAAI,gBAAgB,GAAG,OAAO,QAAQ,KAAK,WAAW,GAAG,CAAC,GAAG,QAAQ,CAAC,gBAAgB,GAAG,QAAQ,CAAC,gBAAgB,CAAC,SAAS,GAAG;AAC/H,MAAM,aAAa,GAAG,OAAO,QAAQ,KAAK,WAAW,GAAG,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM;;AAErF,SAAS,iBAAiB,GAAG;AACpC,EAAE,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;AACvC,IAAI;AACJ;AACA,EAAE,QAAQ,GAAG;AACb,EAAE,gBAAgB,GAAG,QAAQ,CAAC,gBAAgB,CAAC;AAC/C,EAAE,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,qBAAqB;AACnD;;AAEO,SAAS,gBAAgB,GAAG;AACnC,EAAE,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;AACvC,IAAI;AACJ;AACA,EAAE,QAAQ,GAAG;AACb,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,qBAAqB;AACtD;;AAEA,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;AACrC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM;AAC5C,IAAI,IAAI,QAAQ,EAAE;AAClB,MAAM,QAAQ,CAAC,gBAAgB,CAAC,SAAS,GAAG;AAC5C;AACA,GAAG;AACH;;;;"}