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

Adding a custom class to social_share_button_tag #139

Open
Kosai106 opened this issue May 26, 2017 · 3 comments
Open

Adding a custom class to social_share_button_tag #139

Kosai106 opened this issue May 26, 2017 · 3 comments

Comments

@Kosai106
Copy link

I might be an idiot, but I'm not seeing a way to add a custom class to the tag.

I've tried the following but with no result.

<%= social_share_button_tag(@post.title, url: post_link(@post), desc: @post.description, image: post_image(@post), class: 'custom_class') %>

Am I doing something wrong or is this simply not a possibility at this time?

@hoqqun
Copy link

hoqqun commented Mar 29, 2018

social_share_button_tag dosen't have the class option.
So, we need to change the class that have already been applied like below.

$size: 24px;

.social-share-button {
.ssb-icon {
background-size: $size $size;
height: $size;
width: $size;
}
}

@Kosai106
Copy link
Author

@hoqqun This is almost a year old, I don't even exactly remember what the issue was - But it was not possible to solve by editing the existing class - A new class was required for what I wanted to achieve.

@probinson2015
Copy link

social_share_button_tag dosen't have the class option.
So, we need to change the class that have already been applied like below.

$size: 24px;

.social-share-button {
.ssb-icon {
background-size: $size $size;
height: $size;
width: $size;
}
}

@hoqqun I don't see class .ssb-icon in the dev tools element inspector. Is your comment still accurate? Am I missing something?

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

4 participants
@Kosai106 @hoqqun @probinson2015 and others