Coder Social home page Coder Social logo

Comments (6)

adamraine avatar adamraine commented on May 22, 2024 1

Ah I see. I can reproduce using Lighthouse in DevTools but I'm not seeing the issue with Lighthouse CLI

from lighthouse.

romainmenke avatar romainmenke commented on May 22, 2024 1

Thank you for taking the time to make the repro and filing the upstream bug 🙇

It's fine to close this, I can track the upstream issue :)

from lighthouse.

adamraine avatar adamraine commented on May 22, 2024

During a Lighthouse run with mobile emulation enabled, I am seeing window.matchMedia('(any-pointer: coarse)').matches return true. Can you provide an example page where you are seeing the media query styles not being applied?

from lighthouse.

romainmenke avatar romainmenke commented on May 22, 2024

You can test with this example :

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>

	<style>
		a {
			display: block;
			margin: 0;
			padding: 0;
		}

		@media (any-pointer: coarse) {
			body {
				background-color: green;
			}
		}

		@media (any-pointer: coarse) {
			a {
				margin: 50px;
			}
		}

		/* @media (width <= 600px) {
			a {
				margin: 50px;
			}
		} */
	</style>
</head>
<body>
	<a href="#1">One</a>
	<a href="#2">Two</a>
</body>
</html>

I expect to see a green background and a lot of white space around each anchor.

Instead I see a white background and no white space.

I also see this notice:

Tap targets are not sized appropriately 0% appropriately sized tap targets

Screenshot 2024-03-27 at 23 19 05

from lighthouse.

romainmenke avatar romainmenke commented on May 22, 2024

Thank you for checking again!
Interesting that it does work as expected in Lighthouse CLI.

from lighthouse.

adamraine avatar adamraine commented on May 22, 2024

I made a minimum repro and filed an upstream bug in chrome:
https://issues.chromium.org/u/1/issues/331757596

from lighthouse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.