Unable to change container width to 100%
See original GitHub issueMy intention is to have emoji container with exactly same width as width of input element and also be responsive across all screen dimensions.However even after looking into #45 , I cannot exactly figure out if it is all i need to do to override existing style. No change in width was seen even after passing style
as param.
I believe that it is because of Inline width on section element (which is 352px as in the first screenshot above) and a subsequent children (a div element which wraps all emojis) of inline width 324px.
My code :
function EmojiPicker(props) {
const ref = useRef()
useEffect(() => {
new Picker({
...props,
data,
ref,
set: 'apple',
parent: document.querySelector('.emogipicker'),
style: { width: '800px' }
})
}, [])
return <div ref={ref} className="emoji_mart" />
}
const Emogi = ({ callback, emogibox }) => {
const onEmojiClick = (emoji) => {
console.log(emoji)
callback(emoji)
}
return (
<div aria-selected={emogibox} className="emogipicker">
<EmojiPicker onEmojiSelect={onEmojiClick} />
</div>
)
}
export default Emogi
I have also applied few css rules for em-emoji-picker
tag and that is working perfectly. But no css rule is working for its children.
Issue Analytics
- State:
- Created a year ago
- Reactions:11
- Comments:5 (2 by maintainers)
Top Results From Across the Web
why my container isn't fit to 100%? [duplicate] - Stack Overflow
I think It has right width (768px) on iPad(768px x 1024px), but that isn't to fit my page. How can I solve this?...
Read more >Full Width Containers in Limited Width Parents - CSS-Tricks
Let's say the parent container was 60% wide and centered. That means there is 20% width on either side of it. But margin...
Read more >Qubely Row Unable to modify container - WordPress.org
I added a Qubely row and under the style tab, I don't have the ability to select Container type Full Width or Boxed...
Read more >Set width for content inside 100% width container
Set page template to 100% width · Add a full width container · Make sure Interior Content Width is set to Site Width...
Read more >Flutter: The Advanced Layout Rule Even Beginners Must Know
The red Container wants to be 100 × 100, but it can't, because the screen forces it to be exactly the same size...
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
width changed after added
perLine={18}
I also think that the block should inherit the width and height of the parent.
Any updates on this? Frankly I’m a little bummed out by how limited the styling options has gotten after the move to Shadow DOM and Custom Elements – the picker was perfectly customizable with React and Styled Components before, and now I can’t even make the inner container adapt its width due to CSS variables having to be predefined in order to style things…?
I’m all for upgrading to more modern technologies, but this feels premature?