Title: Unit tests confirm that css generated with attribute selector on host is incorrect as of a16 · Issue #51743 · angular/angular · GitHub
Open Graph Title: Unit tests confirm that css generated with attribute selector on host is incorrect as of a16 · Issue #51743 · angular/angular
X Title: Unit tests confirm that css generated with attribute selector on host is incorrect as of a16 · Issue #51743 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? compiler Is this a regression? Yes Description Below is the css and unit test i wrote to confirm it's generated incorrectly. original css :host[size=full]>espresso-modal-container>es...
Open Graph Description: Which @angular/* package(s) are the source of the bug? compiler Is this a regression? Yes Description Below is the css and unit test i wrote to confirm it's generated incorrectly. original css :hos...
X Description: Which @angular/* package(s) are the source of the bug? compiler Is this a regression? Yes Description Below is the css and unit test i wrote to confirm it's generated incorrectly. original css ...
Opengraph URL: https://github.com/angular/angular/issues/51743
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unit tests confirm that css generated with attribute selector on host is incorrect as of a16","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\nBelow is the css and unit test i wrote to confirm it's generated incorrectly.\r\n\r\n**original css**\r\n\r\n:host[size=full]>espresso-modal-container>espresso-modal-content-container {\r\n min-width: 100vw;\r\n max-width: 100vw;\r\n width: 100vw;\r\n min-height: 100%;\r\n max-height: 100%;\r\n height: 100%\r\n}\r\n\r\n**expected css**\r\n\r\n[size=full][HOSTA]>espresso-modal-container[CONTENTA]>espresso-modal-content-container[CONTENTA] {\r\n min-width: 100vw;\r\n max-width: 100vw;\r\n width: 100vw;\r\n min-height: 100%;\r\n max-height: 100%;\r\n height: 100%\r\n}\r\n\r\n**actual css**\r\n\r\n[size=full]>espresso-modal-container>espresso-modal-content-container[HOSTA] {\r\n min-width: 100vw;\r\n max-width: 100vw;\r\n width: 100vw;\r\n min-height: 100%;\r\n max-height: 100%;\r\n height: 100%\r\n}\r\n\r\n**angular unit test i added to shadow_css_spec.ts**\r\n\r\ndescribe('ShadowCss', () => {\r\n it('should handle attribute before host', () => {\r\n const css = ':host[size=full]>espresso-modal-container>espresso-modal-content-container{min-width:100vw;max-width:100vw;width:100vw;min-height:100%;max-height:100%;height:100%}';\r\n const expected = '[size=full][HOSTA]>espresso-modal-container[CONTENTA]>espresso-modal-content-container[CONTENTA]{min-width:100vw;max-width:100vw;width:100vw;min-height:100%;max-height:100%;height:100%}';\r\n expect(shim(css, 'CONTENTA', 'HOSTA')).toEqualCss(expected);\r\n });\r\n\r\n\n\n### Please provide a link to a minimal reproduction of the bug\n\nall is in above details\n\n### Please provide the exception or error you saw\n\n```true\nincorrect css generated as shown and reproduced via the unit test above\n```\n\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 16.1.15\r\nNode: 18.13.0\r\nPackage Manager: yarn 1.22.19\r\nOS: darwin x64\n```\n\n\n### Anything else?\n\nconfirmed this works as expected in 14, not sure about 15","author":{"url":"https://github.com/johnwest80","@type":"Person","name":"johnwest80"},"datePublished":"2023-09-12T16:09:04Z","url":"https://github.com/angular/angular/issues/51743"}
| 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:2e894c82-a410-c923-f135-b555b1fd2ddc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C3FE:19E4BB:6E49BF:8EB1B7:6B00E2FF |
| html-safe-nonce | d51f2022c645dcd3f190b14bfeff762e95a2cb20bbae1cd68ad8e9bdef7bbe8d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0ZFOjE5RTRCQjo2RTQ5QkY6OEVCMUI3OjZCMDBFMkZGIiwidmlzaXRvcl9pZCI6IjE3MTkzNDM2MjczNDk1ODI1OTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 166ca5ce87782b2447417503f224978cca8b9ddf89c9633e343776e6e966792d |
| hovercard-subject-tag | issue:1892836358 |
| 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/51743/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cecda05a9a7b0b9d2b974e4d054269ab94276bc0b6e56c8765f8e3602e6e446b/angular/angular/issues/51743 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cecda05a9a7b0b9d2b974e4d054269ab94276bc0b6e56c8765f8e3602e6e446b/angular/angular/issues/51743 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? compiler Is this a regression? Yes Description Below is the css and unit test i wrote to confirm it's generated incorrectly. original css :hos... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | johnwest80 |
| 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