Skip to content
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

[question] How to filter by media query #96

Open
JonathanKolnik opened this issue Jan 29, 2018 · 0 comments
Open

[question] How to filter by media query #96

JonathanKolnik opened this issue Jan 29, 2018 · 0 comments

Comments

@JonathanKolnik
Copy link

JonathanKolnik commented Jan 29, 2018

Hi,
I'm struggling to filter by a media type. Any help would be greatly appreciated!

CSS

@media (max-width: 767px) {
  h1 {
    font-size: 12px
  }
}

Console:
It has the media query

parser.rules_by_media_query.keys
 => [:all, :print,  :"(max-width:767px)", ...]

I can't figure out the syntax to filter by that media type though

#symbol
parser.find_by_selector("h1", :"(max-width:767px)")
 => []

#string
parser.find_by_selector("h1", "(max-width:767px)")
 => []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant