MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / appendCss

Method appendCss

packages/core/ui/styling/style-scope.ts:888–905  ·  view source on GitHub ↗
(cssString: string, cssFileName?)

Source from the content-addressed store, hash-verified

886
887 @profile
888 private appendCss(cssString: string, cssFileName?): void {
889 if (!cssString && !cssFileName) {
890 return;
891 }
892 if (cssFileName) {
893 this._cssFiles.push(cssFileName);
894 currentScopeTag = cssFileName;
895 }
896
897 const cssFile = cssString ? CSSSource.fromSource(cssString, cssFileName) : CSSSource.fromURI(cssFileName);
898
899 currentScopeTag = null;
900 this._css = this._css + cssFile.source;
901 this._localCssSelectors.push(...cssFile.selectors);
902 this._localCssKeyframes.push(...cssFile.keyframes);
903 this._localCssSelectorVersion++;
904 this.ensureSelectors();
905 }
906
907 public getKeyframeAnimationWithName(animationName: string): KeyframeAnimationInfo {
908 if (!this._mergedCssKeyframes) {

Callers 2

addCssMethod · 0.95
addCssFileMethod · 0.95

Calls 4

ensureSelectorsMethod · 0.95
fromSourceMethod · 0.80
fromURIMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected