-
-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added fallbacks test to fn rules * only call onChangeValue if plugins: true * enable removing props from fn rules * shorter syntax with coercion * wip full syntax support * restore browsers.json * changelog * move hook call to the core * isProcessed flag explanation * added tests to fn rules * remove media rule as a function test case * added a test for #796, as part of #682 * tests for compose plugin * observables - move documentation to the package - update docs, since plugins don't apply by default - introduce option process: true to the plugin to enable plugins if user wants that * move fn values docs * wording * support typed cssom * Update docs/json-api.md * Update changelog.md
- Loading branch information
Showing
16 changed files
with
202 additions
and
1,312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 12 additions & 12 deletions
24
packages/jss-plugin-syntax-rule-value-function/.size-snapshot.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 12 additions & 12 deletions
24
packages/jss-plugin-syntax-rule-value-observable/.size-snapshot.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import expect from 'expect.js' | ||
import {create} from '../../src' | ||
import {createGenerateClassName, hasCSSTOMSupport, computeStyle} from '../utils' | ||
|
||
describe('Functional: houdini', () => { | ||
if (!hasCSSTOMSupport) return | ||
|
||
let jss | ||
|
||
beforeEach(() => { | ||
jss = create({createGenerateClassName}) | ||
}) | ||
|
||
describe('use unit value', () => { | ||
let sheet | ||
|
||
beforeEach(() => { | ||
sheet = jss | ||
.createStyleSheet( | ||
{ | ||
a: { | ||
margin: CSS.px(42) | ||
} | ||
}, | ||
{link: true} | ||
) | ||
.attach() | ||
}) | ||
|
||
it('should render correctly', () => { | ||
expect(computeStyle(sheet.classes.a).margin).to.be('42px') | ||
}) | ||
|
||
it('should delete property', () => { | ||
sheet.getRule('a').prop('margin', null) | ||
expect(computeStyle(sheet.classes.a).margin).to.be('0px') | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import expect from 'expect.js' | ||
import {stripIndent} from 'common-tags' | ||
import {create} from '../../src' | ||
import {createGenerateClassName, hasCSSTOMSupport} from '../utils' | ||
|
||
describe('Integration: houdini', () => { | ||
if (!hasCSSTOMSupport) return | ||
|
||
let jss | ||
|
||
beforeEach(() => { | ||
jss = create({createGenerateClassName}) | ||
}) | ||
|
||
describe('use unit value', () => { | ||
let sheet | ||
const margin = CSS.px(42) | ||
|
||
beforeEach(() => { | ||
sheet = jss.createStyleSheet({ | ||
a: { | ||
margin | ||
} | ||
}) | ||
}) | ||
|
||
it('should get value from .prop()', () => { | ||
expect(sheet.getRule('a').prop('margin')).to.be(margin) | ||
}) | ||
|
||
it('should set valid value with .prop()', () => { | ||
const width = CSS.px(10) | ||
const rule = sheet.getRule('a') | ||
rule.prop('width', width) | ||
expect(rule.prop('width')).to.be(width) | ||
}) | ||
|
||
it('should return valid .toString()', () => { | ||
expect(sheet.toString()).to.be(stripIndent` | ||
.a-id { | ||
margin: 42px; | ||
} | ||
`) | ||
}) | ||
}) | ||
}) |
Oops, something went wrong.