add text shadow

This commit is contained in:
Jeffrey Hsu 2025-01-14 14:23:28 +08:00
parent 4c0d15b255
commit f1e2ddd7e4
3 changed files with 23 additions and 4 deletions

View File

@ -7,7 +7,7 @@ defineProps<{
<template> <template>
<div class="my-16 relative"> <div class="my-16 relative">
<h3 class="text-5xl font-bold text-blue-400 relative z-10"> <h3 class="text-5xl font-bold text-shadow-lg shadow-blue-200 text-blue-400 relative z-10">
{{ title }} {{ title }}
</h3> </h3>
<div class="h-12 w-auto text-5xl text-blue-200 absolute left-48 top-0 -translate-y-6"> <div class="h-12 w-auto text-5xl text-blue-200 absolute left-48 top-0 -translate-y-6">

View File

@ -61,7 +61,7 @@ onMounted(() => {
<p class="text-gray-500"> <p class="text-gray-500">
你好欢迎来到 你好欢迎来到
</p> </p>
<div class="relative mt-4 h-72 text-5xl text-blue-400 transition-all md:text-6xl lg:text-7xl"> <div class="relative mt-4 h-72 text-5xl text-blue-400 transition-all text-shadow-lg shadow-blue-200 md:text-6xl lg:text-7xl">
<h1 style="font-family: BaconyScript,sans-serif"> <h1 style="font-family: BaconyScript,sans-serif">
CantyOni_on's CantyOni_on's
</h1> </h1>

View File

@ -1,5 +1,7 @@
import type { Config } from 'tailwindcss' import type { Config } from 'tailwindcss'
import plugin from 'tailwindcss/plugin'
export default { export default {
content: [ content: [
'./components/**/*.{js,vue,ts}', './components/**/*.{js,vue,ts}',
@ -10,7 +12,24 @@ export default {
'./error.vue', './error.vue',
], ],
theme: { theme: {
extend: {}, extend: {
textShadow: {
sm: '0 1px 2px var(--tw-shadow-color)',
DEFAULT: '0 2px 4px var(--tw-shadow-color)',
lg: '0 8px 16px var(--tw-shadow-color)',
},
},
}, },
plugins: [], plugins: [
plugin(function ({ matchUtilities, theme }) {
matchUtilities(
{
'text-shadow': value => ({
textShadow: value,
}),
},
{ values: theme('textShadow') },
)
}),
],
} satisfies Config } satisfies Config