Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Correct Formatting for Media Queries in Images

Started by Muut Archive 9 years ago · 1 replies · 438 views
9 years ago

I'm trying to setup media queries in a markdown image insert. I tried following the docs:

https://learn.getgrav.org/content/media

But this doesn't work for me at all... What is the correct syntax for this? Say if I wanted large format screens at 25vw, normal size screens at 50vw and mobile screens at 100vw.

Thanks in advance!!

9 years ago

I think the docs-page might be messing up the code slightly, the %XX parts of that piece should not be encoded as URL entities. The example should render as ![](retina.jpg?sizes=(max-width:26em) 100vw, 50vw).

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1332 9 years ago
Archive · by Muut Archive, 9 years ago
2 923 9 years ago
Archive · by Muut Archive, 9 years ago
2 4053 9 years ago
Archive · by Muut Archive, 9 years ago
1 2931 9 years ago
Archive · by Muut Archive, 9 years ago
3 1109 9 years ago