MCPcopy Create free account
hub / github.com/angular/components / setRowStyles

Method setRowStyles

src/material/grid-list/tile-styler.ts:224–238  ·  view source on GitHub ↗
(
    tile: MatGridTile,
    rowIndex: number,
    percentWidth: number,
    gutterWidth: number,
  )

Source from the content-addressed store, hash-verified

222 }
223
224 setRowStyles(
225 tile: MatGridTile,
226 rowIndex: number,
227 percentWidth: number,
228 gutterWidth: number,
229 ): void {
230 let percentHeightPerTile = percentWidth / this.rowHeightRatio;
231 this.baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterWidth);
232
233 // Use padding-top and margin-top to maintain the given aspect ratio, as
234 // a percentage-based value for these properties is applied versus the *width* of the
235 // containing block. See http://www.w3.org/TR/CSS2/box.html#margin-properties
236 tile._setStyle('marginTop', this.getTilePosition(this.baseTileHeight, rowIndex));
237 tile._setStyle('paddingTop', calc(this.getTileSize(this.baseTileHeight, tile.rowspan)));
238 }
239
240 override getComputedHeight(): [string, string] {
241 return [

Callers

nothing calls this directly

Calls 2

calcFunction · 0.85
_setStyleMethod · 0.80

Tested by

no test coverage detected