Skip to content

Commit

Permalink
Minor documentation changes
Browse files Browse the repository at this point in the history
necolas committed Jul 12, 2022
1 parent d68751e commit 2b283a9
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -192,8 +192,8 @@ const styles = {
marginRight: 'margin-right-10',
marginBottom: 'margin-bottom-10',
opacity: 'opacity-07',
focus$opacity: 'focus-opacity-08',
active$opacity: 'active-opacity-1'
__focus$opacity: 'focus-opacity-08',
__active$opacity: 'active-opacity-1'
}
};
```
@@ -224,7 +224,7 @@ insertOrExtract('.xjrodmsp-opacity-1:focus a[data-prop] { opacity:1.0; }');
const styles = {
root: {
$$css: true,
'xjrodmsp-opacity-1': 'xjrodmsp-opacity-1'
'__xjrodmsp-opacity-1': 'xjrodmsp-opacity-1'
}
};
```
@@ -270,8 +270,8 @@ function View(props) {
const reset = {
$$css: true,
// Compiler decides that only one reset is allowed per element.
// Each reset rule created is set to the '$$reset' key.
$$reset: 'reset-<hash>',
// Each reset rule created is set to the '__reset' key.
__reset: 'reset-<hash>',
};
```
@@ -381,7 +381,7 @@ const themeVars = {

const themeStyle = {
$$css: true,
$$theme: 'theme-default'
__theme: 'theme-default'
};

const [ className ] = styleq(themeStyle, props.style);
@@ -469,9 +469,9 @@ insertOrExtract('.s-1 { height:100px; width:100px }', 1);
// rule will be applied to each element.
const oocss1 = {
$$css: true,
colorScheme: 'cs-1',
padding: 'p-1',
size: 's-1'
__cs: 'cs-1',
__p: 'p-1',
__s: 's-1'
};

const View = (props) => (
@@ -480,8 +480,8 @@ const View = (props) => (

const oocss2 = {
$$css: true,
colorScheme: 'cs-2',
padding: 'p-2'
__cs: 'cs-2',
__p: 'p-2'
}

const StyledView = (props) => (
4 changes: 2 additions & 2 deletions test/styleq.test.js
Original file line number Diff line number Diff line change
@@ -175,7 +175,7 @@ describe('styleq()', () => {
expect(inlineStyle2).toEqual(null);
});

test('preserves order of inline style', () => {
test('preserves order of stringified inline style', () => {
const [, inlineStyle] = styleq([{ font: 'inherit', fontSize: 12 }]);
const str = stringifyInlineStyle(inlineStyle);
expect(str).toMatchInlineSnapshot(`"font:inherit;fontSize:12;"`);
@@ -211,7 +211,7 @@ describe('styleq()', () => {
expect(inlineStyle2).toEqual({ a: null });
});

test('disableMix preserves stringified order of inline style', () => {
test('disableMix preserves order of stringified inline style', () => {
const [, inlineStyle] = styleqNoMix([{ font: 'inherit', fontSize: 12 }]);
const str = stringifyInlineStyle(inlineStyle);
expect(str).toMatchInlineSnapshot(`"font:inherit;fontSize:12;"`);

0 comments on commit 2b283a9

Please sign in to comment.