New: Tailwindcss

This commit is contained in:
Konstantin Hintermayer 2024-10-04 10:52:45 +02:00
parent 70afa170ec
commit e2902457e2
10 changed files with 5879 additions and 330 deletions

View File

@ -8,7 +8,9 @@
"pflannery.vscode-versionlens",
"editorconfig.editorconfig",
"prisma.prisma",
"graphql.vscode-graphql"
"graphql.vscode-graphql",
"csstools.postcss",
"bradlc.vscode-tailwindcss"
],
"unwantedRecommendations": []
}

View File

@ -7,5 +7,11 @@
},
"[prisma]": {
"editor.formatOnSave": true
}
},
"tailwindCSS.classAttributes": [
"class",
"className",
"activeClassName",
"errorClassName"
]
}

View File

@ -8,8 +8,10 @@
},
"devDependencies": {
"@redwoodjs/auth-dbauth-setup": "8.3.0",
"@redwoodjs/cli-storybook-vite": "8.3.0",
"@redwoodjs/core": "8.3.0",
"@redwoodjs/project-config": "8.3.0"
"@redwoodjs/project-config": "8.3.0",
"prettier-plugin-tailwindcss": "^0.5.12"
},
"eslintConfig": {
"extends": "@redwoodjs/eslint-config",

View File

@ -15,4 +15,6 @@ module.exports = {
},
},
],
tailwindConfig: './web/config/tailwind.config.js',
plugins: ['prettier-plugin-tailwindcss'],
}

View File

@ -0,0 +1,9 @@
const path = require('path')
module.exports = {
plugins: [
require('tailwindcss/nesting'),
require('tailwindcss')(path.resolve(__dirname, 'tailwind.config.js')),
require('autoprefixer'),
],
}

View File

@ -0,0 +1,9 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['src/**/*.{js,jsx,ts,tsx}'],
theme: {
extend: {},
},
plugins: [],
}

View File

@ -23,6 +23,10 @@
"devDependencies": {
"@redwoodjs/vite": "8.3.0",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19"
"@types/react-dom": "^18.2.19",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.47",
"postcss-loader": "^8.1.1",
"tailwindcss": "^3.4.13"
}
}

View File

@ -0,0 +1,13 @@
/**
* START --- SETUP TAILWINDCSS EDIT
*
* `yarn rw setup ui tailwindcss` placed these directives here
* to inject Tailwind's styles into your CSS.
* For more information, see: https://tailwindcss.com/docs/installation
*/
@tailwind base;
@tailwind components;
@tailwind utilities;
/**
* END --- SETUP TAILWINDCSS EDIT
*/

View File

