Skip to content

Commit e8ba646

Browse files
committed
Replace ember-cli-tailwind with postcss and tailwindcss
1 parent 4551ebc commit e8ba646

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1315
-950
lines changed

.eslintrc.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,23 @@
11
module.exports = {
22
globals: {
3-
server: true,
3+
server: true
44
},
55
root: true,
66
parserOptions: {
77
ecmaVersion: 2018,
88
sourceType: 'module'
99
},
10-
plugins: [
11-
'ember'
12-
],
13-
extends: [
14-
'eslint:recommended',
15-
'plugin:ember/recommended'
16-
],
10+
plugins: ['ember'],
11+
extends: ['eslint:recommended', 'plugin:ember/recommended'],
1712
env: {
1813
browser: true
1914
},
2015
rules: {
21-
'no-unused-vars': ["error", { "args": "none" }],
22-
'no-console': ["error", { allow: ["warn", "error"] }],
16+
'no-unused-vars': ['error', { args: 'none' }],
17+
'no-console': ['error', { allow: ['warn', 'error'] }],
2318

2419
// ember-keyboard uses events
25-
'ember/no-on-calls-in-components': 'off',
20+
'ember/no-on-calls-in-components': 'off'
2621
},
2722
overrides: [
2823
// node files
@@ -31,6 +26,7 @@ module.exports = {
3126
'.eslintrc.js',
3227
'.template-lintrc.js',
3328
'ember-cli-build.js',
29+
'addon/styles/tailwind.js',
3430
'index.js',
3531
'testem.js',
3632
'blueprints/*/index.js',
@@ -53,9 +49,13 @@ module.exports = {
5349
node: true
5450
},
5551
plugins: ['node'],
56-
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
57-
// add your custom rules and overrides for node files here
58-
})
52+
rules: Object.assign(
53+
{},
54+
require('eslint-plugin-node').configs.recommended.rules,
55+
{
56+
// add your custom rules and overrides for node files here
57+
}
58+
)
5959
},
6060

6161
// test files
@@ -73,12 +73,12 @@ module.exports = {
7373
describe: true,
7474
it: true,
7575
beforeEach: true,
76-
afterEach: true,
76+
afterEach: true
7777
},
7878
files: ['tests-node/**/*.js'],
7979
rules: {
8080
'node/no-unpublished-require': 'off'
81-
},
81+
}
8282
}
8383
]
8484
};

addon/styles/addon.scss

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
// Global settings
22
$site-container: 1400px;
33

4+
@tailwind preflight;
5+
@tailwind components;
6+
@tailwind utilities;
7+
8+
@import './components/docs-brand-colors';
9+
@import './components/docs-btn';
10+
@import './components/docs-container';
11+
@import './components/docs-md';
12+
13+
@import './utilities/masks';
14+
@import './utilities/nudge';
15+
@import './utilities/overflow-momentum';
16+
417
@import 'pod-styles.scss';
518
@import 'syntax';
619

720
// Figure out how to do this in tailwind
821
.docs-fill-current {
9-
&, & * {
22+
&,
23+
& * {
1024
fill: currentColor;
1125
}
1226
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
We use CSS Custom Properties so addons can customize their brand theme, but we need to provide a fallback for browsers that don't support them yet (IE). This is the way we do it.
3+
4+
If we get access to the PostCSS pipeline in the future we could use a plugin like this: https://github.com/postcss/postcss-custom-properties
5+
*/
6+
.docs-bg-brand {
7+
@apply docs-bg-brand-var;
8+
}
9+
.hover\:docs-bg-brand:hover {
10+
@apply docs-bg-brand-var ;
11+
}
12+
.focus\:docs-bg-brand:focus {
13+
@apply docs-bg-brand-var;
14+
}
15+
16+
.docs-text-brand {
17+
@apply docs-text-brand-var;
18+
}
19+
.hover\:docs-text-brand:hover {
20+
@apply docs-text-brand-var;
21+
}
22+
.focus\:docs-text-brand:focus {
23+
@apply docs-text-brand-var;
24+
}
25+
26+
.docs-border-brand {
27+
@apply docs-border-brand-var;
28+
}
29+
.hover\:docs-border-brand:hover {
30+
@apply docs-border-brand-var;
31+
}
32+
.focus\:docs-border-brand:focus {
33+
@apply docs-border-brand-var;
34+
}

0 commit comments

Comments
 (0)