Socket
Socket
Sign inDemoInstall

styled-components

Package Overview
Dependencies
Maintainers
1
Versions
358
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

styled-components - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

lib/constructors/css.js

@@ -34,3 +34,3 @@ "use strict";

var declaration = /^\s*([\w-]+):\s*([^;]*);\s*$/;
var startNesting = /^\s*([\w\.#:&>][^{]+?)\s*\{\s*$/;
var startNesting = /^\s*([\w\.#:&>~+][^{]+?)\s*\{\s*$/;
var stopNesting = /^\s*}\s*$/;

@@ -37,0 +37,0 @@

@@ -16,3 +16,4 @@ 'use strict';

_templateObject13 = _taggedTemplateLiteral(['\n text-decoration: none;\n &:hover, &:active, :root.ios & {\n text-decoration: underline;\n }\n '], ['\n text-decoration: none;\n &:hover, &:active, :root.ios & {\n text-decoration: underline;\n }\n ']),
_templateObject14 = _taggedTemplateLiteral(['\n position: relative;\n img {\n position: absolute;\n &.-in-flow {\n position: static;\n }\n }\n > span {\n font-weight: bold;\n html.ios & {\n font-weight: normal;\n }\n }\n '], ['\n position: relative;\n img {\n position: absolute;\n &.-in-flow {\n position: static;\n }\n }\n > span {\n font-weight: bold;\n html.ios & {\n font-weight: normal;\n }\n }\n ']);
_templateObject14 = _taggedTemplateLiteral(['\n position: relative;\n img {\n position: absolute;\n &.-in-flow {\n position: static;\n }\n }\n > span {\n font-weight: bold;\n html.ios & {\n font-weight: normal;\n }\n }\n '], ['\n position: relative;\n img {\n position: absolute;\n &.-in-flow {\n position: static;\n }\n }\n > span {\n font-weight: bold;\n html.ios & {\n font-weight: normal;\n }\n }\n ']),
_templateObject15 = _taggedTemplateLiteral(['\n animation: fade-in 1s both;\n + * {\n animation: fade-in 1s 1s both;\n }\n ~ * {\n animation: fade-in 1s 2s both;\n }\n '], ['\n animation: fade-in 1s both;\n + * {\n animation: fade-in 1s 1s both;\n }\n ~ * {\n animation: fade-in 1s 2s both;\n }\n ']);

@@ -94,3 +95,7 @@ var _expect = require('expect');

});
it('should all nesting syntaxes', function () {
(0, _expect2.default)((0, _css2.default)(_templateObject15)).toEqual((0, _concat2.default)((0, _rule2.default)('animation', 'fade-in 1s both'), (0, _nested2.default)('+ *', (0, _rule2.default)('animation', 'fade-in 1s 1s both')), (0, _nested2.default)('~ *', (0, _rule2.default)('animation', 'fade-in 1s 2s both'))));
});
});
});
{
"name": "styled-components",
"version": "0.0.3",
"version": "0.0.4",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -9,3 +9,3 @@ import camelize from 'fbjs/lib/camelizeStyleName'

const declaration = /^\s*([\w-]+):\s*([^;]*);\s*$/
const startNesting = /^\s*([\w\.#:&>][^{]+?)\s*\{\s*$/
const startNesting = /^\s*([\w\.#:&>~+][^{]+?)\s*\{\s*$/
const stopNesting = /^\s*}\s*$/

@@ -12,0 +12,0 @@

@@ -137,3 +137,23 @@ import expect from 'expect'

})
it('should all nesting syntaxes', () => {
expect(css`
animation: fade-in 1s both;
+ * {
animation: fade-in 1s 1s both;
}
~ * {
animation: fade-in 1s 2s both;
}
`).toEqual(concat(
rule('animation', 'fade-in 1s both'),
nested('+ *',
rule('animation', 'fade-in 1s 1s both')
),
nested('~ *',
rule('animation', 'fade-in 1s 2s both')
)
))
})
})
})
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