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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update [bw_logo] for jQuery 3.5.1 compatibility #159

Closed
bobbingwide opened this issue Aug 29, 2020 · 2 comments
Closed

Update [bw_logo] for jQuery 3.5.1 compatibility #159

bobbingwide opened this issue Aug 29, 2020 · 2 comments
Assignees

Comments

@bobbingwide
Copy link
Owner

  • The [bw_logo] shortcode was written a long time ago for use with Artisteer themes.
  • I've now stopped using Artisteer themes myself.
  • The [bw_logo] shortcode enqueues oik_bw_logo.js regardless of the theme
  • The JavaScript is specific to Artisteer themes, only working when the logo is within a div.textwidget inside a div.art-header
  • The code uses .bind, which is deprecated in jQuery 3.5.1

Requirements

  • No console messages
  • Logic to work with WordPress 5.5. and above. i.e. All 8 combinations of Test jQuery Updates

Proposed solution

  • Change .bind to .on
  • Test with a shortcode example
@bobbingwide
Copy link
Owner Author

bobbingwide commented Aug 29, 2020

I created a new shortcode example bw_logo resizable and tested it on s.b/oikcom.
It did resize, but only downwards, until it disappeared.
There was also some CSS which affected the resizing.

With the TwentyTwenty theme using [bw_logo] on its own, or in the shortcode block, produced an image which was sized larger than its width.

Perhaps I should:

  • not bother enqueing the script.
  • remove the script completely
  • wrap the logo in a div with a class of bw_logo for improved styling

@bobbingwide bobbingwide changed the title Update oik_bw_logo.js used by [bw_logo] for jQuery 3.5.1 compatibility Update [bw_logo] for jQuery 3.5.1 compatibility Aug 29, 2020
@bobbingwide
Copy link
Owner Author

Perhaps I should:

  • not bother enqueing the script.
  • remove the script completely
  • wrap the logo in a div with a class of bw_logo for improved styling

Also, update oik.css to ensure that img.bw_logo has max-width: 100%; when displayed in .entry-content

and that will allow us to delete

img { max-width: 100%; width: auto/9; /* Prevent stretching of full-size images in IE8 */ }

which was found to have been adversely affecting background images in Google web story.
#152

bobbingwide added a commit that referenced this issue Sep 4, 2020
…content. Issue #152 - no longer set img max-width 100%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant