Skip to content

Conversation

ebeneliason
Copy link
Contributor

No description provided.

@netlify
Copy link

netlify bot commented Jan 18, 2022

✔️ Deploy Preview for pensive-meitner-faaeee ready!

🔨 Explore the source changes: 885b807

🔍 Inspect the deploy log: https://app.netlify.com/sites/pensive-meitner-faaeee/deploys/61e73705cccf1f0008b7ee68

😎 Browse the preview: https://deploy-preview-139--pensive-meitner-faaeee.netlify.app

}
: undefined,
zoomSelector: ".markdown img",
zoomSelector: ".markdown :not(em) > img:not(.no-zoom)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's em?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am emphasis (<em>) tag. This selector is a little tricky, as it is designed to handle two separate cases in which we don't want zoom.

  1. The first is the :not(em) bit, which is a standard approach to preventing image zoom documented in some of the zoom plugins. It enables one to wrap the Markdown image syntax in underscores (_) to trigger an emphasis (<em>) wrapper, which thus makes this selector fail.
  2. The second adds an explicit .no-zoom class that we can add to images where we aren't specifying them in Markdown. I could have just added an <em> wrapper in React, but the classname seemed cleaner in that context.

The selector here essentially says, select an image for which neither of the above are true. That is, if it's wrapped in emphasis or has the .no-zoom class, the selector won't apply.

Copy link
Contributor

@eak12913 eak12913 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ebeneliason ebeneliason merged commit 2863d47 into master Jan 19, 2022
@ebeneliason ebeneliason deleted the 1652-courses-avatars branch January 19, 2022 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants