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

Social icons not showing in safari (no width and height set on svg) #4

Open
angelokeirsebilck opened this issue Nov 6, 2023 · 1 comment

Comments

@angelokeirsebilck
Copy link

angelokeirsebilck commented Nov 6, 2023

Describe the bug

The socials icons are not showing on Safari because the SVG's don't have height and width set.

I am using craft.socialShare.renderButton function to render the social links.

Steps to reproduce

  1. Render a social link with craft.socialShare.renderButton
  2. Open safari and check if icon is showing

Craft CMS version

4.5.5

Plugin version

1.0.3

Multi-site?

No response

Additional context

No response

@engram-design
Copy link
Member

engram-design commented Nov 6, 2023

That's interesting, what version of Safari? On 17.1 they seem to render okay for me
image

Here's a quick example:

{{ craft.socialShare.renderButton('appStore', {
    url: 'https://craftcms.com',
    theme: {
        showIcon: true,
        shape: 'circle',
        iconColor: 'white',
        bgColor: 'brand',
    },
}) }}

Which renders:
image

The height is controlled via CSS:

[data-social-button] {
    --size: 40px;
    height: var(--size);
    line-height: var(--size);
}

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

No branches or pull requests

2 participants