Is there a way to set margin:0?
See original GitHub issueI’ve tried multiple ways to remove the margins with no luck. I need to render the emojis without the margin, otherwise, it creates layout problem for responsive.
I’ve tried the following:
<Emoji text={name} style={{ margin: 0 }} />
and
import styled from "styled-components";
const StyledAEmoji = styled(Emoji)`
margin: 0;
`;
Can you provide an alternative way to remove margin when using one Emoji?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
CSS Margin: 0 is not setting to 0 - Stack Overflow
I'm a new comer to web designing. I created my web page layout using CSS and HTML as below. The problem is even...
Read more >Use CSS to Zero Out Your Margins and Borders - ThoughtCo
The best way to solve the problem of an inconsistent box model is to set all the margins and padding values of HTML...
Read more >{ margin: 0; padding: 0; } No Longer Cool | CSS-Tricks
I use a main container div to wrap all my content and then add a maincontainer * {padding:0;margin:0;}. I think it ends up...
Read more >margin - CSS: Cascading Style Sheets - MDN Web Docs
This property can be used to set a margin on all four sides of an element. Margins create extra space around an element,...
Read more >Using the CSS Star Selector to Zero Out Margins and Paddings
You can run over default browser styles with * { margin: 0; padding: 0; }, but be cautious. A simple Google search for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

So I don’t think styled-components are accepting class. and I ended up not using
onlyEmojiClassNameand just doing:and the
!importantwas a mustin order to override the inline style.@tommoor feel free to close this issue, I was able to work around it.
Just an FYI, in case you are interested to see the React.js+ Grommet example that uses the react-emoji-render library, take a look at Demo: https://l1klxkjwm.codesandbox.io/ Source: https://codesandbox.io/s/l1klxkjwm