@codebakery/origami
Version:
Angular + Polymer
28 lines (27 loc) • 1.17 kB
TypeScript
import { InjectionToken } from '@angular/core';
/**
* By default, Origami will not parse or register styles with ShadyCSS if the
* platform supports native CSS custom properties. However, ShadyCSS also
* supports the deprecated `@apply` mixin proposal. If a project is using
* `@apply` in CSS, this token should be provided with a true value.
*/
export declare const USING_APPLY: InjectionToken<boolean>;
/**
* Processes all current document stylesheets added by Angular and registers
* them with ShadyCSS.
*
* This function will also parse external `<link>` stylesheets if native
* CSS custom properties are not supported, or if `usingApply` is set to true.
*
* @param usingApply if true, parse stylesheets regardless of native support,
* since no browser supports `@apply` natively
* @returns a Promise when all stylesheets have been processed
*/
export declare function processStylesheets(usingApply?: boolean): Promise<void>;
/**
* Returns true if the provided node is a `<style>` node.
*
* @param node the node to test
* @returns true if the node is a `<style>` node
*/
export declare function isStyleNode(node: Node): node is HTMLStyleElement;