Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress CSS warnings on build related to /deep/ #775

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

jahow
Copy link
Collaborator

@jahow jahow commented Jan 18, 2024

Replaced by ::ng-deep, also made sure that we always have :host in front to avoid leaking styles.

See https://angular.io/guide/component-styles#deprecated-deep--and-ng-deep

We still rely on applying styles further down an element children so we can't really get rid of these. I'm not sure if an alternative will show up in the future, but at least for now we won't have as many warnings on builds.

Copy link
Contributor

Affected libs: ui-elements, feature-catalog, feature-record, feature-router, feature-search, feature-map, feature-dataviz, ui-catalog, ui-search, ui-inputs, feature-editor, ui-layout,
Affected apps: datahub, metadata-editor, demo, webcomponents, map-viewer, search, metadata-converter, datafeeder,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

@coveralls
Copy link

Coverage Status

coverage: 82.287% (-1.7%) from 83.965%
when pulling 5bc4968 on suppress-css-deep-warning
into 4983265 on main.

@@ -1,5 +1,5 @@
/** Body **/
:host /deep/ .markdown-body {
:host ::ng-deep .markdown-body {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw why do we need ng-deep if it's in the same component ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because the content generated through innerHtml will not be affected by the component stylesheet.

@fgravin fgravin merged commit 0eef273 into main Jan 26, 2024
8 checks passed
@fgravin fgravin deleted the suppress-css-deep-warning branch January 26, 2024 13:00
jahow added a commit that referenced this pull request Jan 29, 2024
Followup of #775

A typo in the button CSS was causing a visual issue
@jahow jahow mentioned this pull request Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants