File tree Expand file tree Collapse file tree 2 files changed +0
-20
lines changed
packages/vaadin-themable-mixin Expand file tree Collapse file tree 2 files changed +0
-20
lines changed Original file line number Diff line number Diff line change 1- import type { CSSResultGroup } from 'lit' ;
2-
31/**
42 * @license
53 * Copyright (c) 2017 - 2025 Vaadin Ltd.
64 * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
75 */
86export { registerStyles , css , unsafeCSS } from './vaadin-themable-mixin.js' ;
9- export const addGlobalThemeStyles : ( id : string , ...styles : CSSResultGroup [ ] ) => void ;
Original file line number Diff line number Diff line change 44 * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
55 */
66export { registerStyles , css , unsafeCSS } from './vaadin-themable-mixin.js' ;
7-
8- /**
9- * This is for use internally by Lumo and Material styles.
10- *
11- * @param {string } id the id to set on the created element, only for informational purposes
12- * @param {CSSResultGroup[] } styles the styles to add
13- */
14- export const addGlobalThemeStyles = ( id , ...styles ) => {
15- const styleTag = document . createElement ( 'style' ) ;
16- styleTag . id = id ;
17- styleTag . textContent = styles
18- . map ( ( style ) => style . toString ( ) )
19- . join ( '\n' )
20- . replace ( ':host' , 'html' ) ;
21-
22- document . head . insertAdjacentElement ( 'afterbegin' , styleTag ) ;
23- } ;
You can’t perform that action at this time.
0 commit comments