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

@mattsjones/css-core

Package Overview
Dependencies
Maintainers
4
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mattsjones/css-core - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

6

CHANGELOG.md
# @mattsjones/css-core
## 0.0.12
### Patch Changes
- 29fa416: Fix selectors using class lists
## 0.0.11

@@ -4,0 +10,0 @@

14

generateCss/dist/mattsjones-css-core-generateCss.browser.cjs.js

@@ -98,3 +98,3 @@ 'use strict';

this.conditionalRules = [];
this.localClassNameRegex = localClassNames.length > 0 ? RegExp(`(^|[^\.])(${localClassNames.join('|')})`, 'g') : null;
this.localClassNameRegex = localClassNames.length > 0 ? RegExp(`(${localClassNames.join('|')})`, 'g') : null;
}

@@ -187,5 +187,11 @@

transformSelector(selector) {
return this.localClassNameRegex ? selector.replace(this.localClassNameRegex, (_, leadingChar, className) => `${leadingChar}.${cssesc__default['default'](className, {
isIdentifier: true
})}`) : selector;
return this.localClassNameRegex ? selector.replace(this.localClassNameRegex, (_, className, index) => {
if (index > 0 && selector[index - 1] === '.') {
return className;
}
return `.${cssesc__default['default'](className, {
isIdentifier: true
})}`;
}) : selector;
}

@@ -192,0 +198,0 @@

@@ -82,3 +82,3 @@ import postcssJs from 'postcss-js';

this.conditionalRules = [];
this.localClassNameRegex = localClassNames.length > 0 ? RegExp(`(^|[^\.])(${localClassNames.join('|')})`, 'g') : null;
this.localClassNameRegex = localClassNames.length > 0 ? RegExp(`(${localClassNames.join('|')})`, 'g') : null;
}

@@ -171,5 +171,11 @@

transformSelector(selector) {
return this.localClassNameRegex ? selector.replace(this.localClassNameRegex, (_, leadingChar, className) => `${leadingChar}.${cssesc(className, {
isIdentifier: true
})}`) : selector;
return this.localClassNameRegex ? selector.replace(this.localClassNameRegex, (_, className, index) => {
if (index > 0 && selector[index - 1] === '.') {
return className;
}
return `.${cssesc(className, {
isIdentifier: true
})}`;
}) : selector;
}

@@ -176,0 +182,0 @@

@@ -98,3 +98,3 @@ 'use strict';

this.conditionalRules = [];
this.localClassNameRegex = localClassNames.length > 0 ? RegExp(`(^|[^\.])(${localClassNames.join('|')})`, 'g') : null;
this.localClassNameRegex = localClassNames.length > 0 ? RegExp(`(${localClassNames.join('|')})`, 'g') : null;
}

@@ -187,5 +187,11 @@

transformSelector(selector) {
return this.localClassNameRegex ? selector.replace(this.localClassNameRegex, (_, leadingChar, className) => `${leadingChar}.${cssesc__default['default'](className, {
isIdentifier: true
})}`) : selector;
return this.localClassNameRegex ? selector.replace(this.localClassNameRegex, (_, className, index) => {
if (index > 0 && selector[index - 1] === '.') {
return className;
}
return `.${cssesc__default['default'](className, {
isIdentifier: true
})}`;
}) : selector;
}

@@ -192,0 +198,0 @@

@@ -98,3 +98,3 @@ 'use strict';

this.conditionalRules = [];
this.localClassNameRegex = localClassNames.length > 0 ? RegExp(`(^|[^\.])(${localClassNames.join('|')})`, 'g') : null;
this.localClassNameRegex = localClassNames.length > 0 ? RegExp(`(${localClassNames.join('|')})`, 'g') : null;
}

@@ -187,5 +187,11 @@

transformSelector(selector) {
return this.localClassNameRegex ? selector.replace(this.localClassNameRegex, (_, leadingChar, className) => `${leadingChar}.${cssesc__default['default'](className, {
isIdentifier: true
})}`) : selector;
return this.localClassNameRegex ? selector.replace(this.localClassNameRegex, (_, className, index) => {
if (index > 0 && selector[index - 1] === '.') {
return className;
}
return `.${cssesc__default['default'](className, {
isIdentifier: true
})}`;
}) : selector;
}

@@ -192,0 +198,0 @@

@@ -82,3 +82,3 @@ import postcssJs from 'postcss-js';

this.conditionalRules = [];
this.localClassNameRegex = localClassNames.length > 0 ? RegExp(`(^|[^\.])(${localClassNames.join('|')})`, 'g') : null;
this.localClassNameRegex = localClassNames.length > 0 ? RegExp(`(${localClassNames.join('|')})`, 'g') : null;
}

@@ -171,5 +171,11 @@

transformSelector(selector) {
return this.localClassNameRegex ? selector.replace(this.localClassNameRegex, (_, leadingChar, className) => `${leadingChar}.${cssesc(className, {
isIdentifier: true
})}`) : selector;
return this.localClassNameRegex ? selector.replace(this.localClassNameRegex, (_, className, index) => {
if (index > 0 && selector[index - 1] === '.') {
return className;
}
return `.${cssesc(className, {
isIdentifier: true
})}`;
}) : selector;
}

@@ -176,0 +182,0 @@

{
"name": "@mattsjones/css-core",
"version": "0.0.11",
"version": "0.0.12",
"main": "dist/mattsjones-css-core.cjs.js",

@@ -5,0 +5,0 @@ "module": "dist/mattsjones-css-core.esm.js",

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