René's URL Explorer Experiment


Title: Media queries treat unknown and deprecated media types as `all` (`@media tv` matches, `not tv` does not) · Issue #11643 · NativeScript/NativeScript · GitHub

Open Graph Title: Media queries treat unknown and deprecated media types as `all` (`@media tv` matches, `not tv` does not) · Issue #11643 · NativeScript/NativeScript

X Title: Media queries treat unknown and deprecated media types as `all` (`@media tv` matches, `not tv` does not) · Issue #11643 · NativeScript/NativeScript

Description: Issue Description Runtime bug in @nativescript/core CSS media query parsing (packages/core/css-mediaquery/index.ts, line 138): type: MediaQueryType[type ? type.toLowerCase() : 'all'] ?? 'all', Because MediaQueryType only contains all, pr...

Open Graph Description: Issue Description Runtime bug in @nativescript/core CSS media query parsing (packages/core/css-mediaquery/index.ts, line 138): type: MediaQueryType[type ? type.toLowerCase() : 'all'] ?? 'all', Beca...

X Description: Issue Description Runtime bug in @nativescript/core CSS media query parsing (packages/core/css-mediaquery/index.ts, line 138): type: MediaQueryType[type ? type.toLowerCase() : 'all'] ?? ...

Opengraph URL: https://github.com/NativeScript/NativeScript/issues/11643

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Media queries treat unknown and deprecated media types as `all` (`@media tv` matches, `not tv` does not)","articleBody":"### Issue Description\n\nRuntime bug in `@nativescript/core` CSS media query parsing (`packages/core/css-mediaquery/index.ts`, line 138):\n\n```ts\ntype: MediaQueryType[type ? type.toLowerCase() : 'all'] ?? 'all',\n```\n\nBecause `MediaQueryType` only contains `all`, `print`, and `screen`, any other media type (`tv`, `speech`, `handheld`, `projection`, or an unknown identifier) falls back to `'all'` instead of remaining distinct from `'screen'`. Since `checkIfMediaQueryMatches` evaluates queries with `type: MediaQueryType.screen`, `@media tv { ... }` and `@media speech { ... }` rules are applied on every screen, `matchMedia('tv').matches` returns `true`, and `@media not tv { ... }` / `matchMedia('not tv').matches` evaluate to `false`.\n\nPer [Media Queries Level 4 section 2.3 and section 3.2](https://www.w3.org/TR/mediaqueries-4/#media-types) (and in browsers and upstream `ericf/css-mediaquery`), deprecated and unknown media types never match, and negating them with `not` evaluates to `true`.\n\n### Reproduction\n\nSave as `packages/core/css-mediaquery/repro.spec.ts` and run `npx nx run core:test -t 'unknown and deprecated media types'`:\n\n```ts\nimport { matchQuery, MediaQueryType } from '.';\nimport { matchMedia } from '../media-query-list';\nimport { parse } from '../css';\nimport { StyleSheetSelectorScope } from '../ui/styling/css-selector';\nimport { _populateRules } from '../ui/styling/style-scope';\n\ndescribe('unknown and deprecated media types', () => {\n\tit('repro', () => {\n\t\tconst screen = { type: MediaQueryType.screen, width: 400, height: 800, orientation: 'portrait' };\n\t\tconsole.log('matchQuery tv:', matchQuery('tv', screen));\n\t\tconsole.log('matchQuery speech:', matchQuery('speech', screen));\n\t\tconsole.log('matchQuery tv and portrait:', matchQuery('tv and (orientation: portrait)', screen));\n\t\tconsole.log('matchQuery not tv:', matchQuery('not tv', screen));\n\t\tconsole.log('matchQuery print:', matchQuery('print', screen));\n\t\tconsole.log('matchMedia tv:', matchMedia('tv').matches);\n\t\tconsole.log('matchMedia not tv:', matchMedia('not tv').matches);\n\n\t\tconst ast = parse(`\n\t\t\t@media tv { button { color: red; } }\n\t\t\t@media speech { button { color: orange; } }\n\t\t\t@media not tv { button { color: green; } }\n\t\t\t@media print { button { color: blue; } }\n\t\t`);\n\t\tconst rulesets = [];\n\t\t_populateRules(ast.stylesheet.rules, rulesets, []);\n\t\tconst matched = new StyleSheetSelectorScope(rulesets)\n\t\t\t.query({ cssType: 'button' })\n\t\t\t.selectors.map((s) => s.ruleset.declarations[0].value);\n\t\tconsole.log('@media matched colors:', matched);\n\t});\n});\n```\n\nExpected output:\n\n```text\nmatchQuery tv: false\nmatchQuery speech: false\nmatchQuery tv and portrait: false\nmatchQuery not tv: true\nmatchQuery print: false\nmatchMedia tv: false\nmatchMedia not tv: true\n@media matched colors: [ 'green' ]\n```\n\n### Relevant log output (if applicable)\n\n```shell\nmatchQuery tv: true\nmatchQuery speech: true\nmatchQuery tv and portrait: true\nmatchQuery not tv: false\nmatchQuery print: false\nmatchMedia tv: true\nmatchMedia not tv: false\n@media matched colors: [ 'red', 'orange' ]\n```\n\n### Environment\n\n- `@nativescript/core`: `9.1.4` (npm latest) and `main` (`2a41eb1`)\n- Node.js: `v26.13.0`\n- Platform-independent (shared `@nativescript/core` styling and `matchMedia` code)\n\n### Please accept these terms\n\n- [x] I have searched the [existing issues](https://github.com/NativeScript/NativeScript/issues) as well as [StackOverflow](https://stackoverflow.com/questions/tagged/nativescript) and this has not been posted before\n- [x] This is a bug report\n- [x] I agree to follow this project's [Code of Conduct](https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#coc)\n\nCredit: https://ucsbplse.github.io/\n","author":{"url":"https://github.com/trackoor","@type":"Person","name":"trackoor"},"datePublished":"2026-11-14T19:26:38Z","url":"https://github.com/NativeScript/NativeScript/issues/11643"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:251ab8e7-120c-102e-3d86-c5c81fbf8a94
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD4FC:19F84C:18DC026:1FB65D5:6B012FCF
html-safe-nonce059c8e1584691c332fc578d24f6aee7dc8e1aa8e034cac6af2960adcde3209a8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEZDOjE5Rjg0QzoxOERDMDI2OjFGQjY1RDU6NkIwMTJGQ0YiLCJ2aXNpdG9yX2lkIjoiMzA4NDQwNzczNTgwMjk5ODczNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc9245855322a471f98be9e62844fee089147d3513051ae302d52d3de5d522c35
hovercard-subject-tagissue:6394926819
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/11643/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c89bdfa72b18eb06c8752de42d9bf5f4d99e1b0389725c8563f4c8df57259d5f/NativeScript/NativeScript/issues/11643
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c89bdfa72b18eb06c8752de42d9bf5f4d99e1b0389725c8563f4c8df57259d5f/NativeScript/NativeScript/issues/11643
og:image:altIssue Description Runtime bug in @nativescript/core CSS media query parsing (packages/core/css-mediaquery/index.ts, line 138): type: MediaQueryType[type ? type.toLowerCase() : 'all'] ?? 'all', Beca...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametrackoor
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id31492490
octolytics-dimension-repository_nwoNativeScript/NativeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31492490
octolytics-dimension-repository_network_root_nwoNativeScript/NativeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/NativeScript/NativeScript/issues/11643#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F11643
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F11643
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=NativeScript%2FNativeScript
Reloadhttps://github.com/NativeScript/NativeScript/issues/11643
Reloadhttps://github.com/NativeScript/NativeScript/issues/11643
Reloadhttps://github.com/NativeScript/NativeScript/issues/11643
NativeScripthttps://github.com/NativeScript
NativeScripthttps://github.com/NativeScript/NativeScript
Codehttps://github.com/NativeScript/NativeScript
Issues231 (231)https://github.com/NativeScript/NativeScript/issues
Pull requests107 (107)https://github.com/NativeScript/NativeScript/pulls
Discussionshttps://github.com/NativeScript/NativeScript/discussions
Actionshttps://github.com/NativeScript/NativeScript/actions
Projectshttps://github.com/NativeScript/NativeScript/projects
Wikihttps://github.com/NativeScript/NativeScript/wiki
Security and qualityhttps://github.com/NativeScript/NativeScript/security
Insightshttps://github.com/NativeScript/NativeScript/insights
https://github.com/NativeScript/NativeScript
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/11643
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/11643
#11644https://github.com/NativeScript/NativeScript/pull/11644
Media queries treat unknown and deprecated media types as all (@media tv matches, not tv does not)https://github.com/NativeScript/NativeScript/issues/11643#top
#11644https://github.com/NativeScript/NativeScript/pull/11644
https://github.com/trackoor
trackoorhttps://github.com/trackoor
on Nov 14, 2026https://github.com/NativeScript/NativeScript/issues/11643#issue-6394926819
Media Queries Level 4 section 2.3 and section 3.2https://www.w3.org/TR/mediaqueries-4/#media-types
existing issueshttps://github.com/NativeScript/NativeScript/issues
StackOverflowhttps://stackoverflow.com/questions/tagged/nativescript
Code of Conducthttps://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#coc
https://ucsbplse.github.io/https://ucsbplse.github.io/
Sign up for freehttps://github.com/signup?return_to=https://github.com/NativeScript/NativeScript/issues/11643
Sign in to commenthttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/11643
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.