Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

jerosoler/cornerbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

8 Commits

Repository files navigation

GitHub license

CornerBox

CSS Houdini library.

PLAY

Demo

CDN

<script src="https://cdn.jsdelivr.net/gh/jerosoler/cornerbox/CornerBox.js"></script>

NPM

npm install cornerbox

How to use

Download Cornerbox.js file.

Javascript:

if ('paintWorklet' in CSS && 'registerProperty' in CSS && 'CSSUnitValue' in window) {
 CSS.registerProperty({
 name: '--cornerbox-width',
 syntax: '<length>',
 initialValue: '10px',
 inherits: false
 });
 CSS.registerProperty({
 name: '--cornerbox-length',
 syntax: '<length>',
 initialValue: '10px',
 inherits: false
 });
 CSS.registerProperty({
 name: '--cornerbox-color',
 syntax: '<color>',
 initialValue: '#ffffff',
 inherits: false
 });
 CSS.paintWorklet.addModule('CornerBox.js');
 } else {
 console.log("Not Supported");
 alert("Not Supported");
 }

CSS

div {
 --cornerbox-color:#1100fc;
 --cornerbox-width: 5px;
 --cornerbox-length: 15px;
 background-image: paint(cornerbox);
}

About

🎨 CSS Houdini corner box

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /