Comments (4)
@DanielMiara yea, as of now the only way to personalize the plugin is by overriding the style via those crazy css classes.
The first option is to go the javascript way (like you suggested), but then users would surely ask to add other features like the ability to define color schemes for both light and dark modes, and mabye additional other properties like button_hover_bg_color, focus_border ...
The other route would be to make the existing css more "ready-to-edit" (maybe by specyfing css variables at the beginning of the .css stylesheet for an easier/immediate management. Something like:
/* Light color-scheme */
--buttons-bg: red;
--buttons-bg-hover: brown;
/*other props ... */
/* Dark color-scheme */
--buttons-bg-dark: white;
--buttons-bg-hover-dark: grey;
/* other props ... */
/** Rest of css style **/
The css solution would be easier to maintain/update (from my point of view at least) but with a catch; for the old browsers which dont support css variables (IE ...), you would have to either include a polyfill or leave it like that (the default dark-blue style would be applied).
All that being said, surely one of the 2 methods will be implemented in the future!
from cookieconsent.
Shouldn't be an issue.
In the upcoming 2.3 release I'll change it so whoever the element with class="force--consent" is (as long as it is a parent container) the css will still apply.
from cookieconsent.
Any options to manage the colors will be helpful but now I think the second one will work better :)
BTW: Maybe you can find a better option than force--consent now to force a full screen.
I mean force--consent works good but it's difficult sometimes to get and modify HTML tag.
If we can use just <div class="force--consent" somewhere will be more helpful
Thanks
from cookieconsent.
Superb, thanks
from cookieconsent.
Related Issues (20)
- [BUG v2]: WAI-ARIA compliance issue WCAG 4.1.2
- [Bug]: 'cookie_expiration' and 'cookie_necessary_only_expiration' have no effect HOT 3
- [Bug]: pnpm required using yarn HOT 2
- [Feat]: disable trap focus HOT 7
- [Feat]: add option to put consent modal's accept necessary button top right (where the x icon is) HOT 1
- [Feat]: partytown support HOT 2
- [Bug v3]: Version number mismatch in packaged 3.0.0-rc.16 HOT 1
- [Bug v2]: Can't update dynamic scripts in opt-out mode when no consent is made. HOT 4
- [Bug]: "Decline all" doesn't set consent cookie in opt-out mode on first action HOT 1
- [Feat]: Language Autodetect HOT 1
- [Feat]: Become a Google Certified CMP HOT 7
- reload: 'on_disable' is not documented HOT 1
- [Feat v3]: setting to hide the consent modal by default HOT 2
- [Bug]: Autoclear Not Working with Subdomains HOT 2
- [Bug]: Not all scripts in the page are loaded after giving consent HOT 3
- [Feat]: Privacy Policy link and force_consent HOT 4
- [Bug]: Cant open Modal with button HOT 2
- [Feat]: Focus transfer communication in the settings modal window
- [Feat]: When force_consent is active force the focus on the consent banner
- [Feat]: custom bar layout width HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookieconsent.