tag:blogger.com,1999:blog-6140199022860280334.post2419402046239480497..comments2024-03-28T13:07:29.449+00:00Comments on Bob Buzzard Blog: Lightning Components and CSS Media QueriesBob Buzzardhttp://www.blogger.com/profile/07815472992351343395noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-6140199022860280334.post-6317611130579755692015-09-02T17:02:48.373+01:002015-09-02T17:02:48.373+01:00Just for clarification, the reason why I said it w...Just for clarification, the reason why I said it worked before and then I replied saying that it's not 100%, is because it works when you test it on the computer browser while re-sizing the screen, but it fails when testing on the actually devices. Ipads, iphones and galaxy phones seems to share the same break-point of 980px. Vinicius Santanahttps://www.blogger.com/profile/05885824731654120951noreply@blogger.comtag:blogger.com,1999:blog-6140199022860280334.post-89693014855759529662015-08-28T02:01:56.763+01:002015-08-28T02:01:56.763+01:00They still don't work 100% it seems like. I ju...They still don't work 100% it seems like. I just posted a question about it on stackexchange. If you want to be on the loop just follow the link bellow:<br /><br />http://salesforce.stackexchange.com/questions/89695/how-to-target-phones-and-tablets-with-media-queries-on-a-lighting-componentVinicius Santanahttps://www.blogger.com/profile/05885824731654120951noreply@blogger.comtag:blogger.com,1999:blog-6140199022860280334.post-15411126337059498612015-08-28T02:01:04.288+01:002015-08-28T02:01:04.288+01:00This comment has been removed by the author.Vinicius Santanahttps://www.blogger.com/profile/05885824731654120951noreply@blogger.comtag:blogger.com,1999:blog-6140199022860280334.post-71079306118617528482015-08-20T09:29:46.242+01:002015-08-20T09:29:46.242+01:00They work just fine now, but they didn't in Ma...They work just fine now, but they didn't in May when this blog post was written. Any attempt to use @media threw a parse error. I've updated the post to reflect that this is now supported.Bob Buzzardhttps://www.blogger.com/profile/07815472992351343395noreply@blogger.comtag:blogger.com,1999:blog-6140199022860280334.post-85702047577484779322015-08-17T20:54:48.242+01:002015-08-17T20:54:48.242+01:00Bob, as Paige mentioned above, media queries work ...Bob, as Paige mentioned above, media queries work just fine on the style but you should always have .THIS or the name of the wrapper class as a start point and the reason why it work inline is the same thing. So, just start your selectors with .THIS and you should be good to go. Vinicius Santanahttps://www.blogger.com/profile/05885824731654120951noreply@blogger.comtag:blogger.com,1999:blog-6140199022860280334.post-65113763878115230932015-07-20T17:38:57.468+01:002015-07-20T17:38:57.468+01:00Hey Bob, I found another workaround. If you wrap ...Hey Bob, I found another workaround. If you wrap everything in the component inside a main div, your media query in the style sheet should work. (make sure you have a space though since it isn't first level anymore)<br /><br />@media(max-width: 980px){<br /> .THIS .subjStyle{ <br /> width: 300px;<br /> }<br />}Anonymoushttps://www.blogger.com/profile/09953779429380486607noreply@blogger.com