Skip to content

Commit

Permalink
fix button underline inside prose
Browse files Browse the repository at this point in the history
  • Loading branch information
saadeghi committed Mar 11, 2025
1 parent c7c19b8 commit 8699002
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
22 changes: 18 additions & 4 deletions packages/daisyui/src/components/button.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.btn {
@apply inline-flex shrink-0 cursor-pointer flex-nowrap items-center justify-center gap-1.5 text-center align-middle no-underline outline-offset-2 select-none;
@apply inline-flex shrink-0 cursor-pointer flex-nowrap items-center justify-center gap-1.5 text-center align-middle outline-offset-2 select-none;
padding-inline: var(--btn-p);
color: var(--btn-fg);
--tw-prose-links: var(--btn-fg);
height: var(--size);
font-size: 0.875rem;
font-weight: 600;
Expand All @@ -28,10 +29,13 @@
--btn-fg: var(--color-base-content);
--btn-p: 1rem;
--btn-border: color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%));
--btn-shadow: 0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000),
--btn-shadow:
0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000),
0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000);
--btn-noise: var(--fx-noise);

.prose & {
@apply no-underline;
}
@media (hover: hover) {
&:hover {
--btn-bg: color-mix(in oklab, var(--btn-color, var(--color-base-200)), #000 7%);
Expand Down Expand Up @@ -166,7 +170,17 @@
}

.btn-outline {
&:not(.btn-active, :hover, :active:focus, :focus-visible, :disabled, [disabled], .btn-disabled, :checked, [checked]) {
&:not(
.btn-active,
:hover,
:active:focus,
:focus-visible,
:disabled,
[disabled],
.btn-disabled,
:checked,
[checked]
) {
--btn-shadow: "";
--btn-bg: #0000;
--btn-fg: var(--btn-color);
Expand Down
8 changes: 4 additions & 4 deletions packages/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "5.1.10",
"astro": "5.4.2",
"daisyui": "workspace:*"
},
"dependencies": {
"@astrojs/react": "4.2.0",
"@astrojs/vue": "5.0.6",
"@astrojs/react": "4.2.1",
"@astrojs/vue": "5.0.7",
"pikaday": "1.8.2",
"react": "19.0.0",
"react-day-picker": "9.5.1",
"react-day-picker": "9.6.0",
"react-dom": "19.0.0"
}
}

0 comments on commit 8699002

Please sign in to comment.