Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom display property #48

Open
alexzerah opened this issue Aug 20, 2019 · 6 comments 路 May be fixed by #66
Open

Add custom display property #48

alexzerah opened this issue Aug 20, 2019 · 6 comments 路 May be fixed by #66

Comments

@alexzerah
Copy link

馃憢 Hi everyone,

First of all, thanks for your really cool lib!

As a web developper I need a way to add custom css display.
For exemple display: flex instead of display: block.

It can be really cool 馃

Thanks again

@Alex-D
Copy link
Owner

Alex-D commented Aug 21, 2019

Hey!

So you basically just need an option to change the value set in this line :

banner.style.display = 'block';

@alexzerah
Copy link
Author

Yeah, I was thinking about updating outside the library, but I solved the problem I was.
Thanks

@Alex-D
Copy link
Owner

Alex-D commented Aug 28, 2019

You can hack it with something like

#cookies-eu-banner[style*="display: block"] {
  display: flex !important;
}

@robsonsobral
Copy link

robsonsobral commented Mar 18, 2022

Easier than that is to use the hidden parameter on the initial state of the form. From MDN:

The hidden global attribute is a Boolean attribute indicating that the element is not yet, or is no longer, relevant. For example, it can be used to hide elements of the page that can't be used until the login process has been completed. Browsers won't render elements with the hidden attribute set.

Which make it perfect for this case.

@Alex-D Alex-D reopened this Mar 20, 2022
@robsonsobral
Copy link

robsonsobral commented Mar 21, 2022

Would you accept a PR, @Alex-D ?

@Alex-D
Copy link
Owner

Alex-D commented Mar 21, 2022

Of course! :)

@robsonsobral robsonsobral linked a pull request Mar 21, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants