I’m trying to declare a media query for the CSS I’m using, written with purescript-css. Does anyone have a snippet that demonstrates this? The Media Query type in CSS.Stylesheet is
Can you post a snippet of what you’re working on? I’m looking through the documentation for purescript-css and it looks like there might be multiple ways to do things, so it would be helpful to see what you have so far.
import Halogen.HTML.CSS as HCSS
stylesheet = HCSS.stylesheet do
body
where body is a CSS function like
body :: CSS.CSS
body =
CSS.fromString "body" ? do
margin 0.0
I think I understand now actually. I found the CSS.Media module which I was not looking at earlier and there is a function “screen” which is the MediaType I need for the query function. It also has a maxWidth function so guessing I can set it like this (haven’t checked this)