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

stylus

Package Overview
Dependencies
Maintainers
0
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylus - npm Package Compare versions

Comparing version 0.6.7 to 0.7.0

lib/._colors.js

6

._History.md

@@ -1,4 +0,4 @@

Mac OS X  2��ATTR�����"�"com.macromates.caret{
column = 30;
line = 4;
Mac OS X  2��ATTR��~��!�!com.macromates.caret{
column = 0;
line = 8;
}

@@ -0,0 +0,0 @@ Mac OS X  2��ATTR�����"�"com.macromates.caret{

@@ -0,0 +0,0 @@ Mac OS X  2��ATTR�����#�#com.macromates.caret{

0.7.0 / 2011-03-02
==================
* Added `is` and `is not` aliases for `==` and `!=`
* Added __@keyframes__ dynamic name support
* Fixed units in interpolation
* Fixed clamping of HSLA degrees / percentages
0.6.7 / 2011-03-01

@@ -3,0 +11,0 @@ ==================

@@ -1,4 +0,4 @@

Mac OS X  2��ATTR�����#�#com.macromates.caret{
column = 0;
line = 458;
Mac OS X  2��ATTR�����!�!com.macromates.caret{
column = 9;
line = 2;
}

@@ -1,4 +0,4 @@

Mac OS X  2��ATTR�����#�#com.macromates.caret{
column = 24;
line = 25;
Mac OS X  2��ATTR�����!�!com.macromates.caret{
column = 9;
line = 2;
}

@@ -1,4 +0,4 @@

Mac OS X  2��ATTR�����#�#com.macromates.caret{
column = 0;
line = 134;
Mac OS X  2��ATTR�����!�!com.macromates.caret{
column = 9;
line = 2;
}
/*!
* CSS - colors
* Stylus - colors
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

@@ -0,0 +0,0 @@ Mac OS X  2��ATTR�����$�$com.macromates.caret{

/*!
* CSS - plugin - url
* Stylus - plugin - url
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -6,0 +6,0 @@ * MIT Licensed

/*!
* CSS - Evaluator - built-in functions
* Stylus - Evaluator - built-in functions
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - plugin - url
* Stylus - plugin - url
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Lexer
* Stylus - Lexer
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -20,4 +20,6 @@ * MIT Licensed

var alias = {
and: '&&'
, or: '||'
'and': '&&'
, 'or': '||'
, 'is': '=='
, 'is not': '!='
};

@@ -349,2 +351,4 @@

* | 'or'
* | 'is'
* | 'is not'
* | 'is a'

@@ -356,3 +360,3 @@ * | 'is defined'

var captures;
if (captures = /^(not|and|or|is a|is defined)\b( *)/.exec(this.str)) {
if (captures = /^(not|and|or|is a|is defined|is not|is)\b( *)/.exec(this.str)) {
var op = captures[1];

@@ -359,0 +363,0 @@ this.skip(captures);

/*!
* CSS - middleware
* Stylus - middleware
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

Mac OS X  2��ATTR����� � com.macromates.caretx���R������<[k0?'3/«��
Mac OS X  2��ATTR����� � com.macromates.caretx���R������<[k0?'3/«��
Mac OS X  2��ATTR����� � com.macromates.caretx���R������<[k0?'3/«��

@@ -1,4 +0,4 @@

Mac OS X  2��ATTR�����$�$com.macromates.caret{
column = 10;
line = 146;
Mac OS X  2��ATTR�����#�#com.macromates.caret{
column = 0;
line = 230;
}

@@ -0,0 +0,0 @@ Mac OS X  2��ATTR�����"�"com.macromates.caret{

Mac OS X  2��ATTR����� � com.macromates.caretx���R������<[k0?'3/«��
Mac OS X  2��ATTR����� � com.macromates.caretx���R������<[k0?'3/«��

@@ -0,0 +0,0 @@ Mac OS X  2��ATTR�����"�"com.macromates.caret{

/*!
* CSS - BinOp
* Stylus - BinOp
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Block
* Stylus - Block
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Boolean
* Stylus - Boolean
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Call
* Stylus - Call
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Charset
* Stylus - Charset
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Color
* Stylus - Color
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Each
* Stylus - Each
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Expression
* Stylus - Expression
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Function
* Stylus - Function
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Group
* Stylus - Group
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - HSLA
* Stylus - HSLA
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -27,5 +27,5 @@ * MIT Licensed

Node.call(this);
this.h = h;
this.s = s;
this.l = l;
this.h = clampDegrees(h);
this.s = clampPercentage(s);
this.l = clampPercentage(l);
this.a = clampAlpha(a);

@@ -121,3 +121,34 @@ this.hsl = this;

HSLA.prototype.operate = function(op, right){
return this.rgba.operate(op, right.rgba).hsl;
switch (op) {
case '+':
return new HSLA(
this.h + right.h
, this.s + right.s
, this.l + right.l
, 1 == right.a ? this.a : (this.a + right.a)
);
case '-':
return new HSLA(
this.h - right.h
, this.s - right.s
, this.l - right.l
, 1 == right.a ? this.a : (this.a - right.a)
);
case '*':
return new HSLA(
this.h * right.h
, this.s * right.s
, this.l * right.l
, this.a * right.a
);
case '/':
return new HSLA(
this.h / right.h
, this.s / right.s
, this.l / right.l
, this.a / right.a
);
default:
return Node.prototype.operate.call(this, op, right);
}
};

@@ -168,2 +199,26 @@

/**
* Clamp degree `n` >= 0 and <= 360.
*
* @param {Number} n
* @return {Number}
* @api private
*/
function clampDegrees(n) {
return Math.max(0, Math.min(n, 360));
}
/**
* Clamp percentage `n` >= 0 and <= 100.
*
* @param {Number} n
* @return {Number}
* @api private
*/
function clampPercentage(n) {
return Math.max(0, Math.min(n, 100));
}
/**
* Clamp alpha `n` >= 0 and <= 1.

@@ -170,0 +225,0 @@ *

/*!
* CSS - Ident
* Stylus - Ident
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - If
* Stylus - If
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Import
* Stylus - Import
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - nodes
* Stylus - nodes
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Keyframes
* Stylus - Keyframes
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Literal
* Stylus - Literal
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Media
* Stylus - Media
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Node
* Stylus - Node
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Null
* Stylus - Null
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Page
* Stylus - Page
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Params
* Stylus - Params
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Property
* Stylus - Property
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Return
* Stylus - Return
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Root
* Stylus - Root
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Selector
* Stylus - Selector
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - String
* Stylus - String
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Ternary
* Stylus - Ternary
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - UnaryOp
* Stylus - UnaryOp
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Unit
* Stylus - Unit
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Parser
* Stylus - Parser
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -623,4 +623,3 @@ * MIT Licensed

, _ = this.css
, name = this.id.name
, keyframes = new nodes.Keyframes(name);
, keyframes = new nodes.Keyframes(this.id);

@@ -627,0 +626,0 @@ // css-sty;e

/*!
* CSS - Renderer
* Stylus - Renderer
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - stack - Frame
* Stylus - stack - Frame
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Stack
* Stylus - Stack
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - stack - Scope
* Stylus - stack - Scope
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS
* Stylus
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -26,3 +26,3 @@ * MIT Licensed

exports.version = '0.6.7';
exports.version = '0.7.0';

@@ -29,0 +29,0 @@ /**

/*!
* CSS - Token
* Stylus - Token
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - utils
* Stylus - utils
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

@@ -1,4 +0,4 @@

Mac OS X  2��ATTR�����#�#com.macromates.caret{
column = 6;
line = 604;
Mac OS X  2��ATTR�����!�!com.macromates.caret{
column = 9;
line = 2;
}
/*!
* CSS - Compiler
* Stylus - Compiler
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

/*!
* CSS - Evaluator
* Stylus - Evaluator
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -162,2 +162,11 @@ * MIT Licensed

/**
* Visit Keyframes.
*/
Evaluator.prototype.visitKeyframes = function(keyframes){
keyframes.name = this.visit(keyframes.name).first.name;
return keyframes;
};
/**
* Visit Function.

@@ -767,2 +776,3 @@ */

case 'string':
case 'unit':
return node.val;

@@ -769,0 +779,0 @@ case 'expression':

/*!
* CSS - Visitor
* Stylus - Visitor
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>

@@ -5,0 +5,0 @@ * MIT Licensed

{ "name": "stylus"
, "description": "Robust, expressive language which compiles to CSS"
, "version": "0.6.7"
, "version": "0.7.0"
, "author": "TJ Holowaychuk <tj@vision-media.ca>"

@@ -5,0 +5,0 @@ , "keywords": ["css", "parser", "style", "stylesheets", "jade", "language"]

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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