Add and use postcss-import
This commit is contained in:
parent
b591f5f2cf
commit
dc1feabc17
|
@ -29,5 +29,8 @@
|
|||
"tailwindcss-visuallyhidden": "^1.0.1",
|
||||
"tailwindcss-vuejs": "^1.0.0",
|
||||
"vue": "^2.5.17"
|
||||
},
|
||||
"dependencies": {
|
||||
"postcss-import": "^12.0.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,60 +1,8 @@
|
|||
@import '~highlightjs/styles/github-gist.css';
|
||||
@import 'tailwindcss/base';
|
||||
@import 'custom-base';
|
||||
|
||||
@tailwind base;
|
||||
@import 'tailwindcss/components';
|
||||
@import 'highlightjs/styles/github-gist';
|
||||
@import 'custom-components';
|
||||
|
||||
h1, h2, h3 {
|
||||
@apply font-bold
|
||||
}
|
||||
|
||||
h1 {
|
||||
@apply text-3xl
|
||||
}
|
||||
|
||||
h2 {
|
||||
@apply text-2xl
|
||||
}
|
||||
|
||||
img {
|
||||
@apply max-w-full h-auto
|
||||
}
|
||||
|
||||
a {
|
||||
@apply text-blue-600 no-underline;
|
||||
|
||||
&:hover {
|
||||
@apply underline
|
||||
}
|
||||
}
|
||||
|
||||
blockquote {
|
||||
@apply border-l-4 border-blue-600 pl-4 px-6 py-2
|
||||
}
|
||||
|
||||
@tailwind components;
|
||||
|
||||
.container {
|
||||
@apply w-full max-w-5xl px-4 mx-auto
|
||||
}
|
||||
|
||||
p.lead {
|
||||
@screen md {
|
||||
@apply text-lg
|
||||
}
|
||||
}
|
||||
|
||||
.wrap {
|
||||
@apply w-full max-w-3xl mx-auto;
|
||||
|
||||
&.is-wide {
|
||||
@apply max-w-5xl
|
||||
}
|
||||
}
|
||||
|
||||
@import 'components/button.css';
|
||||
@import 'components/markup.css';
|
||||
@import 'components/note.css';
|
||||
@import 'components/table.css';
|
||||
@import 'components/video.css';
|
||||
@import 'components/widget.css';
|
||||
|
||||
@tailwind utilities;
|
||||
@import 'tailwindcss/utilities';
|
||||
|
|
3
resources/css/components/container.css
Normal file
3
resources/css/components/container.css
Normal file
|
@ -0,0 +1,3 @@
|
|||
.container {
|
||||
@apply w-full max-w-5xl px-4 mx-auto
|
||||
}
|
5
resources/css/components/lead.css
Normal file
5
resources/css/components/lead.css
Normal file
|
@ -0,0 +1,5 @@
|
|||
p.lead {
|
||||
@screen md {
|
||||
@apply text-lg
|
||||
}
|
||||
}
|
7
resources/css/components/wrap.css
Normal file
7
resources/css/components/wrap.css
Normal file
|
@ -0,0 +1,7 @@
|
|||
.wrap {
|
||||
@apply w-full max-w-3xl mx-auto;
|
||||
|
||||
&.is-wide {
|
||||
@apply max-w-5xl
|
||||
}
|
||||
}
|
27
resources/css/custom-base.css
Normal file
27
resources/css/custom-base.css
Normal file
|
@ -0,0 +1,27 @@
|
|||
h1, h2, h3 {
|
||||
@apply font-bold
|
||||
}
|
||||
|
||||
h1 {
|
||||
@apply text-3xl
|
||||
}
|
||||
|
||||
h2 {
|
||||
@apply text-2xl
|
||||
}
|
||||
|
||||
img {
|
||||
@apply max-w-full h-auto
|
||||
}
|
||||
|
||||
a {
|
||||
@apply text-blue-600 no-underline;
|
||||
|
||||
&:hover {
|
||||
@apply underline
|
||||
}
|
||||
}
|
||||
|
||||
blockquote {
|
||||
@apply border-l-4 border-blue-600 pl-4 px-6 py-2
|
||||
}
|
9
resources/css/custom-components.css
Normal file
9
resources/css/custom-components.css
Normal file
|
@ -0,0 +1,9 @@
|
|||
@import 'components/button';
|
||||
@import 'components/container';
|
||||
@import 'components/lead';
|
||||
@import 'components/markup';
|
||||
@import 'components/note';
|
||||
@import 'components/table';
|
||||
@import 'components/video';
|
||||
@import 'components/widget';
|
||||
@import 'components/wrap';
|
|
@ -4,6 +4,7 @@ require('laravel-mix-purgecss')
|
|||
|
||||
mix.disableNotifications()
|
||||
.postCss('resources/css/app.css', 'source/dist/css', [
|
||||
require('postcss-import')(),
|
||||
require('tailwindcss')('tailwind.config.js'),
|
||||
require('postcss-nested'),
|
||||
])
|
||||
|
|
23
yarn.lock
23
yarn.lock
|
@ -5500,7 +5500,7 @@ performance-now@^2.1.0:
|
|||
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
|
||||
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
|
||||
|
||||
pify@^2.0.0:
|
||||
pify@^2.0.0, pify@^2.3.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
|
||||
integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw=
|
||||
|
@ -5630,6 +5630,16 @@ postcss-functions@^3.0.0:
|
|||
postcss "^6.0.9"
|
||||
postcss-value-parser "^3.3.0"
|
||||
|
||||
postcss-import@^12.0.1:
|
||||
version "12.0.1"
|
||||
resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-12.0.1.tgz#cf8c7ab0b5ccab5649024536e565f841928b7153"
|
||||
integrity sha512-3Gti33dmCjyKBgimqGxL3vcV8w9+bsHwO5UrBawp796+jdardbcFl4RP5w/76BwNL7aGzpKstIfF9I+kdE8pTw==
|
||||
dependencies:
|
||||
postcss "^7.0.1"
|
||||
postcss-value-parser "^3.2.3"
|
||||
read-cache "^1.0.0"
|
||||
resolve "^1.1.7"
|
||||
|
||||
postcss-js@^2.0.0:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-2.0.1.tgz#4154e906ff410930afab63a24210be1b831e89a9"
|
||||
|
@ -5918,7 +5928,7 @@ postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.17, postcss@^6.0.8, postcss@^6.0.9:
|
|||
source-map "^0.6.1"
|
||||
supports-color "^5.4.0"
|
||||
|
||||
postcss@^7.0.11, postcss@^7.0.14, postcss@^7.0.16:
|
||||
postcss@^7.0.1, postcss@^7.0.11, postcss@^7.0.14, postcss@^7.0.16:
|
||||
version "7.0.17"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.17.tgz#4da1bdff5322d4a0acaab4d87f3e782436bad31f"
|
||||
integrity sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ==
|
||||
|
@ -6148,6 +6158,13 @@ rc@^1.2.7:
|
|||
minimist "^1.2.0"
|
||||
strip-json-comments "~2.0.1"
|
||||
|
||||
read-cache@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774"
|
||||
integrity sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=
|
||||
dependencies:
|
||||
pify "^2.3.0"
|
||||
|
||||
read-pkg-up@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
|
||||
|
@ -6434,7 +6451,7 @@ resolve-url@^0.2.1:
|
|||
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
|
||||
integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
|
||||
|
||||
resolve@^1.10.0, resolve@^1.11.0, resolve@^1.4.0, resolve@^1.5.0, resolve@^1.8.1:
|
||||
resolve@^1.1.7, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.4.0, resolve@^1.5.0, resolve@^1.8.1:
|
||||
version "1.11.1"
|
||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.1.tgz#ea10d8110376982fef578df8fc30b9ac30a07a3e"
|
||||
integrity sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==
|
||||
|
|
Reference in a new issue