All foreign visitors, regardless of their nationality, traveling to Mexico for tourism, business or in transit to another destination, are exempt from presenting a Mexican visa as long as they have a valid visa issued by any the following countries: Canada, Japan, the United States of America, the United Kingdom or any of the countries comprising the Schengen Area.
https://embamex.sre.gob.mx/canada/index.php/en/consular-services/visas-and-services-for-foreigners