Title: CSS4 :not() does not work on :host · Issue #51273 · angular/angular · GitHub
Open Graph Title: CSS4 :not() does not work on :host · Issue #51273 · angular/angular
X Title: CSS4 :not() does not work on :host · Issue #51273 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? compiler, core Is this a regression? No Description CSS 4 supports multiple arguments for the :not() pseudo-selector. When applying this version of the pseudo-selector to :host insid...
Open Graph Description: Which @angular/* package(s) are the source of the bug? compiler, core Is this a regression? No Description CSS 4 supports multiple arguments for the :not() pseudo-selector. When applying this versi...
X Description: Which @angular/* package(s) are the source of the bug? compiler, core Is this a regression? No Description CSS 4 supports multiple arguments for the :not() pseudo-selector. When applying this versi...
Opengraph URL: https://github.com/angular/angular/issues/51273
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"CSS4 :not() does not work on :host","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\ncompiler, core\n\n### Is this a regression?\n\nNo\n\n### Description\n\nCSS 4 supports [multiple arguments for the `:not()` pseudo-selector](https://developer.mozilla.org/en-US/docs/Web/CSS/:not?retiredLocale=de). When applying this version of the pseudo-selector to `:host` inside an Angular component with `ViewEncapsulation.Emulated`, the generated CSS contains a superfluous `[_ngcontent-ng-...]` selector and does not match the expected elements.\r\n\r\n**Example:** Selecting `:host:not(.foo):not(.bar)` and `:host:not(.foo, .bar)` should be equivalent. However, the generated CSS differs like this:\r\n\r\n```css\r\n [_nghost-ng-c123]:not(.foo):not(.bar) {\r\n /* generated by :host:not(.foo):not(.bar) */\r\n }\r\n\r\n\r\n [_nghost-ng-c123]:not(.foo, .bar)[_ngcontent-ng-c123] {\r\n /* generated by :host:not(.foo, .bar) */\r\n }\r\n```\r\n\r\nCheck the attached Stackblitz for a live demo of the issue.\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://stackblitz.com/edit/stackblitz-starters-fbu7bj?file=src%2Fmain.ts\n\n### Please provide the exception or error you saw\n\n_No response_\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 15.2.6\r\nNode: 16.15.1\r\nPackage Manager: npm 8.13.2\r\nOS: darwin x64\r\n\r\nAngular: 14.3.0\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... language-service, platform-browser, platform-browser-dynamic\r\n... router\r\n\r\nPackage Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect 0.1402.11\r\n@angular-devkit/build-angular 14.2.11\r\n@angular-devkit/core 13.3.11\r\n@angular-devkit/schematics 13.3.11\r\n@angular/cdk 14.2.7\r\n@angular/cli 15.2.6\r\n@angular/material 14.2.7\r\n@schematics/angular 13.3.11\r\nng-packagr 14.2.2\r\nrxjs 7.8.0\r\ntypescript 4.8.4\n```\n\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/kremerd","@type":"Person","name":"kremerd"},"datePublished":"2023-08-04T16:44:03Z","url":"https://github.com/angular/angular/issues/51273"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:57981a24-4b79-4008-52f5-70638650c6fb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AEEE:A99C2:B6C53C:EC5CCB:6B00E804 |
| html-safe-nonce | 0974baae11feaae792db06fbb88cf84eae79bca6a985ba21c50d6c4f12b201ed |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRUVFOkE5OUMyOkI2QzUzQzpFQzVDQ0I6NkIwMEU4MDQiLCJ2aXNpdG9yX2lkIjoiNzA0ODU5MDExNTM4NzUzMzMxNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b21fe30a171232e9775ebafed55e635f09115f6f0694038db6251e8cf885ce63 |
| hovercard-subject-tag | issue:1837063016 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/51273/issue_layout |
| twitter:image | https://opengraph.githubassets.com/909be95edc79c4122e68e623f1b602e0197c358e12c09ca31f6eabc9c84867fa/angular/angular/issues/51273 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/909be95edc79c4122e68e623f1b602e0197c358e12c09ca31f6eabc9c84867fa/angular/angular/issues/51273 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? compiler, core Is this a regression? No Description CSS 4 supports multiple arguments for the :not() pseudo-selector. When applying this versi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kremerd |
| hostname | github.com |
| expected-hostname | github.com |
| None | 27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 624179fb8b88d26ba5bba08894eb60a1c5a1d93d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width