Skip to content

Commit e50a498

Browse files
authored
Merge pull request #21 from connorabbas/develop
Custom preflight, fixes, update PrimeVue
2 parents 83b918d + e9ddd2a commit e50a498

File tree

8 files changed

+403
-111
lines changed

8 files changed

+403
-111
lines changed

.devcontainer/devcontainer.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,15 @@
1010
"vscode": {
1111
"extensions": [
1212
"absszero.vscode-laravel-goto",
13-
"amiralizadeh9480.laravel-extra-intellisense",
14-
"bmewburn.vscode-intelephense-client",
1513
"codingyu.laravel-goto-view",
14+
"onecentlin.laravel-blade",
15+
"amiralizadeh9480.laravel-extra-intellisense",
16+
"DEVSENSE.phptools-vscode",
17+
"MehediDracula.php-namespace-resolver",
1618
"eamodio.gitlens",
1719
"esbenp.prettier-vscode",
1820
"mikestead.dotenv",
1921
"streetsidesoftware.code-spell-checker",
20-
"MehediDracula.php-namespace-resolver",
21-
"hbenl.vscode-test-explorer",
22-
"ms-vscode.test-adapter-converter",
23-
"recca0120.vscode-phpunit",
24-
"onecentlin.laravel-blade",
2522
"hollowtree.vue-snippets",
2623
"Vue.volar",
2724
"shd101wyy.markdown-preview-enhanced"

package-lock.json

Lines changed: 106 additions & 87 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
},
88
"devDependencies": {
99
"@inertiajs/vue3": "^1.0.0",
10-
"@primevue/themes": "^4.0.0",
10+
"@primevue/themes": "^4.1.0",
1111
"@vitejs/plugin-vue": "^5.0.0",
1212
"autoprefixer": "^10.4.19",
1313
"axios": "^1.6.4",
1414
"laravel-vite-plugin": "^1.0",
1515
"postcss": "^8.4.39",
16+
"postcss-import": "^16.1.0",
1617
"primeicons": "^7.0.0",
17-
"primevue": "^4.0.0",
18+
"primevue": "^4.1.0",
1819
"tailwindcss": "^3.4.4",
1920
"tailwindcss-primeui": "^0.3.2",
2021
"vite": "^5.0",

resources/css/app.css

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
@import "custom.css";
2+
@import "custom-preflight.css" layer(tailwind-base);
23

34
@layer tailwind-base, primevue, tailwind-utilities;
45

5-
@layer tailwind-base {
6-
@tailwind base;
7-
@layer base {
8-
input,
9-
textarea,
10-
select,
11-
button {
12-
all: revert;
13-
}
14-
}
15-
}
16-
176
@layer tailwind-utilities {
187
@tailwind components;
198
@tailwind utilities;

resources/css/custom-preflight.css

Lines changed: 285 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,285 @@
1+
/*! modern-normalize v3.0.1 | MIT License | https://github.com/sindresorhus/modern-normalize */
2+
3+
/*
4+
Document
5+
========
6+
*/
7+
8+
/**
9+
Use a better box model (opinionated).
10+
*/
11+
12+
*,
13+
::before,
14+
::after {
15+
box-sizing: border-box;
16+
}
17+
18+
html {
19+
/* Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) */
20+
font-family:
21+
system-ui,
22+
'Segoe UI',
23+
Roboto,
24+
Helvetica,
25+
Arial,
26+
sans-serif,
27+
'Apple Color Emoji',
28+
'Segoe UI Emoji';
29+
line-height: 1.15;
30+
/* 1. Correct the line height in all browsers. */
31+
-webkit-text-size-adjust: 100%;
32+
/* 2. Prevent adjustments of font size after orientation changes in iOS. */
33+
tab-size: 4;
34+
/* 3. Use a more readable tab size (opinionated). */
35+
}
36+
37+
/*
38+
Sections
39+
========
40+
*/
41+
42+
body {
43+
margin: 0;
44+
/* Remove the margin in all browsers. */
45+
}
46+
47+
/*
48+
Text-level semantics
49+
====================
50+
*/
51+
52+
/**
53+
Add the correct font weight in Chrome and Safari.
54+
*/
55+
56+
b,
57+
strong {
58+
font-weight: bolder;
59+
}
60+
61+
/**
62+
1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
63+
2. Correct the odd 'em' font sizing in all browsers.
64+
*/
65+
66+
code,
67+
kbd,
68+
samp,
69+
pre {
70+
font-family:
71+
ui-monospace,
72+
SFMono-Regular,
73+
Consolas,
74+
'Liberation Mono',
75+
Menlo,
76+
monospace;
77+
/* 1 */
78+
font-size: 1em;
79+
/* 2 */
80+
}
81+
82+
/**
83+
Add the correct font size in all browsers.
84+
*/
85+
86+
small {
87+
font-size: 80%;
88+
}
89+
90+
/**
91+
Prevent 'sub' and 'sup' elements from affecting the line height in all browsers.
92+
*/
93+
94+
sub,
95+
sup {
96+
font-size: 75%;
97+
line-height: 0;
98+
position: relative;
99+
vertical-align: baseline;
100+
}
101+
102+
sub {
103+
bottom: -0.25em;
104+
}
105+
106+
sup {
107+
top: -0.5em;
108+
}
109+
110+
/*
111+
Tabular data
112+
============
113+
*/
114+
115+
/**
116+
Correct table border color inheritance in Chrome and Safari. (https://issues.chromium.org/issues/40615503, https://bugs.webkit.org/show_bug.cgi?id=195016)
117+
*/
118+
119+
table {
120+
border-color: currentcolor;
121+
}
122+
123+
/*
124+
Forms
125+
=====
126+
*/
127+
128+
/**
129+
1. Change the font styles in all browsers.
130+
2. Remove the margin in Firefox and Safari.
131+
*/
132+
133+
button,
134+
input,
135+
optgroup,
136+
select,
137+
textarea {
138+
font-family: inherit;
139+
/* 1 */
140+
font-size: 100%;
141+
/* 1 */
142+
line-height: 1.15;
143+
/* 1 */
144+
margin: 0;
145+
/* 2 */
146+
}
147+
148+
/**
149+
Correct the inability to style clickable types in iOS and Safari.
150+
*/
151+
152+
button,
153+
[type='button'],
154+
[type='reset'],
155+
[type='submit'] {
156+
-webkit-appearance: button;
157+
}
158+
159+
/**
160+
Remove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.
161+
*/
162+
163+
legend {
164+
padding: 0;
165+
}
166+
167+
/**
168+
Add the correct vertical alignment in Chrome and Firefox.
169+
*/
170+
171+
progress {
172+
vertical-align: baseline;
173+
}
174+
175+
/**
176+
Correct the cursor style of increment and decrement buttons in Safari.
177+
*/
178+
179+
::-webkit-inner-spin-button,
180+
::-webkit-outer-spin-button {
181+
height: auto;
182+
}
183+
184+
/**
185+
1. Correct the odd appearance in Chrome and Safari.
186+
2. Correct the outline style in Safari.
187+
*/
188+
189+
[type='search'] {
190+
-webkit-appearance: textfield;
191+
/* 1 */
192+
outline-offset: -2px;
193+
/* 2 */
194+
}
195+
196+
/**
197+
Remove the inner padding in Chrome and Safari on macOS.
198+
*/
199+
200+
::-webkit-search-decoration {
201+
-webkit-appearance: none;
202+
}
203+
204+
/**
205+
1. Correct the inability to style clickable types in iOS and Safari.
206+
2. Change font properties to 'inherit' in Safari.
207+
*/
208+
209+
::-webkit-file-upload-button {
210+
-webkit-appearance: button;
211+
/* 1 */
212+
font: inherit;
213+
/* 2 */
214+
}
215+
216+
/*
217+
Interactive
218+
===========
219+
*/
220+
221+
/*
222+
Add the correct display in Chrome and Safari.
223+
*/
224+
225+
summary {
226+
display: list-item;
227+
}
228+
229+
/*
230+
Tailwind Additions
231+
https://tailwindcss.com/docs/preflight
232+
*/
233+
234+
blockquote,
235+
dl,
236+
dd,
237+
h1,
238+
h2,
239+
h3,
240+
h4,
241+
h5,
242+
h6,
243+
hr,
244+
figure,
245+
p,
246+
pre {
247+
margin: 0;
248+
}
249+
250+
h1,
251+
h2,
252+
h3,
253+
h4,
254+
h5,
255+
h6 {
256+
font-size: inherit;
257+
font-weight: inherit;
258+
}
259+
260+
ol,
261+
ul {
262+
list-style: none;
263+
margin: 0;
264+
padding: 0;
265+
}
266+
267+
img,
268+
svg,
269+
video,
270+
canvas,
271+
audio,
272+
iframe,
273+
embed,
274+
object {
275+
display: block;
276+
vertical-align: middle;
277+
}
278+
279+
*,
280+
::before,
281+
::after {
282+
border-width: 0;
283+
border-style: solid;
284+
border-color: theme('borderColor.DEFAULT', currentColor);
285+
}

resources/js/Components/LinksPanelMenu.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import PanelMenu from 'primevue/panelmenu';
2424
v-if="item.route"
2525
:href="item.route"
2626
custom
27-
class="flex items-center cursor-pointer px-4 py-2"
27+
class="flex items-center cursor-pointer no-underline px-4 py-2"
2828
:class="
2929
item.active
3030
? 'text-primary'
@@ -40,7 +40,7 @@ import PanelMenu from 'primevue/panelmenu';
4040
</Link>
4141
<a
4242
v-else
43-
class="flex items-center cursor-pointer text-surface-700 dark:text-surface-0 px-4 py-2"
43+
class="flex items-center cursor-pointer no-underline text-surface-700 dark:text-surface-0 px-4 py-2"
4444
:href="item.url"
4545
:target="item.target"
4646
>

resources/js/Pages/Profile/Partials/DeleteUserForm.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ function focusPasswordInput() {
4646

4747
<div>
4848
<InputText
49+
autofocus
4950
required
5051
id="password"
5152
ref="password-input"

tailwind.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ module.exports = {
1515
},
1616
},
1717
},
18-
plugins: [require('tailwindcss-primeui')],
18+
plugins: [require('postcss-import'), require('tailwindcss-primeui')],
1919
darkMode: ['selector', '.dark-mode'],
2020
};

0 commit comments

Comments
 (0)