Jarzka / stylefy

Clojure(Script) library for styling user interface components with ease.
MIT License
317 stars 10 forks source link

Support media print to customize the print page #63

Closed ychenz closed 2 years ago

ychenz commented 2 years ago

Hi team,

I am not sure how to write the following css: @media print {...} in stylefy syntax to customize the print screen. I have tried to use the ::stylefy/media to implement this but it didn't work out. Based on the docs it seems to only support media query for different screen size (such as max-width min-width).

Any example or directions will be appreciated

Jarzka commented 2 years ago

stylefy's media query expressions use Garden syntax, you might want to take a look at their documentation here: https://github.com/noprompt/garden/wiki/Media-Queries

I think the expression you are looking for is: {:print true}. Does that work?

ychenz commented 2 years ago

@Jarzka It worked! Thank you so much🙏