react-with-styles-interface-aphrodite
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -0,1 +1,4 @@ | ||
## v2.0.1 | ||
- Fix RTL support for pseudoselectors and match media queries | ||
## v2.0.0 | ||
@@ -2,0 +5,0 @@ - Add RTL support in the resolve method |
@@ -7,2 +7,4 @@ Object.defineProperty(exports, "__esModule", { | ||
var styleDefRegex = /\.[^{}]+\{[^{}]+\}/g; | ||
/* | ||
@@ -22,11 +24,7 @@ * When automatically flipping CSS styles in our interface, instead of determining RTL/LTR context | ||
// generated may include more than one style definition. We want to prefix each one individually. | ||
// This primarily happens for pseudo selectors for which generated looks like | ||
// .classname::selector{...}.classname::otherselector{...} | ||
// This is the only case we really worry about, and as a result, we split on '}.' which marks the | ||
// end of style definition and beginning of a new one. | ||
var styleDefs = generated.split('}.').map(function (g) { | ||
// generated may include more than one style definition (pseudoselectors, matchmedia, etc.). | ||
// We want to prefix each one individually. | ||
return generated.replace(styleDefRegex, function (g) { | ||
return '[dir="rtl"] ' + String(g); | ||
}); | ||
return styleDefs.join('}.'); | ||
} | ||
@@ -33,0 +31,0 @@ |
{ | ||
"name": "react-with-styles-interface-aphrodite", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "react-with-styles interface for Aphrodite", | ||
@@ -50,6 +50,9 @@ "main": "lib/aphroditeInterface.js", | ||
"eslint": "^3.13.1", | ||
"eslint-config-airbnb-base": "^11.0.1", | ||
"eslint-config-airbnb": "^15.1.0", | ||
"eslint-plugin-import": "^2.2.0", | ||
"eslint-plugin-jsx-a11y": "^5.1.1", | ||
"eslint-plugin-react": "^7.3.0", | ||
"in-publish": "^2.0.0", | ||
"mocha": "^3.2.0", | ||
"prop-types": "^15.5.10", | ||
"react": "^15.4.2", | ||
@@ -56,0 +59,0 @@ "react-dom": "^15.4.2", |
export const RTL_SELECTOR = '_rtl'; | ||
const styleDefRegex = /\.[^{}]+\{[^{}]+\}/g; | ||
/* | ||
@@ -17,9 +19,5 @@ * When automatically flipping CSS styles in our interface, instead of determining RTL/LTR context | ||
// generated may include more than one style definition. We want to prefix each one individually. | ||
// This primarily happens for pseudo selectors for which generated looks like | ||
// .classname::selector{...}.classname::otherselector{...} | ||
// This is the only case we really worry about, and as a result, we split on '}.' which marks the | ||
// end of style definition and beginning of a new one. | ||
const styleDefs = generated.split('}.').map(g => `[dir="rtl"] ${g}`); | ||
return styleDefs.join('}.'); | ||
// generated may include more than one style definition (pseudoselectors, matchmedia, etc.). | ||
// We want to prefix each one individually. | ||
return generated.replace(styleDefRegex, g => `[dir="rtl"] ${g}`); | ||
} | ||
@@ -26,0 +24,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
44531
26
931
0
19