Custom CSS for FoF Cookie Consent Extension

Use this extension: FoF Cookie Consent
Hello everyone! π
I've created a custom CSS code for the FoF Cookie Consent extension to enhance its appearance and make it more visually appealing. This code ensures compatibility with dark mode extensions and is fully responsive for different screen sizes. ππ±
Instructions
To use this custom CSS:
- Set the Theme option in the FoF Cookie Consent extension settings to "No CSS" for the best results.
- Copy and paste the following CSS code into your custom styles:
.cc-window {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
width: 600px;
max-width: 90%;
background-color: var(--button-bg);
color: var(--button-color);
padding: 8px 12px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: nowrap;
z-index: 1000;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cc-window:hover {
transform: translateX(-50%) translateY(-5px);
box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}
.cc-message {
display: flex;
align-items: center;
}
.cc-message span {
margin-right: 5px;
}
.cc-message a {
display: contents;
color: var(--text-color);
font-weight: 600;
}
.cc-message::before {
content: "\f563";
font-family: "Font Awesome 5 Free";
font-weight: 900;
font-size: 20px;
margin-right: 10px;
}
.cc-compliance {
display: flex;
align-items: center;
justify-content: flex-end;
border-radius: var(--border-radius);
background: var(--button-color);
margin-left: 5px;
}
.cc-compliance .cc-btn {
color: var(--button-inverted-bg);
white-space: nowrap;
padding: 8px 13px;
}
.cc-compliance .cc-btn:hover {
text-decoration: auto;
}
Customization
- You can use the Custom option in the extension settings to modify the colors and match your site's design.
- This CSS leverages variables like
--button-bg
, --text-color
, and --button-color
for easy integration.
Features
β
Dark Mode Compatible: Works seamlessly with dark mode extensions.
β
Responsive Design: Adapts beautifully to various screen sizes.
Feel free to try it out and let me know if you have any feedback or suggestions! π
Demo
Note: This demo does not include the CSS code provided above. It is only for testing purposes to give you an idea of how it will look. To use it on your Flarum forum site, you must use the CSS code provided above! (Do not use the CSS code from Codepen!)
Let me know if you need further edits or improvements! π