Add and use sugarss
This commit is contained in:
parent
906e4c1938
commit
ab6e0d2df5
|
@ -1,27 +1,20 @@
|
||||||
h1, h2, h3 {
|
h1, h2, h3
|
||||||
@apply font-bold
|
@apply font-bold
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
h1
|
||||||
@apply text-3xl
|
@apply text-3xl
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
h2
|
||||||
@apply text-2xl
|
@apply text-2xl
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
img
|
||||||
@apply max-w-full h-auto
|
@apply max-w-full h-auto
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
a
|
||||||
@apply text-blue-700 no-underline;
|
@apply text-blue-700 no-underline
|
||||||
|
|
||||||
&:hover {
|
&:hover
|
||||||
@apply underline
|
@apply underline
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
blockquote
|
||||||
@apply border-l-4 border-blue-600 pl-4 px-6 py-2
|
@apply border-l-4 border-blue-600 pl-4 px-6 py-2
|
||||||
}
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
@import 'highlightjs/styles/github-gist';
|
@import 'highlightjs/styles/github-gist'
|
||||||
|
|
||||||
@import './components/button.css';
|
@import './components/button.css'
|
||||||
@import './components/container.css';
|
@import './components/container.css'
|
||||||
@import './components/lead.css';
|
@import './components/lead.css'
|
||||||
@import './components/markup.css';
|
@import './components/markup.css'
|
||||||
@import './components/note.css';
|
@import './components/note.css'
|
||||||
@import './components/table.css';
|
@import './components/table.css'
|
||||||
@import './components/video.css';
|
@import './components/video.css'
|
||||||
@import './components/widget.css';
|
@import './components/widget.css'
|
||||||
@import './components/wrap.css';
|
@import './components/wrap.css'
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
.button {
|
.button
|
||||||
@apply bg-blue-600 border-blue-600 border inline-block text-white no-underline py-2 px-3 rounded text-sm;
|
@apply bg-blue-600 border-blue-600 border inline-block text-white no-underline py-2 px-3 rounded text-sm
|
||||||
|
|
||||||
&:focus {
|
&:focus
|
||||||
@apply py-2 px-3 m-0
|
@apply py-2 px-3 m-0
|
||||||
}
|
|
||||||
|
|
||||||
&:active,
|
&:active,
|
||||||
&:focus,
|
&:focus,
|
||||||
&:hover {
|
&:hover
|
||||||
@apply bg-white text-blue-600
|
@apply bg-white text-blue-600
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
.container {
|
.container
|
||||||
@apply w-full max-w-5xl px-4 mx-auto
|
@apply w-full max-w-5xl px-4 mx-auto
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
p.lead {
|
p.lead
|
||||||
@screen md {
|
@screen md
|
||||||
@apply text-lg
|
@apply text-lg
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,19 +1,16 @@
|
||||||
.markup {
|
.markup
|
||||||
@apply leading-normal;
|
@apply leading-normal
|
||||||
|
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3,
|
||||||
h4 {
|
h4
|
||||||
@apply text-black font-bold mb-3
|
@apply text-black font-bold mb-3
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
h2
|
||||||
@apply mt-8 mb-3
|
@apply mt-8 mb-3
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
h3
|
||||||
@apply text-lg mt-8
|
@apply text-lg mt-8
|
||||||
}
|
|
||||||
|
|
||||||
p,
|
p,
|
||||||
ul,
|
ul,
|
||||||
|
@ -22,38 +19,28 @@
|
||||||
table,
|
table,
|
||||||
figure,
|
figure,
|
||||||
pre,
|
pre,
|
||||||
[v-pre] {
|
[v-pre]
|
||||||
&:not(:last-child) {
|
&:not(:last-child)
|
||||||
@apply mb-6
|
@apply mb-6
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ul {
|
ul
|
||||||
@apply list-disc ml-5
|
@apply list-disc ml-5
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
code
|
||||||
@apply bg-gray-200 font-mono text-sm
|
@apply bg-gray-200 font-mono text-sm
|
||||||
}
|
|
||||||
|
|
||||||
p,
|
p,
|
||||||
li {
|
li
|
||||||
code {
|
code
|
||||||
@apply inline-block border border-gray-300 font-bold mx-px p-1 leading-none
|
@apply inline-block border border-gray-300 font-bold mx-px p-1 leading-none
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pre code,
|
pre code,
|
||||||
.hljs {
|
.hljs
|
||||||
@apply block leading-loose overflow-x-scroll p-6
|
@apply block leading-loose overflow-x-scroll p-6
|
||||||
}
|
|
||||||
|
|
||||||
figure,
|
figure,
|
||||||
img {
|
img
|
||||||
@apply block
|
@apply block
|
||||||
}
|
|
||||||
|
|
||||||
figcaption {
|
figcaption
|
||||||
@apply italic text-sm text-gray-800 text-center mb-0 mt-1
|
@apply italic text-sm text-gray-800 text-center mb-0 mt-1
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
.note {
|
.note
|
||||||
@apply bg-blue-200 border-blue-600 border-l-4 mb-4 p-4 rounded;
|
@apply bg-blue-200 border-blue-600 border-l-4 mb-4 p-4 rounded
|
||||||
|
|
||||||
> *:not(:first-child) {
|
> *:not(:first-child)
|
||||||
@apply mt-6
|
@apply mt-6
|
||||||
}
|
|
||||||
|
|
||||||
p a {
|
p a
|
||||||
@apply text-black underline;
|
@apply text-black underline
|
||||||
|
|
||||||
&:hover {
|
&:hover
|
||||||
@apply no-underline
|
@apply no-underline
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,18 +1,13 @@
|
||||||
.table {
|
.table
|
||||||
@apply w-full;
|
@apply w-full
|
||||||
|
|
||||||
th {
|
th
|
||||||
@apply bg-gray-200 text-left;
|
@apply bg-gray-200 text-left
|
||||||
}
|
|
||||||
|
|
||||||
th,
|
th,
|
||||||
td {
|
td
|
||||||
@apply px-4 py-2 border border-solid border-gray-300;
|
@apply px-4 py-2 border border-solid border-gray-300
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
table.is-striped {
|
table.is-striped
|
||||||
tbody > tr:not(:nth-child(odd)) td {
|
tbody > tr:not(:nth-child(odd)) td
|
||||||
@apply bg-gray-100;
|
@apply bg-gray-100
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
.video-full {
|
.video-full
|
||||||
@apply w-full relative;
|
@apply w-full relative
|
||||||
padding-top: 56.25%;
|
padding-top: 56.25%
|
||||||
|
|
||||||
iframe,
|
iframe,
|
||||||
embed {
|
embed
|
||||||
@apply absolute h-full left-0 top-0 w-full
|
@apply absolute h-full left-0 top-0 w-full
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
.widget {
|
.widget
|
||||||
@apply block mb-6
|
@apply block mb-6
|
||||||
}
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
.wrap {
|
.wrap
|
||||||
@apply w-full max-w-3xl mx-auto;
|
@apply w-full max-w-3xl mx-auto
|
||||||
|
|
||||||
&.is-wide {
|
&.is-wide
|
||||||
@apply max-w-5xl
|
@apply max-w-5xl
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
@import 'tailwindcss/base';
|
@import 'tailwindcss/base'
|
||||||
@import './base.css';
|
@import './base.css'
|
||||||
|
|
||||||
@import 'tailwindcss/components';
|
@import 'tailwindcss/components'
|
||||||
@import './components.css';
|
@import './components.css'
|
||||||
|
|
||||||
@import 'tailwindcss/utilities';
|
@import 'tailwindcss/utilities'
|
||||||
@import './utilities.css';
|
@import './utilities.css'
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
.no-js .js-hidden {
|
.no-js .js-hidden
|
||||||
display: none;
|
display: none
|
||||||
}
|
|
||||||
|
|
9
package-lock.json
generated
9
package-lock.json
generated
|
@ -7379,6 +7379,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"sugarss": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/sugarss/-/sugarss-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-WfxjozUk0UVA4jm+U1d736AUpzSrNsQcIbyOkoE364GrtWmIrFdk5lksEupgWMD4VaT/0kVx1dobpiDumSgmJQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"postcss": "^7.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"supports-color": {
|
"supports-color": {
|
||||||
"version": "5.5.0",
|
"version": "5.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
"glob-all": "^3.1.0",
|
"glob-all": "^3.1.0",
|
||||||
"postcss-loader": "^3.0.0",
|
"postcss-loader": "^3.0.0",
|
||||||
"purgecss-webpack-plugin": "^1.6.0",
|
"purgecss-webpack-plugin": "^1.6.0",
|
||||||
|
"sugarss": "^2.0.0",
|
||||||
"vue-loader": "^15.7.1",
|
"vue-loader": "^15.7.1",
|
||||||
"vue-template-compiler": "^2.6.10"
|
"vue-template-compiler": "^2.6.10"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
parser: 'sugarss',
|
||||||
plugins: [
|
plugins: [
|
||||||
require('postcss-import'),
|
require('postcss-import'),
|
||||||
require('tailwindcss'),
|
require('tailwindcss'),
|
||||||
|
|
Reference in a new issue