Skip to content

Commit

Permalink
More improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
robdekort committed Mar 1, 2024
1 parent 1ce4957 commit 19f37ad
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 25 deletions.
1 change: 0 additions & 1 deletion public/build/assets/site-54y9HhaR.css

This file was deleted.

1 change: 1 addition & 0 deletions public/build/assets/site-D7bkgQHD.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion public/build/assets/site-jd60iClm.css

This file was deleted.

2 changes: 1 addition & 1 deletion public/build/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resources/css/site.css": {
"file": "assets/site-jd60iClm.css",
"file": "assets/site-D7bkgQHD.css",
"isEntry": true,
"src": "resources/css/site.css"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<input
@change="form.{{ handle }} = Object.values($event.target.files)"
:aria-invalid="form.invalid('{{ handle }}')"
class="w-full file:py-2 file:mr-4 file:px-4 file:border-2 file:border-solid file:border-primary file:bg-white file:text-primary file:text-xs file:uppercase file:tracking-widest file:font-bold file:rounded border-neutral focus-visible:border-primary motion-safe:transition"
class="w-full file:py-2 file:mr-4 file:px-4 file:border-2 file:border-solid file:border-primary file:bg-white file:text-primary file:text-xs file:uppercase file:tracking-widest file:font-bold file:rounded border-neutral focus:border-primary motion-safe:transition"
type="file"
{{ if max_files === 1 }}
name="{{ handle }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<input
x-model="form.{{ handle }}"
@change="form.validate('{{ handle }}')"
class="mr-2 rounded border-neutral text-primary focus-visible:border-primary"
class="mr-2 rounded border-neutral text-primary focus:border-primary"
type="checkbox"
name="{{ handle }}[]"
value="{{ value }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
x-model="form.{{ handle }}"
@change="form.validate('{{ handle }}')"
:aria-invalid="form.invalid('{{ handle }}')"
:class="{ 'border-red-600': form.invalid('{{ handle }}') }"
class="w-full rounded border-neutral focus-visible:border-primary caret-primary"
:class="{
'border-red-600 focus:border-red-600 !outline-red-600/50': form.invalid('{{ handle }}'),
'border-neutral focus:border-primary': !form.invalid('{{ handle }}')
}"
class="w-full rounded caret-primary"
id="{{ handle }}"
name="{{ handle }}"
type="{{ input_type ?? 'text' }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<input
x-model="form.{{ handle }}"
@change="form.validate('{{ handle }}')"
class="mr-2 border-neutral text-primary focus-visible:border-primary"
class="mr-2 border-neutral text-primary focus:border-primary"
type="radio"
name="{{ handle }}"
value="{{ value }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
x-model="form.{{ handle }}"
@change="form.validate('{{ handle }}')"
:aria-invalid="form.invalid('{{ handle }}')"
:class="{ 'border-red-600': form.invalid('{{ handle }}')}"
class="w-full rounded border-neutral focus-visible:border-primary"
:class="{
'border-red-600 focus:border-red-600 !outline-red-600/50': form.invalid('{{ handle }}'),
'border-neutral focus:border-primary': !form.invalid('{{ handle }}')
}"
class="w-full rounded"
id="{{ handle }}"
name="{{ handle }}{{ multiple ?= "[]" }}"
{{ instructions_position == 'below' ?= 'aria-describedBy="{handle}-instructions"' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
x-model="form.{{ handle }}"
@change="form.validate('{{ handle }}')"
:aria-invalid="form.invalid('{{ handle }}')"
:class="{ 'border-red-600': form.invalid('{{ handle }}') }"
class="w-full h-32 rounded border-neutral focus-visible:border-primary caret-primary"
:class="{
'border-red-600 focus:border-red-600 !outline-red-600/50': form.invalid('{{ handle }}'),
'border-neutral focus:border-primary': !form.invalid('{{ handle }}')
}"
class="w-full h-32 rounded caret-primary"
id="{{ handle }}"
name="{{ handle }}"
rows="5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
>
<input type="hidden" name="{{ handle }}" value="0">
<input
class="mr-2 inline-flex rounded border-neutral focus-visible:border-primary text-primary"
class="mr-2 inline-flex rounded border-neutral focus:border-primary text-primary"
type="checkbox"
name="{{ handle }}"
value="1"
Expand Down
31 changes: 19 additions & 12 deletions tailwind.config.site.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,30 @@ module.exports = {
'--focus-outline-offset': '3px',
'--focus-outline-color': 'currentColor',
'--focus-outline-style': 'dotted',
'--focus-form-outline-width': '3px',
'--focus-form-outline-offset': '0',
'--focus-form-outline-color': "theme('colors.primary.DEFAULT / .5')",
'--focus-form-outline-style': 'solid',
},
':focus': {
outlineWidth: 'var(--focus-outline-width, 2px)',
outlineOffset: 'var(--focus-outline-offset, 3px)',
outlineColor: 'var(--focus-outline-color, currentColor)',
outlineStyle: 'var(--focus-outline-style, dotted)',
},
'*:focus:not(:focus-visible)': {
outline: '2px solid transparent',
outlineOffset: '2px'
outlineOffset: '2px',
},
':focus-visible': {
outlineWidth: 'var(--focus-outline-width)',
outlineOffset: 'var(--focus-outline-offset)',
outlineColor: 'var(--focus-outline-color)',
outlineStyle: 'var(--focus-outline-style)',
'*:focus:not(:focus-visible) > .focus-nested': {
outline: 'none !important'
},
'input:focus-visible, textarea:focus-visible, select:focus-visible': {
boxShadow: 'none !important',
outlineWidth: 'var(--focus-outline-width) !important',
outlineOffset: 'var(--focus-outline-offset) !important',
outlineColor: 'var(--focus-outline-color) !important',
outlineStyle: 'var(--focus-outline-style) !important',
'input:not([type="button"]):focus, textarea:focus, select:focus': {
boxShadow: 'none',
outlineWidth: 'var(--focus-form-outline-width, 3px)',
outlineOffset: 'var(--focus-form-outline-offset, 0)',
outlineColor: 'var(--focus-form-outline-color, currentColor)',
outlineStyle: 'var(--focus-form-outline-style, solid)',
},
'mark': {
backgroundColor: "theme('colors.primary.DEFAULT / 1')",
Expand Down

0 comments on commit 19f37ad

Please sign in to comment.