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

csstyle

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csstyle - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

.sass-cache/ac45cccdb0baf943d441fe9094d6333199cb955b/nested-multiple-pseudo.scssc

2

bower.json
{
"name": "csstyle",
"version": "1.4.0",
"version": "1.4.1",
"homepage": "http://www.csstyle.io",

@@ -5,0 +5,0 @@ "authors": [

@@ -26,3 +26,10 @@ // csstyle for postcss

var previous = selectors[index - 1] || {};
var next = selectors[index + 1] || {};
var spacing = '';
// spacing required after pseudo-selectors
if (selector.pseudo) {
spacing = ' ';
output += joinSelectorProps(selector, true) + spacing;
return;
}
// regular spacing before and after non-csstyle selectors

@@ -36,7 +43,6 @@ if(selector.type === 'other' || previous.type === 'other'){

spacing = ' ';
output += spacing + component.prefix + component.name + selector.prefix + selector.name;
output += spacing + joinSelectorProps(component) + joinSelectorProps(selector);
return;
}
output += spacing + selector.prefix + selector.name;
output += spacing + joinSelectorProps(selector);
});

@@ -49,2 +55,13 @@

};
/**
* Join selecor data into a single string
* - pseudo-classes or pseudo-elements require explicit request
*/
function joinSelectorProps(selector, usePseudoSelector) {
return selector.prefix +
selector.name +
(usePseudoSelector ? selector.pseudo : '') +
(selector.comma ? selector.comma : '');
}

@@ -65,4 +82,4 @@ /**

var res = Object.keys(types).map(function(type){
var regexp = new RegExp('('+type+'\\(([^)]*)\\))');
// var match = selector.match(/(component\(([^)]*)\))/);
var regexp = new RegExp('('+type+'\\(([^)]*)\\)(\\:.+)?(\\,)?)');
// var match = selector.match(/component\(([^)]*)\)(\:.+)?/);
return {

@@ -85,2 +102,4 @@ type: type,

name: res.match[2],
pseudo: (res.match[3] != null) ? res.match[3] : '',
comma: (res.match[4] != null) ? res.match[4] + ' ' : '',
prefix: types[res.type]

@@ -97,2 +116,2 @@ };

module.exports()(css);
};
};

@@ -5,3 +5,6 @@ module.exports = function(grunt) {

options: {
additionalFiles: ['bower.json']
additionalFiles: ['bower.json'],
commitMessage: 'v<%= version %>',
tagName: 'v<%= version %>',
tagMessage: 'v<%= version %>'
}

@@ -8,0 +11,0 @@ }

{
"name": "csstyle",
"version": "1.4.0",
"version": "1.4.1",
"description": "clean, simple styling for styling the web.",

@@ -14,2 +14,5 @@ "directories": {

"glob": "^4.3.5",
"grunt": "~0.4.5",
"grunt-release": "~0.12.0",
"jasmine-node": "^1.14.5",
"postcss": "^4.0.4",

@@ -19,5 +22,3 @@ "postcss-nested": "^0.2.1",

"shelljs": "~0.3.0",
"specificity": "~0.1.4",
"grunt": "~0.4.5",
"grunt-release": "~0.12.0"
"specificity": "~0.1.4"
},

@@ -24,0 +25,0 @@ "main": "csstyle.js",

@@ -78,3 +78,3 @@ # [csstyle](http://csstyle.io)

**IMPORTANT NOTE** All characters besides `_` need to be escaped! However, if you are using dashes, only _the first one_ needs to be escaped. Use two backslashes to properly escape in SASS. For example to use a forward slash to separate parts, set $csstyle-part-symbol to `\\/`.
**IMPORTANT NOTE** All characters besides `_` need to be escaped! However, if you are using dashes, only _the first one_ needs to be escaped. Use two backslashes to properly escape. For example to use a forward slash to separate parts, set $csstyle-part-symbol to `\\/`. The generated CSS classes will then be escaped with a single backslash.

@@ -85,7 +85,3 @@

### Can I use this with Libsass?
People using webpack or similar often want to load Sass via libsass.
Unfortunately libsass is quite behind the ruby Sass and some things are [still missing](https://sass-compatibility.github.io/)
before it will work with csstyle. As a workaround while we wait for libsass you
can load your Sass files with the [ruby Sass loader](https://github.com/ddelbondio/ruby-sass-loader) and it will work just fine, it just
won't be as fast as libsass.
Yes. Libsass version 3.2.0 or greater fully supports csstyle.

@@ -113,4 +109,1 @@ ### How do parts react to component states like hover?

MIT
## TODO
- make postcss version configurable too
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