-
Notifications
You must be signed in to change notification settings - Fork 25
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
how to make responsive twitter embed to mobile device? its available on options ? #85
Comments
you can try an alternative - that's the one I'm using right now - is to insert a global css media query: @media (max-width: 550px) {
.twitter-tweet {max-width: 300px !important;}
iframe { width: 300px; }
} It is not elegant but it works well... |
Did this help @qipoy? |
Just sketching an idea, it would awesome if the plugin took a container component in config options that wrapped embeds like Layout wraps pages like this: <!-- page.md -->
`video: https://www.youtube.com/watch?v=k5veb0wZas0` // gatsby-config.js
plugins: [
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: `@raae/gatsby-remark-oembed`,
options: {
container: require.resolve(
`${__dirname}/src/components/OEmbedContainer/index.js`
),
// usePrefix defaults to false
// usePrefix: true is the same as ["oembed"]
usePrefix: ['oembed', 'video'],
... // components/OEmbedContainer/index.js
// Ideal
const OEmbedContainer = ({ OEmbed }) => ( <div><OEmbed/></div> );
// Because markdown is text
const OEmbedContainer = ({ embed }) => ( <div dangerouslySetInnerHTML={{ __html: embed }} /> ); Then we can roll our own responsive containers or whatever else. |
I like! This fall I have time to give oembed some much-needed TLC and will look into this. |
No description provided.
The text was updated successfully, but these errors were encountered: