Skip to content

The ElianCodes Background as a CSS Houdini Paint Worklet

Notifications You must be signed in to change notification settings

ElianCodes/eliancodes-bg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eliancodes-bg

The ElianCodes Background as a CSS Houdini Paint Worklet

installation

NPM

npm i eliancodes-bg

CDN

https://unpkg.com/eliancodes-bg@0.0.1/index.js

Usage

Properties

--color-for-bg

takes in a color and uses it to render the background

Example

<html class="bg">
    <body>
        <style>
            .bg {
                --color-for-bg: lightgreen;
                background-image: Paint(eliancodes-bg);
            }
        </style>
        <script>
            CSS.paintWorklet.addModule('https://unpkg.com/eliancodes-bg@0.0.1/index.js')
        </script>
    </body>
</html>

About

The ElianCodes Background as a CSS Houdini Paint Worklet

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published