@ -1,397 +1,243 @@
/*
normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
*/
.rw-scaffold *,
.rw-scaffold ::after,
.rw-scaffold ::before {
box-sizing: inherit;
}
.rw-scaffold main {
color: #4a5568;
display: block;
.rw-scaffold {
@apply bg-white text-gray-600;
}
.rw-scaffold h1,
.rw-scaffold h2 {
margin: 0;
@apply m-0;
}
.rw-scaffold a {
background-color: transparent;
@apply bg-transparent;
}
.rw-scaffold ul {
margin: 0;
padding: 0;
}
.rw-scaffold input {
font-family: inherit;
font-size: 100%;
overflow: visible;
@apply m-0 p-0;
}
.rw-scaffold input:-ms-input-placeholder {
color: #a0aec0;
@apply text-gray-500;
}
.rw-scaffold input::-ms-input-placeholder {
color: #a0aec0;
@apply text-gray-500;
}
.rw-scaffold input::placeholder {
color: #a0aec0;
}
.rw-scaffold table {
border-collapse: collapse;
}
/*
Style
*/
.rw-scaffold,
.rw-toast {
background-color: #fff;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
@apply text-gray-500;
}
.rw-header {
display: flex;
justify-content: space-between;
padding: 1rem 2rem 1rem 2rem;
@apply flex justify-between py-4 px-8;
}
.rw-main {
margin-left: 1rem;
margin-right: 1rem;
padding-bottom: 1rem;
@apply mx-4 pb-4;
}
.rw-segment {
border-radius: 0.5rem;
border-width: 1px;
border-color: #e5e7eb;
overflow: hidden;
width: 100%;
scrollbar-color: #a1a1aa transparent;
@apply rounded-lg overflow-hidden w-full border border-gray-200;
scrollbar-color: theme('colors.zinc.400') transparent;
}
.rw-segment::-webkit-scrollbar {
height: initial;
}
.rw-segment::-webkit-scrollbar-track {
background-color: transparent;
border-color: #e2e8f0;
border-style: solid;
border-radius: 0 0 10px 10px;
border-width: 1px 0 0 0;
padding: 2px;
@apply border-gray-200 bg-transparent border-solid rounded-t-none rounded-b-[10px] border-0 border-t p-[2px];
}
.rw-segment::-webkit-scrollbar-thumb {
background-color: #a1a1aa;
background-clip: content-box;
border: 3px solid transparent;
border-radius: 10px;
@apply bg-zinc-400 bg-clip-content border-[3px] border-solid border-transparent rounded-full;
}
.rw-segment-header {
background-color: #e2e8f0;
color: #4a5568;
padding: 0.75rem 1rem;
@apply bg-gray-200 text-gray-700 py-3 px-4;
}
.rw-segment-main {
background-color: #f7fafc;
padding: 1rem;
@apply bg-gray-100 p-4;
}
.rw-link {
color: #4299e1;
text-decoration: underline;
@apply text-blue-400 underline;
}
.rw-link:hover {
color: #2b6cb0;
@apply text-blue-500;
}
.rw-forgot-link {
font-size: 0.75rem;
color: #a0aec0;
text-align: right;
margin-top: 0.1rem;
@apply text-xs text-gray-400 text-right mt-1 underline;
}
.rw-forgot-link:hover {
font-size: 0.75rem;
color: #4299e1;
@apply text-blue-500;
}
.rw-heading {
font-weight: 600;
@apply font-semibold;
}
.rw-heading.rw-heading-primary {
font-size: 1.25rem;
@apply text-xl;
}
.rw-heading.rw-heading-secondary {
font-size: 0.875rem;
@apply text-sm;
}
.rw-heading .rw-link {
color: #4a5568;
text-decoration: none;
@apply text-gray-600 no-underline;
}
.rw-heading .rw-link:hover {
color: #1a202c;
text-decoration: underline;
@apply text-gray-900 underline;
}
.rw-cell-error {
font-size: 90%;
font-weight: 600;
@apply text-sm font-semibold;
}
.rw-form-wrapper {
box-sizing: border-box;
font-size: 0.875rem;
margin-top: -1rem;
@apply text-sm -mt-4;
}
.rw-cell-error,
.rw-form-error-wrapper {
padding: 1rem;
background-color: #fff5f5;
color: #c53030;
border-width: 1px;
border-color: #feb2b2;
border-radius: 0.25rem;
margin: 1rem 0;
@apply p-4 bg-red-50 text-red-600 border border-red-100 rounded my-4;
}
.rw-form-error-title {
margin-top: 0;
margin-bottom: 0;
font-weight: 600;
@apply m-0 font-semibold;
}
.rw-form-error-list {
margin-top: 0.5rem;
list-style-type: disc;
list-style-position: inside;
@apply mt-2 list-disc list-inside;
}
.rw-button {
border: none;
color: #718096;
cursor: pointer;
display: flex;
justify-content: center;
font-size: 0.75rem;
font-weight: 600;
padding: 0.25rem 1rem;
text-transform: uppercase;
text-decoration: none;
letter-spacing: 0.025em;
border-radius: 0.25rem;
line-height: 2;
border: 0;
@apply flex justify-center py-1 px-4 border-0 rounded bg-gray-200 text-gray-500 text-xs font-semibold uppercase tracking-wide leading-loose no-underline cursor-pointer transition duration-100;
}
.rw-button:hover {
background-color: #718096;
color: #fff;
@apply bg-gray-500 text-white;
}
.rw-button.rw-button-small {
font-size: 0.75rem;
border-radius: 0.125rem;
padding: 0.25rem 0.5rem;
line-height: inherit;
@apply text-xs rounded-sm py-1 px-2;
}
.rw-button.rw-button-green {
background-color: #48bb78;
color: #fff;
@apply bg-green-500 text-white;
}
.rw-button.rw-button-green:hover {
background-color: #38a169;
color: #fff;
@apply bg-green-700;
}
.rw-button.rw-button-blue {
background-color: #3182ce;
color: #fff;
@apply bg-blue-500 text-white;
}
.rw-button.rw-button-blue:hover {
background-color: #2b6cb0;
@apply bg-blue-700;
}
.rw-button.rw-button-red {
background-color: #e53e3e;
color: #fff;
@apply bg-red-500 text-white;
}
.rw-button.rw-button-red:hover {
background-color: #c53030;
@apply bg-red-700 text-white;
}
.rw-button-icon {
font-size: 1.25rem;
line-height: 1;
margin-right: 0.25rem;
@apply text-xl leading-5 mr-1;
}
.rw-button-group {
display: flex;
justify-content: center;
margin: 0.75rem 0.5rem;
@apply flex justify-center my-3 mx-2;
}
.rw-button-group .rw-button {
margin: 0 0.25rem;
@apply mx-1;
}
.rw-form-wrapper .rw-button-group {
margin-top: 2rem;
margin-bottom: 0;
@apply mt-8;
}
.rw-label {
display: block;
margin-top: 1.5rem;
color: #4a5568;
font-weight: 600;
text-align: left;
@apply block mt-6 text-gray-600 font-semibold text-left;
}
.rw-label.rw-label-error {
color: #c53030;
@apply text-red-600;
}
.rw-input {
display: block;
margin-top: 0.5rem;
width: 100%;
padding: 0.5rem;
border-width: 1px;
border-style: solid;
border-color: #e2e8f0;
color: #4a5568;
border-radius: 0.25rem;
outline: none;
}
.rw-check-radio-item-none {
color: #4a5568;
@apply block mt-2 w-full p-2 bg-white border border-gray-200 rounded outline-none;
}
.rw-check-radio-items {
display: flex;
justify-items: center;
@apply flex justify-items-center;
}
.rw-input[type='checkbox'] {
display: inline;
width: 1rem;
margin-left: 0;
margin-right: 0.5rem;
margin-top: 0.25rem;
.rw-check-radio-item-none {
@apply text-gray-600;
}
.rw-input[type='checkbox'],
.rw-input[type='radio'] {
display: inline;
width: 1rem;
margin-left: 0;
margin-right: 0.5rem;
margin-top: 0.25rem;
@apply inline w-4 ml-0 mr-1 mt-1;
}
.rw-input:focus {
border-color: #a0aec0;
@apply border-gray-400;
}
.rw-input-error {
border-color: #c53030;
color: #c53030;
@apply border-red-600 text-red-600;
}
.rw-input-error:focus {
outline: none;
border-color: #c53030;
@apply border-red-600 outline-none;
box-shadow: 0 0 5px #c53030;
}
.rw-field-error {
display: block;
margin-top: 0.25rem;
font-weight: 600;
text-transform: uppercase;
font-size: 0.75rem;
color: #c53030;
@apply block mt-1 font-semibold text-xs text-red-600 uppercase;
}
.rw-table-wrapper-responsive {
overflow-x: auto;
@apply overflow-x-auto;
}
.rw-table-wrapper-responsive .rw-table {
min-width: 48rem;
}
.rw-table {
table-layout: auto;
width: 100%;
font-size: 0.875rem;
@apply w-full text-sm;
}
.rw-table th,
.rw-table td {
padding: 0.75rem;
@apply p-3;
}
.rw-table td {
background-color: #ffffff;
color: #1a202c;
@apply bg-white text-gray-900;
}
.rw-table tr:nth-child(odd) td,
.rw-table tr:nth-child(odd) th {
background-color: #f7fafc;
@apply bg-gray-50;
}
.rw-table thead tr {
color: #4a5568;
@apply bg-gray-200 text-gray-600;
}
.rw-table th {
font-weight: 600;
text-align: left;
@apply font-semibold text-left;
}
.rw-table thead th {
background-color: #e2e8f0;
text-align: left;
@apply text-left;
}
.rw-table tbody th {
text-align: right;
@apply text-right;
}
@media (min-width: 768px) {
.rw-table tbody th {
width: 20%;
@apply w-1/5;
}
}
.rw-table tbody tr {
border-top-width: 1px;
@apply border-t border-gray-200;
}
.rw-table input {
margin-left: 0;
@apply ml-0;
}
.rw-table-actions {
display: flex;
justify-content: flex-end;
align-items: center;
height: 17px;
padding-right: 0.25rem;
@apply flex justify-end items-center h-4 pr-1;
}
.rw-table-actions .rw-button {
background-color: transparent;
@apply bg-transparent;
}
.rw-table-actions .rw-button:hover {
background-color: #718096;
color: #fff;
@apply bg-gray-500 text-white;
}
.rw-table-actions .rw-button-blue {
color: #3182ce;
@apply text-blue-500;
}
.rw-table-actions .rw-button-blue:hover {
background-color: #3182ce;
color: #fff;
@apply bg-blue-500 text-white;
}
.rw-table-actions .rw-button-red {
color: #e53e3e;
@apply text-red-600;
}
.rw-table-actions .rw-button-red:hover {
background-color: #e53e3e;
color: #fff;
@apply bg-red-600 text-white;
}
.rw-text-center {
text-align: center;
@apply text-center;
}
.rw-login-container {
display: flex;
align-items: center;
justify-content: center;
width: 24rem;
margin: 4rem auto;
flex-wrap: wrap;
@apply flex items-center justify-center flex-wrap mx-auto w-96 my-16;
}
.rw-login-container .rw-form-wrapper {
width: 100%;
text-align: center;
@apply w-full text-center;
}
.rw-login-link {
margin-top: 1rem;
color: #4a5568;
font-size: 90%;
text-align: center;
flex-basis: 100%;
@apply mt-4 text-gray-600 text-sm text-center w-full;
}
.rw-webauthn-wrapper {
margin: 1.5rem 1rem 1rem;
line-height: 1.4;
@apply mt-6 mx-4 leading-6;
}
.rw-webauthn-wrapper h2 {
font-size: 150%;
font-weight: bold;
margin-bottom: 1rem;
@apply mb-4 text-xl font-bold;
}

5838
yarn.lock

File diff suppressed because it is too large Load Diff