parent
ad40ba6d2d
commit
b032798d69
142 changed files with 3 additions and 3 deletions
|
@ -0,0 +1,7 @@
|
|||
/* src/css/tailwind.pcss */
|
||||
|
||||
@tailwind base;
|
||||
|
||||
@tailwind components;
|
||||
|
||||
@tailwind utilities;
|
|
@ -0,0 +1,6 @@
|
|||
<a
|
||||
href="#"
|
||||
class="text-red-500 hover:text-red-800"
|
||||
>
|
||||
Read more
|
||||
</a>
|
13
taking-flight-with-tailwind-css/code/11-default-variants.txt
Normal file
13
taking-flight-with-tailwind-css/code/11-default-variants.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
// defaultConfig.stub.js
|
||||
|
||||
variants: {
|
||||
alignContent: ['responsive'],
|
||||
alignItems: ['responsive'],
|
||||
alignSelf: ['responsive'],
|
||||
appearance: ['responsive'],
|
||||
backgroundAttachment: ['responsive'],
|
||||
backgroundColor: ['responsive', 'hover', 'focus'],
|
||||
backgroundPosition: ['responsive'],
|
||||
backgroundRepeat: ['responsive'],
|
||||
// ...
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
// defaultConfig.stub.js
|
||||
|
||||
screens: {
|
||||
sm: '640px',
|
||||
md: '768px',
|
||||
lg: '1024px',
|
||||
xl: '1280px',
|
||||
},
|
|
@ -0,0 +1,9 @@
|
|||
.block {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.sm\:block {
|
||||
display: block;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
<div class="block md:flex">
|
||||
<div class="w-full md:w-1/2">
|
||||
Column 1
|
||||
</div>
|
||||
|
||||
<div class="w-full md:w-1/2">
|
||||
Column 2
|
||||
</div>
|
||||
</div>
|
11
taking-flight-with-tailwind-css/code/15-variants-before.txt
Normal file
11
taking-flight-with-tailwind-css/code/15-variants-before.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
// tailwind.config.js
|
||||
|
||||
variants: {
|
||||
alignContent: ['responsive'],
|
||||
alignItems: ['responsive'],
|
||||
alignSelf: ['responsive'],
|
||||
appearance: ['responsive'],
|
||||
backgroundAttachment: ['responsive'],
|
||||
backgroundColor: ['responsive', 'hover', 'focus'],
|
||||
// ...
|
||||
}
|
11
taking-flight-with-tailwind-css/code/16-variants-after.txt
Normal file
11
taking-flight-with-tailwind-css/code/16-variants-after.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
// tailwind.config.js
|
||||
|
||||
variants: {
|
||||
alignContent: ['responsive'],
|
||||
alignItems: ['responsive'],
|
||||
- alignSelf: ['responsive'],
|
||||
+ alignSelf: false,
|
||||
appearance: ['responsive'],
|
||||
backgroundAttachment: ['responsive'],
|
||||
- backgroundColor: ['responsive', 'hover', 'focus'],
|
||||
+ backgroundColor: ['responsive'],
|
16
taking-flight-with-tailwind-css/code/17-config-before.txt
Normal file
16
taking-flight-with-tailwind-css/code/17-config-before.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
screens: {
|
||||
sm: '640px',
|
||||
md: '768px',
|
||||
lg: '1024px',
|
||||
xl: '1280px',
|
||||
},
|
||||
colors: {
|
||||
transparent: 'transparent',
|
||||
black: '#000',
|
||||
white: '#fff',
|
||||
gray: {
|
||||
100: '#f7fafc',
|
||||
200: '#edf2f7',
|
||||
300: '#e2e8f0',
|
||||
},
|
||||
// ...
|
16
taking-flight-with-tailwind-css/code/18-config-after.txt
Normal file
16
taking-flight-with-tailwind-css/code/18-config-after.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
screens: {
|
||||
sm: '640px',
|
||||
md: '768px',
|
||||
lg: '1024px',
|
||||
- xl: '1280px',
|
||||
},
|
||||
colors: {
|
||||
transparent: 'transparent',
|
||||
black: '#000',
|
||||
white: '#fff',
|
||||
gray: {
|
||||
100: '#f7fafc',
|
||||
- 200: '#edf2f7',
|
||||
- 300: '#e2e8f0',
|
||||
},
|
||||
// ...
|
10
taking-flight-with-tailwind-css/code/19-purge-config.txt
Normal file
10
taking-flight-with-tailwind-css/code/19-purge-config.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
module.exports = {
|
||||
purge: [
|
||||
'./src/**/*.html',
|
||||
'./src/**/*.vue',
|
||||
'./src/**/*.jsx',
|
||||
],
|
||||
theme: {},
|
||||
variants: {},
|
||||
plugins: [],
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
/* src/css/tailwind.pcss */
|
||||
|
||||
@tailwind base;
|
||||
/* Custom base styles */
|
||||
|
||||
@tailwind components;
|
||||
/* Custom components */
|
||||
|
||||
@tailwind utilities;
|
||||
/* Custom utilities */
|
10
taking-flight-with-tailwind-css/code/20-loops.txt
Normal file
10
taking-flight-with-tailwind-css/code/20-loops.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
{# base.html.twig #}
|
||||
|
||||
{% for item in navItems %}
|
||||
<a
|
||||
class="block py-3 px-4 text-sm text-gray-800"
|
||||
href="{{ item.url }}"
|
||||
>
|
||||
{{ item.title }}
|
||||
</a>
|
||||
{% endfor %}
|
13
taking-flight-with-tailwind-css/code/21-includes.txt
Normal file
13
taking-flight-with-tailwind-css/code/21-includes.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
{# classes.html.twig #}
|
||||
|
||||
<h2>Adults</h2>
|
||||
{% include 'class-list' with {
|
||||
classes: page.classes,
|
||||
type: 'adults',
|
||||
} %}
|
||||
|
||||
<h2>Kids</h2>
|
||||
{% include 'class-list' with {
|
||||
classes: page.classes,
|
||||
type: 'kids',
|
||||
} %}
|
9
taking-flight-with-tailwind-css/code/3-layers.txt
Normal file
9
taking-flight-with-tailwind-css/code/3-layers.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
/* src/css/tailwind.pcss */
|
||||
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
@layer components {
|
||||
/* Custom components */
|
||||
}
|
15
taking-flight-with-tailwind-css/code/4-sample-output.txt
Normal file
15
taking-flight-with-tailwind-css/code/4-sample-output.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.text-justify {
|
||||
text-align: justify;
|
||||
}
|
10
taking-flight-with-tailwind-css/code/5-webpack-config.txt
Normal file
10
taking-flight-with-tailwind-css/code/5-webpack-config.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
let Encore = require('@symfony/webpack-encore')
|
||||
|
||||
Encore
|
||||
.disableSingleRuntimeChunk()
|
||||
.setOutputPath('dist/')
|
||||
.setPublicPath('/dist')
|
||||
.addStyleEntry('app', './src/css/tailwind.pcss')
|
||||
.enablePostCssLoader()
|
||||
|
||||
module.exports = Encore.getWebpackConfig()
|
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
plugins: [
|
||||
require('tailwindcss')
|
||||
]
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
$ npx encore dev
|
||||
|
||||
Running webpack ...
|
||||
|
||||
DONE Compiled successfully in 1705ms
|
||||
|
||||
1 files written to build
|
||||
|
||||
Entrypoint app [big] = app.css
|
9
taking-flight-with-tailwind-css/code/8-html.txt
Normal file
9
taking-flight-with-tailwind-css/code/8-html.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>My new website</title>
|
||||
<link rel="stylesheet" href="/dist/app.css" />
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
11
taking-flight-with-tailwind-css/code/9-hover-classes.txt
Normal file
11
taking-flight-with-tailwind-css/code/9-hover-classes.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
.text-red-500 {
|
||||
color: #f56565;
|
||||
}
|
||||
|
||||
.hover\:text-red-500:hover {
|
||||
color: #f56565;
|
||||
}
|
||||
|
||||
.focus\:text-red-500:focus {
|
||||
color: #f56565;
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
module.exports = {
|
||||
important: true,
|
||||
prefix: '',
|
||||
separator: ':',
|
||||
purge: [],
|
||||
darkMode: false, // or 'media' or 'class'
|
||||
theme: {
|
||||
colors: {
|
||||
inherit: 'inherit'
|
||||
},
|
||||
extend: {},
|
||||
},
|
||||
// ...
|
||||
}
|
17
taking-flight-with-tailwind-css/code/css-apply-after.txt
Normal file
17
taking-flight-with-tailwind-css/code/css-apply-after.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
a.btn {
|
||||
font-size: 0.875rem;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
border-radius: 9999px;
|
||||
display: inline-block;
|
||||
padding-left: 1.25rem;
|
||||
padding-right: 1.25rem;
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
color: #fff;
|
||||
background-color: #3182ce;
|
||||
}
|
||||
|
||||
a.btn:hover {
|
||||
background-color: #2b6cb0;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
a.btn {
|
||||
@apply text-sm no-underline font-bold;
|
||||
@apply rounded-full inline-block px-5 py-2;
|
||||
@apply text-white bg-blue-600;
|
||||
|
||||
@apply hover:bg-blue-700;
|
||||
}
|
12
taking-flight-with-tailwind-css/code/extending-colours.txt
Normal file
12
taking-flight-with-tailwind-css/code/extending-colours.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
module.exports = {
|
||||
purge: [],
|
||||
darkMode: false, // or 'media' or 'class'
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
inherit: 'inherit'
|
||||
}
|
||||
},
|
||||
},
|
||||
// ...
|
||||
}
|
11
taking-flight-with-tailwind-css/code/override-colours.txt
Normal file
11
taking-flight-with-tailwind-css/code/override-colours.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
module.exports = {
|
||||
purge: [],
|
||||
darkMode: false, // or 'media' or 'class'
|
||||
theme: {
|
||||
colors: {
|
||||
inherit: 'inherit'
|
||||
},
|
||||
extend: {},
|
||||
},
|
||||
// ...
|
||||
}
|
11
taking-flight-with-tailwind-css/code/plugins-add-plugin.txt
Normal file
11
taking-flight-with-tailwind-css/code/plugins-add-plugin.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
// tailwind.config.js
|
||||
|
||||
module.exports = {
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [
|
||||
require('tailwindcss-list-reset')()
|
||||
],
|
||||
variants: {},
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
.list-reset {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
// index.js
|
||||
|
||||
module.exports = variants => ({ addUtilities }) => {
|
||||
addUtilities(
|
||||
{
|
||||
'.list-reset': {
|
||||
listStyle: 'none',
|
||||
padding: 0,
|
||||
},
|
||||
},
|
||||
variants,
|
||||
)
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
module.exports = {
|
||||
purge: [],
|
||||
darkMode: false, // or 'media' or 'class'
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
variants: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue