Git Product home page Git Product logo

Comments (2)

Julix91 avatar Julix91 commented on July 22, 2024

Relevant code checks if the short-code is already called:

if ( $input['link_position'] === 'message' && strpos( $input['message_text'], '[cookies_policy_link' ) === false )
	$input['message_text'] .= ' [cookies_policy_link]';

and the short-code accepts a class argument

// defaults
		$defaults = array(
			'title'	=> esc_html( $options['see_more_opt']['text'] !== '' ? $options['see_more_opt']['text'] : '➜' ),
			'link'	=> ( $options['see_more_opt']['link_type'] === 'custom' ? $options['see_more_opt']['link'] : get_permalink( $options['see_more_opt']['id'] ) ),
			'class'	=> $options['css_class']
		);
		
		// combine shortcode arguments
		$args = shortcode_atts( $defaults, $args );

So an immediate fix is to just call the shortcode in the message with a parameter (any class will do to avoid the default kicking in) [cookies_policy_link class="text-link"].

However, the menu clearly calls it button class - and there's a button wrapper for buttons and this link is not in it.

Maybe we could document that the short-code takes an optional class parameter?

from cookie-notice.

Julix91 avatar Julix91 commented on July 22, 2024

As for the alignment issue in the screenshot shown earlier...

The wrapper for the buttons is new - before it was flatter - so I used Grid to style it, which now broke - but it's a good change on your end!

And on mine, this restores what I had:

    #cn-notice-buttons {
        display: contents;
    }

Except for the specificity war. Adding an id in front of the selectors #cookie-notice .cookie-notice-container broke a bunch of my stuff (easily fixed on my end by adding #cookie-notice in front of my styles as well, but annoying).

# is an _ aggressive_ level of specificity even without adding extra class things on top. I'm assuming it's because you use #cookie-notice for JS somewhere? It only has either .cn-bottom or the other one as class. Just give it cookie-notice also as additional class (to use for CSS).

So, in conclusion, managed to resolve the issues I had on my end.

BUT I do recommend changing the styles to be less dramatic so that users can overwrite them more easily if they chose to. :)

from cookie-notice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.