Skip to content

Instantly share code, notes, and snippets.

@mrshawnspencer
Created October 18, 2019 20:08
Show Gist options
  • Save mrshawnspencer/2d229916348be431d5ef2207db9dcf3b to your computer and use it in GitHub Desktop.
Save mrshawnspencer/2d229916348be431d5ef2207db9dcf3b to your computer and use it in GitHub Desktop.
<!--
Angular/HTML/CSS
Sometimes, when you work with a corporate CMS,you cannot predict what people do.
I encountered sections on a corporate website with lots of empty DIVs. That
created lots of white space and negatively affected the layout.
You can hide empty DIVs with (S)CSS: div:empty { display: none !important; }
Or you can add an ng-container with *ngIf, shown below.
-->
<ng-container *ngIf="text">
<div id="card-text" class="card-text" *scRichText="text"></div>
</ng-container>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment