marcj / css-element-queries

CSS Element-Queries aka Container Queries. High-speed element dimension/media queries in valid css.
http://marcj.github.io/css-element-queries/
MIT License
4.27k stars 487 forks source link

More example/best practise for switching elements and visibility of element #218

Open hpvd opened 6 years ago

hpvd commented 6 years ago

Thanks for the nice examples of usage of this awesome tool on https://github.com/marcj/css-element-queries and https://marcj.github.io/css-element-queries/

Would be perfect to see two more examples/ documentation of best practise:

1) change/switch of content when elements reaching a specific width example for usecase: caption/legend of an image: short one for width<600px, long one for width >600px

2) show element only starting at a specific width example for usecase: caption/legend of an image should be only visible for width >300px

marcj commented 5 years ago

Would you like to provide a pull request with that?

hpvd commented 5 years ago

hmm , sorry.... was looking for some hints for the questions: is this already working? How to do it best?

marcj commented 5 years ago

Sure that works, but depends on the actual layout you wanna build. So can you provide an example with example implementation?