Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cornerbox

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cornerbox - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

24

CornerBox.js

@@ -5,4 +5,4 @@ class cornerBox {

return [
`--cornerbox-lenght`,
`--cornerbox-line`,
`--cornerbox-width`,
`--cornerbox-length`,
`--cornerbox-color`,

@@ -14,4 +14,4 @@

paint(ctx, size, props) {
const lineBox = parseInt(props.get(`--cornerbox-line`));
const lineBoxLenght = parseInt(props.get(`--cornerbox-lenght`));
const lineBox = parseInt(props.get(`--cornerbox-length`));
const lineBoxwidth = parseInt(props.get(`--cornerbox-width`));
const colorBox = props.get(`--cornerbox-color`).toString().trim();

@@ -24,23 +24,23 @@

ctx.moveTo(0, 0);
ctx.lineTo(0, lineBoxLenght);
ctx.lineTo(0, lineBoxwidth);
ctx.moveTo(0, 0);
ctx.lineTo(lineBoxLenght, 0);
ctx.lineTo(lineBoxwidth, 0);
/* Up Right */
ctx.moveTo(size.width-lineBoxLenght, 0);
ctx.moveTo(size.width-lineBoxwidth, 0);
ctx.lineTo(size.width, 0);
ctx.moveTo(size.width, 0);
ctx.lineTo(size.width, lineBoxLenght);
ctx.lineTo(size.width, lineBoxwidth);
/* Down Left */
ctx.moveTo(0, size.height-lineBoxLenght);
ctx.moveTo(0, size.height-lineBoxwidth);
ctx.lineTo(0, size.height);
ctx.moveTo(0, size.height);
ctx.lineTo(lineBoxLenght, size.height);
ctx.lineTo(lineBoxwidth, size.height);
/* Down Right */
ctx.moveTo(size.width, size.height-lineBoxLenght);
ctx.moveTo(size.width, size.height-lineBoxwidth);
ctx.lineTo(size.width, size.height);
ctx.moveTo(size.width, size.height);
ctx.lineTo(size.width-lineBoxLenght, size.height);
ctx.lineTo(size.width-lineBoxwidth, size.height);

@@ -47,0 +47,0 @@ ctx.strokeStyle = colorBox;

{
"name": "cornerbox",
"version": "0.0.1",
"version": "0.0.2",
"description": "CSS Houdini CornerBox",

@@ -5,0 +5,0 @@ "main": "CornerBox.js",

@@ -29,3 +29,3 @@ [![GitHub license](https://img.shields.io/github/license/jerosoler/cornerbox)](https://github.com/jerosoler/cornerbox/blob/main/LICENSE)

CSS.registerProperty({
name: '--cornerbox-lenght',
name: '--cornerbox-width',
syntax: '<length>',

@@ -36,3 +36,3 @@ initialValue: '10px',

CSS.registerProperty({
name: '--cornerbox-line',
name: '--cornerbox-length',
syntax: '<length>',

@@ -60,6 +60,6 @@ initialValue: '10px',

--cornerbox-color:#1100fc;
--cornerbox-line: 5px;
--cornerbox-lenght: 15px;
--cornerbox-width: 5px;
--cornerbox-length: 15px;
background-image: paint(cornerbox);
}
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc