Twitter-Post-Fetcher icon indicating copy to clipboard operation
Twitter-Post-Fetcher copied to clipboard

Update interaction links markup to accommodate font icons.

Open populationtwo opened this issue 7 years ago • 5 comments

I made some modification to the interaction links to a accommodate font icons.

Cheers

populationtwo avatar Mar 10 '17 03:03 populationtwo

Can you elaborate what this does? Does the user need to add CSS for this to show the icons?

jasonmayes avatar Mar 12 '17 00:03 jasonmayes

Basically wrapping the interaction text with <span> and adding <i> tag. That will allow user to style the interaction link with font icon. image

With the current markup it's impossible to display the icons (withouth text) using font icons. The only way to display the icons is by displaying the text as well, since hiding the text will hiding the icons as well. http://codepen.io/populationtwo/details/jBYozW/

With the proposed markup user can display the icons only without text. Or display the text only without icons. http://codepen.io/populationtwo/pen/VpyOBE

And yes, use need to add their own CSS to show the icons.

Let me know if you have any questions.

populationtwo avatar Mar 19 '17 22:03 populationtwo

Could you not use the following CSS to hide the text but keep the background image?

.interact span { text-indent: -1000px; overflow: hidden; background-image: url('../path/to/icon.png'); }

?

jasonmayes avatar Mar 22 '17 06:03 jasonmayes

That only works on image file, it won't work on font-icon. The proposed PR will allow both font icon and image file.

populationtwo avatar Mar 23 '17 00:03 populationtwo

I managed to use font icons pretty easily with CSS? p.interact a { visibility: hidden; position: relative; width: 11px; height: 11px; overflow: hidden; display: inline-block; margin-right: 2px; } p.interact a:after { visibility: visible; display: block; position: absolute; left:0; top:0; font-family: untitled-font-1!important; font-style: normal; font-weight: 400; speak: none; display: inline-block; text-decoration: inherit; width: 1em; text-align: center; font-variant: normal; text-transform: none; vertical-align: middle; line-height: 1em; font-size: 1em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } p.interact a:first-of-type:after {content: '\e092';} p.interact a:nth-of-type(2):after {content: '\e02d';} p.interact a:nth-of-type(3):after {content: '\e06e';}

cho9e avatar May 21 '17 00:05 cho9e