Skip to main content
Module

x/pouch/deps.ts>changeCss

Collection of Web Components
Latest
function changeCss
import { changeCss } from "https://deno.land/x/pouch@v0.0.8/deps.ts";

Takes a JavaScript style object and an optional selector (default is the custom element itself) and adds or changes specific inline styles to the element matching the selector without altering other style values. CSS custom properties (variables) are allowed.

Parameters

styles: Record<string, string>
...elements: HTMLElement[]