MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / _inheritStyleScope

Function _inheritStyleScope

packages/core/ui/core/view-base/index.ts:1471–1487  ·  view source on GitHub ↗
(styleScope: StyleScope)

Source from the content-addressed store, hash-verified

1469 }
1470
1471 _inheritStyleScope(styleScope: StyleScope): void {
1472 // If we are styleScope don't inherit parent stylescope.
1473 // TODO: Consider adding parent scope and merge selectors.
1474 if (this._isStyleScopeHost) {
1475 return;
1476 }
1477
1478 if (this._styleScope !== styleScope) {
1479 this._styleScope = styleScope;
1480 this._onCssStateChange();
1481 this.eachChild((child) => {
1482 child._inheritStyleScope(styleScope);
1483
1484 return true;
1485 });
1486 }
1487 }
1488
1489 /**
1490 * Shows the view passed as parameter as a modal view.

Callers

nothing calls this directly

Calls 1

eachChildMethod · 0.45

Tested by

no test coverage detected