Skip to content

Commit b4e68bc

Browse files
committed
fix: remove invalid variants
1 parent 83747d3 commit b4e68bc

File tree

2 files changed

+0
-49
lines changed

2 files changed

+0
-49
lines changed

src/index.js

-11
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,8 @@ const emailClientVariants = plugin.withOptions(
2525
// iOS Mail 15+
2626
addVariant('ios-15', '@supports (-webkit-overflow-scrolling:touch) and (aspect-ratio: 1 / 1)')
2727

28-
// Outlook (webmail)
29-
addVariant('outlook-web', ctx => {
30-
const foo = get(ctx.container.nodes[0], 'raws.tailwind.classCandidate', '&')
31-
return `[class~="x_outlook-web\\:${foo}"]`
32-
})
33-
3428
// Open-Xchange (multiple clients)
3529
addVariant('ox', '&[class^="ox-"]')
36-
37-
// User-defined variants
38-
Object.keys(userVariants).forEach(key => {
39-
addVariant(key, userVariants[key])
40-
})
4130
}
4231
}
4332
)

src/index.test.js

-38
Original file line numberDiff line numberDiff line change
@@ -111,20 +111,6 @@ it('`ios-15` variant', () => {
111111
})
112112
})
113113

114-
it('`outlook-web` variant', () => {
115-
const config = {
116-
content: [{ raw: String.raw`<div class="outlook-web:hidden"></div>` }]
117-
}
118-
119-
return run(config).then((result) => {
120-
expect(result.css).toMatchCss(String.raw`
121-
[class~="x_outlook-web\:hidden"] {
122-
display: none;
123-
}
124-
`)
125-
})
126-
})
127-
128114
it('`apple-mail` variant', () => {
129115
const config = {
130116
content: [{ raw: String.raw`<div class="apple-mail:hidden"></div>` }]
@@ -152,27 +138,3 @@ it('`ox` variant', () => {
152138
`)
153139
})
154140
})
155-
156-
it('user-defined variants', () => {
157-
const config = {
158-
content: [{ raw: String.raw`<div class="thunderbird:hidden example:hidden"></div>` }],
159-
plugins: [
160-
etvPlugin({
161-
thunderbird: '.moz-text-html &',
162-
example: ctx => `.example ${ctx.container.nodes[0].selector}`
163-
})
164-
],
165-
}
166-
167-
return run(config).then((result) => {
168-
expect(result.css).toMatchCss(String.raw`
169-
.moz-text-html .thunderbird\:hidden {
170-
display: none;
171-
}
172-
173-
.example .hidden {
174-
display: none;
175-
}
176-
`)
177-
})
178-
})

0 commit comments

Comments
 (0)