Skip to content

Commit

Permalink
feat: apple-mail variant
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed May 6, 2022
1 parent 5485ac4 commit 8b6640b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ const emailClientVariants = plugin.withOptions(
// Gmail (Android)
addVariant('gmail-android', 'div > u + .body &')

// Apple Mail
addVariant('apple-mail', '.Singleton &')

// iOS Mail 10+
addVariant('ios', '@supports (-webkit-overflow-scrolling:touch) and (color:#ffff)')

Expand Down
14 changes: 14 additions & 0 deletions src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,20 @@ it('`outlook-web` variant', () => {
})
})

it('`apple-mail` variant', () => {
const config = {
content: [{ raw: String.raw`<div class="apple-mail:hidden"></div>` }]
}

return run(config).then((result) => {
expect(result.css).toMatchCss(String.raw`
.Singleton .apple-mail\:hidden {
display: none;
}
`)
})
})

it('user-defined variants', () => {
const config = {
content: [{ raw: String.raw`<div class="thunderbird:hidden example:hidden"></div>` }],
Expand Down

0 comments on commit 8b6640b

Please sign in to comment.