Skip to content

Commit

Permalink
Feat: allow custom z-index via --cc-z-index
Browse files Browse the repository at this point in the history
  • Loading branch information
orestbida committed Apr 20, 2023
1 parent 1b5a013 commit 9707cce
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/cookieconsent.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cookieconsent.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/cookieconsent.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
--cc-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
--cc-font-size: 16px;
--cc-bg: #fff;
--cc-z-index: 2147483647;
--cc-text: #2d4156;
--cc-border-radius: .35em;
--cc-btn-primary-bg: #2d4156;
Expand Down Expand Up @@ -57,6 +58,10 @@
--cc-webkit-scrollbar-bg-hover: #9199a0;
}

#cc-main {
z-index: var(--cc-z-index);
}

.cc_div *,
.cc_div *:hover,
.cc_div :before,
Expand Down
1 change: 0 additions & 1 deletion src/cookieconsent.js
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,6 @@

// Fix layout flash
main_container.style.position = "fixed";
main_container.style.zIndex = "2147483647";
main_container.innerHTML = '<div id="cc_div" class="cc_div"></div>'
all_modals_container = main_container.children[0];

Expand Down

0 comments on commit 9707cce

Please sign in to comment.