Title: CSS styles not applied if using multiple attribute selectors to style an element with the direct child selector · Issue #49157 · angular/angular · GitHub
Open Graph Title: CSS styles not applied if using multiple attribute selectors to style an element with the direct child selector · Issue #49157 · angular/angular
X Title: CSS styles not applied if using multiple attribute selectors to style an element with the direct child selector · Issue #49157 · angular/angular
Description: Deliver web apps with confidence 🚀. Contribute to angular/angular development by creating an account on GitHub.
Open Graph Description: Deliver web apps with confidence 🚀. Contribute to angular/angular development by creating an account on GitHub.
X Description: Deliver web apps with confidence 🚀. Contribute to angular/angular development by creating an account on GitHub.
Opengraph URL: https://github.com/angular/angular
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"CSS styles not applied if using multiple attribute selectors to style an element with the direct child selector","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\ncompiler\n\n### Is this a regression?\n\nYes\n\n### Description\n\nIf using multiple attribute selectors to style an element with the direct child selector, the styles are not applied.\r\n**This happens only in a development build.**\r\n\r\nReproduction:\r\n**app.component.html**\r\n```html\r\n\u003cdiv class=\"example-1\">\r\n Example 1\r\n\u003c/div>\r\n\u003cdiv class=\"example-2\">\r\n Example 2\r\n\u003c/div>\r\n```\r\n**app.component.scss**\r\n```scss\r\n:host {\r\n &:is([data-foo=\"bar\"]) {\r\n > div.example-1 {\r\n background-color: lightskyblue; // working in dev and prod build\r\n }\r\n }\r\n\r\n &:is([data-foo=\"bar\"], [data-foo-2=\"bar-2\"]) {\r\n > div.example-2 {\r\n background-color: violet; // ONLY working in prod build\r\n }\r\n }\r\n}\r\n```\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://github.com/Marcarrian/angular-15-css-multiple-attribute-selectors-issue\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.1.6\r\nNode: 16.16.0\r\nPackage Manager: npm 8.11.0\r\nOS: win32 x64\r\n\r\nAngular: 15.1.5\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... platform-browser, platform-browser-dynamic, router\r\n\r\nPackage Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect 0.1501.6\r\n@angular-devkit/build-angular 15.1.6\r\n@angular-devkit/core 15.1.6\r\n@angular-devkit/schematics 15.1.6\r\n@angular/cli 15.1.6\r\n@schematics/angular 15.1.6\r\nrxjs 7.8.0\r\ntypescript 4.9.5\n```\n\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/Marcarrian","@type":"Person","name":"Marcarrian"},"datePublished":"2023-02-22T10:58:23Z","url":"https://github.com/angular/angular/issues/49157"}
| 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 | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:7b4578b2-9ac5-774d-385b-f1a425d78e03 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C388:842EC:8A82AE:BA94E6:6B00E4D7 |
| html-safe-nonce | e0980999384264a4d08cd8ea4294c00d812cab22993df3d8d3a453f306735043 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzg4Ojg0MkVDOjhBODJBRTpCQTk0RTY6NkIwMEU0RDciLCJ2aXNpdG9yX2lkIjoiMjMyNTIwOTUyNTM1MjcxOTU3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8fda9a9946c233e8bfbc0f963cecf7a9651067618d56e8a6195c3802794678c5 |
| hovercard-subject-tag | repository:24195339 |
| 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/angular/angular/issues/49157 |
| twitter:image | https://repository-images.githubusercontent.com/24195339/d4194dc2-d880-43f7-960c-ea30e05c6531 |
| twitter:card | summary_large_image |
| og:image | https://repository-images.githubusercontent.com/24195339/d4194dc2-d880-43f7-960c-ea30e05c6531 |
| og:image:alt | Deliver web apps with confidence 🚀. Contribute to angular/angular development by creating an account on GitHub. |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14 |
| turbo-cache-control | no-cache |
| 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