A plugin for Babel v6 which transforms inline styles defined in JavaScript modules into class names so they become available to, e.g. the `className` prop of React elements. While transforming, the plugin processes all JavaScript style definitions found and bundles them up into a CSS file, ready to be requested from your web server.
On this line of transformObjectExpressionIntoStyleSheetObject, the string value is checked to see if it is blank, which is currently matching all whitespace characters.
This disallows CSS that looks like this:
const stylesheet = cssInJS({
default: {
':after': {
content: " " // There is a an empty space here so that the pseudo element renders
}
}
});
This is needed to do some styling things where content is not necessary for the pseudo element. A change that would fix this problem is simply:
assert(val.length >= 1, 'string value cannot be blank');
instead of the isBlank call. This still prevents empty strings, but allows deliberately white space strings for CSS properties.
On this line of transformObjectExpressionIntoStyleSheetObject, the string value is checked to see if it is blank, which is currently matching all whitespace characters.
This disallows CSS that looks like this:
This is needed to do some styling things where content is not necessary for the pseudo element. A change that would fix this problem is simply:
instead of the isBlank call. This still prevents empty strings, but allows deliberately white space strings for CSS properties.