Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove stylis-plugin-emotion and use stylis-rule-sheet #406

Merged
merged 5 commits into from
Oct 14, 2017
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ cache:
- packages/benchmarks/node_modules
- packages/emotion-server/node_modules
- packages/emotion/node_modules
- packages/stylis-plugin-emotion/node_modules
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@
"^emotion-utils$": "<rootDir>/packages/emotion-utils/src",
"^emotion-server$": "<rootDir>/packages/emotion-server/src",
"^emotion-theming$": "<rootDir>/packages/emotion-theming/src",
"^babel-plugin-emotion": "<rootDir>/packages/babel-plugin-emotion/src",
"^stylis-plugin-emotion": "<rootDir>/packages/stylis-plugin-emotion/src"
"^babel-plugin-emotion": "<rootDir>/packages/babel-plugin-emotion/src"
},
"setupTestFrameworkScriptFile": "<rootDir>/test/testSetup.js",
"coveragePathIgnorePatterns": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`styled basic render 1`] = `
.glamor-1 {
.glamor-0 {
color: blue;
font-size: 20px;
}

@media (min-width: 420px) {
.glamor-1 {
@media (min-width:420px) {
.glamor-0 {
color: blue;
}
}

@media (min-width: 420px) and (min-width: 520px) {
.glamor-1 {
color: green;
}
}

<h1
className="glamor-0 glamor-1"
className="glamor-0"
>
hello world
</h1>
Expand Down Expand Up @@ -204,6 +198,39 @@ exports[`styled composition based on props 2`] = `
</h1>
`;

exports[`styled composition of nested pseudo selectors 1`] = `
.glamor-0 {
font-size: 2rem;
padding: 16px;
}

.glamor-0:hover {
color: blue;
}

.glamor-0:hover:active {
color: red;
}

.glamor-0:hover {
color: pink;
}

.glamor-0:hover:active {
color: purple;
}

.glamor-0:hover.some-class {
color: yellow;
}

<button
className="glamor-0"
>
Should be purple
</button>
`;

exports[`styled composition with objects 1`] = `
.glamor-0 {
color: #333;
Expand Down Expand Up @@ -239,6 +266,18 @@ exports[`styled function in expression 1`] = `
</h1>
`;

exports[`styled function that function returns gets called with props 1`] = `
.glamor-0 {
color: hotpink;
background-color: yellow;
}

<div
className="glamor-0"
color="hotpink"
/>
`;

exports[`styled glamorous style api & composition 1`] = `
.glamor-0 {
font-size: 20px;
Expand Down Expand Up @@ -321,49 +360,69 @@ exports[`styled innerRef 1`] = `
`;

exports[`styled input placeholder 1`] = `
.glamor-1::-webkit-input-placeholder {
.glamor-0::-webkit-input-placeholder {
background-color: green;
}

.glamor-0::-moz-placeholder {
background-color: green;
}

.glamor-1:-ms-input-placeholder {
.glamor-0:-ms-input-placeholder {
background-color: green;
}

.glamor-1::placeholder {
.glamor-0::placeholder {
background-color: green;
}

<input
className="glamor-0 glamor-1"
className="glamor-0"
>
hello world
</input>
`;

exports[`styled input placeholder object 1`] = `
.glamor-1::-webkit-input-placeholder {
.glamor-0::-webkit-input-placeholder {
background-color: green;
}

.glamor-1::-moz-placeholder {
.glamor-0::-moz-placeholder {
background-color: green;
}

.glamor-1:-ms-input-placeholder {
.glamor-0:-ms-input-placeholder {
background-color: green;
}

.glamor-1::placeholder {
.glamor-0::placeholder {
background-color: green;
}

<input
className="glamor-0 glamor-1"
className="glamor-0"
>
hello world
</input>
`;

exports[`styled name with class component 1`] = `
.glamor-0 {
color: hotpink;
}

<Styled(SomeComponent)>
<SomeComponent
className="glamor-0"
>
<div
className="glamor-0"
/>
</SomeComponent>
</Styled(SomeComponent)>
`;

exports[`styled nested 1`] = `
.glamor-0 {
font-size: 20px;
Expand Down Expand Up @@ -431,31 +490,6 @@ exports[`styled no prop filtering on non string tags 1`] = `
</a>
`;

exports[`styled null interpolation value 1`] = `
.glamor-0 {
color: blue;
font-size: 20;
}

@media (min-width:520px) {
.glamor-0 {
color: green;
}
}

@media (min-width:420px) {
.glamor-0 {
color: blue;
}
}

<h1
className="glamor-0"
>
hello world
</h1>
`;

exports[`styled object as style 1`] = `
.glamor-0 {
font-size: 20px;
Expand Down Expand Up @@ -619,6 +653,28 @@ exports[`styled random object expression 1`] = `
</h1>
`;

exports[`styled theme prop exists without ThemeProvider 1`] = `
.glamor-0 {
color: green;
background-color: yellow;
}

<div
className="glamor-0"
/>
`;

exports[`styled theme prop exists without ThemeProvider with a theme prop on the component 1`] = `
.glamor-0 {
color: hotpink;
background-color: yellow;
}

<div
className="glamor-0"
/>
`;

exports[`styled themes 1`] = `
.glamor-0 {
background-color: #ffd43b;
Expand Down Expand Up @@ -721,6 +777,7 @@ exports[`styled with higher order component that hoists statics 1`] = `
display: -ms-flexbox;
display: flex;
color: hotpink;
padding: 8px;
}

<div
Expand Down
Loading