mirror of
https://github.com/casjaysdevdocker/tools
synced 2026-12-02 15:58:09 -05:00
🐛 Keep cookie consent banner full width on mobile 🐛
cookieconsent 3.0.3 forces the floating layout on mobile user agents, which is capped at 24em wide above 414px. Make both the banner and floating layouts full width at the bottom so the banner is consistent at every viewport. - wwwroot/css/cookieconsent.css: add full-width consent banner rules - wwwroot/index.php: add inline full-width override for the consent banner - README.md: N/A — no user-facing change
This commit is contained in:
2 files changed
+54
No files matched your search
@@ -273,3 +273,30 @@
|
|||||||
.cc-floating.cc-theme-edgeless .cc-btn + .cc-btn {
|
.cc-floating.cc-theme-edgeless .cc-btn + .cc-btn {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Keep the consent banner full width on mobile user agents, where the library forces the floating layout */
|
||||||
|
.cc-window.cc-banner,
|
||||||
|
.cc-window.cc-floating {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 415px) {
|
||||||
|
.cc-window.cc-floating {
|
||||||
|
bottom: 0;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.cc-window.cc-floating:not(.cc-theme-edgeless) {
|
||||||
|
padding: 1em 1.8em;
|
||||||
|
}
|
||||||
|
.cc-window.cc-floating .cc-message {
|
||||||
|
flex: 1;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.cc-window.cc-floating .cc-compliance {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -43,6 +43,33 @@
|
|||||||
<link rel="apple-touch-icon" href="./images/icon.png" />
|
<link rel="apple-touch-icon" href="./images/icon.png" />
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="./css/cookieconsent.css" />
|
<link rel="stylesheet" type="text/css" href="./css/cookieconsent.css" />
|
||||||
|
<style>
|
||||||
|
.cc-window.cc-banner,
|
||||||
|
.cc-window.cc-floating {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 415px) {
|
||||||
|
.cc-window.cc-floating {
|
||||||
|
bottom: 0;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.cc-window.cc-floating:not(.cc-theme-edgeless) {
|
||||||
|
padding: 1em 1.8em;
|
||||||
|
}
|
||||||
|
.cc-window.cc-floating .cc-message {
|
||||||
|
flex: 1;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.cc-window.cc-floating .cc-compliance {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<link rel="stylesheet" href="./css/bootstrap.css" />
|
<link rel="stylesheet" href="./css/bootstrap.css" />
|
||||||
<link rel="stylesheet" href="./css/index.css" />
|
<link rel="stylesheet" href="./css/index.css" />
|
||||||
<script src="./js/errorpages/isup.js"></script>
|
<script src="./js/errorpages/isup.js"></script>
|
||||||
|
|||||||
Reference in new issue
Block a user