Skip to content

Commit d726165

Browse files
committed
Update tailwindCSS and purge config
1 parent ba23d73 commit d726165

File tree

13 files changed

+3089
-1965
lines changed

13 files changed

+3089
-1965
lines changed

package-lock.json

Lines changed: 3037 additions & 1862 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
},
3232
"homepage": "https://github.com/vue-a11y/website#readme",
3333
"devDependencies": {
34-
"@fullhuman/postcss-purgecss": "^2.3.0",
34+
"@fullhuman/postcss-purgecss": "^3.1.3",
3535
"@goy/vuepress-plugin-svg-icons": "^4.2.1",
3636
"@vue/eslint-config-standard": "^5.1.2",
3737
"@vuepress/plugin-blog": "^1.9.2",
@@ -53,8 +53,10 @@
5353
"eslint-plugin-vuejs-accessibility": "^0.4.0",
5454
"gh-pages": "^3.1.0",
5555
"node-sass": "^4.14.1",
56+
"postcss": "^7.0.35",
5657
"sass-loader": "^9.0.3",
57-
"vuepress": "^1.5.4",
58+
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.0.2",
59+
"vuepress": "^1.8.0",
5860
"vuepress-plugin-canonical": "^1.0.0"
5961
},
6062
"dependencies": {
@@ -66,7 +68,6 @@
6668
"@vue-a11y/skip-to": "^2.1.2",
6769
"@vue/composition-api": "^1.0.0-beta.11",
6870
"@vueuse/core": "^4.0.0-beta.9",
69-
"tailwindcss": "^1.7.6",
7071
"vue-disqus": "^4.0.1"
7172
}
7273
}

src/.vuepress/config/postcss.js

Lines changed: 4 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,6 @@
1-
const autoprefixer = require('autoprefixer')
2-
const tailwindcss = require('tailwindcss')
3-
4-
const plugins = [
5-
tailwindcss('./tailwind.config.js'),
6-
autoprefixer()
7-
]
8-
9-
if (process.env.NODE_ENV !== 'development') {
10-
plugins.push(
11-
require('@fullhuman/postcss-purgecss')({
12-
whitelist: [
13-
'html',
14-
'body',
15-
'figure',
16-
'figcaption',
17-
'blockquote',
18-
'code',
19-
'small',
20-
'kbd',
21-
'app',
22-
'mode-dark',
23-
'mode-sepia',
24-
'icon',
25-
'outbound',
26-
'DocSearch'
27-
],
28-
whitelistPatterns: [
29-
/set-/,
30-
/DocSearch-/
31-
],
32-
whitelistPatternsChildren: [
33-
/content__default$/,
34-
/nprogress$/,
35-
/search-box$/,
36-
/custom-block$/
37-
],
38-
content: ['./src/.vuepress/**/*.vue'],
39-
defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || []
40-
})
41-
)
42-
}
43-
441
module.exports = {
45-
plugins
2+
plugins: [
3+
require('tailwindcss'),
4+
require('autoprefixer')
5+
]
466
}

src/.vuepress/theme/components/CardPost.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export default {
105105
text-decoration-line: underline;
106106
text-decoration-color: var(--accent);
107107
transition: text-decoration .2s;
108-
outline: none;
108+
outline: none !important;
109109
}
110110
}
111111
}

src/.vuepress/theme/components/Logo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
src="/vue-a11y-logo.svg"
88
alt="Vue A11y logo"
99
>
10-
<span class="font-bold sr-only text-22 lg:ml-2 lg:not-sr-only ">Vue A11y</span>
10+
<span class="hidden font-bold text-22 lg:ml-2 lg:block">Vue A11y</span>
1111
</RouterLink>
1212
</template>
1313

src/.vuepress/theme/layouts/GlobalLayout.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,4 @@ export default {
7575
}
7676
</script>
7777

78-
<style lang="scss" src="@/theme/styles/base.scss"></style>
79-
<style src="@/theme/styles/tailwind.css"></style>
78+
<style lang="scss" src="@/theme/styles/index.scss"></style>

src/.vuepress/theme/styles/_a11y.scss

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,23 @@
44
padding-left: 0;
55
}
66

7-
@media(prefers-reduced-motion: reduce) {
8-
*,
9-
*::before,
10-
*::after {
11-
transition: none !important;
12-
animation: none !important;
13-
scroll-behavior: auto !important;
14-
}
15-
}
16-
177
[tabindex]:not([tabindex="-1"]), a, button, input, select, textarea {
188
position: relative;
199
z-index: 2;
20-
outline: 2px solid transparent;
10+
outline-width: 3px !important;
11+
outline-style: dotted !important;
12+
outline-color: transparent;
2113
outline-offset: 6px;
2214
transition: outline-offset .1s ease;
2315
}
2416

2517
*:focus {
2618
outline-color: var(--color);
27-
outline-offset: 3px;
19+
outline-offset: 2px !important;
2820
}
2921

3022
[tabindex="-1"] {
31-
outline: 0
23+
outline: 0 !important;
3224
}
3325

3426
.max-char {
@@ -48,3 +40,13 @@ body.set-reduce-motion {
4840
scroll-behavior: auto !important;
4941
}
5042
}
43+
44+
@media(prefers-reduced-motion: reduce) {
45+
*,
46+
*::before,
47+
*::after {
48+
transition: none !important;
49+
animation: none !important;
50+
scroll-behavior: auto !important;
51+
}
52+
}

src/.vuepress/theme/styles/_markdown.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
}
123123

124124
.table-wrapper {
125-
@apply w-full overflow-x-auto whitespace-no-wrap;
125+
@apply w-full overflow-x-auto whitespace-nowrap;
126126
@screen lg {
127127
@apply whitespace-normal;
128128
}

src/.vuepress/theme/styles/_override.scss

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,6 @@
22
color: var(--color) !important;
33
}
44

5-
div.search-box {
6-
input {
7-
background: none;
8-
@apply w-full py-5 pl-10 rounded-md bg-secondary c-border-color text-color text-base left-0 z-10;
9-
10-
&:focus {
11-
outline: auto;
12-
}
13-
14-
&.focused {
15-
@apply w-full left-0 #{!important};
16-
}
17-
18-
&::placeholder {
19-
color: var(--color) !important;
20-
}
21-
}
22-
23-
> ul {
24-
@apply left-0 mt-4 z-50;
25-
@screen lg {
26-
@apply ml-8;
27-
}
28-
@screen xl {
29-
@apply ml-16 #{!important};
30-
width: 80% !important;
31-
}
32-
}
33-
}
34-
355
ul.pagination {
366
.page-item {
377
&.active > a {

src/.vuepress/theme/styles/base.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@import './themes';
22
@import './markdown';
33
@import './typography';
4-
@import './a11y';
54
@import './components';
65
@import './override';
76
@import './custom-blocks';

0 commit comments

Comments
 (0)