问题 Is it possible to add inline style css variable using Renderer2 ? I tried the following but it doesn't work. import { Component, OnChanges, Output, ViewChild, Renderer2, ElementRef, ViewEncapsulation } from '@angular/core'; @Component({ }) export class CollapsibleComponent implements OnChanges { @ViewChild('collapsibleContent') collapsibleContent: ElementRef; constructor( private renderer: Renderer2 ) { } ngOnChanges() { this.measureCollapsibleContents() } measureCollapsibleContents() { this