Skip to content

Commit 6d3eb06

Browse files
committed
fix: alert unwanted gap if there's one child only. closes: #3702
1 parent cebec6a commit 6d3eb06

4 files changed

Lines changed: 14 additions & 5 deletions

File tree

packages/daisyui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"type": "module",
33
"name": "daisyui",
44
"version": "5.0.7",
5-
"description": "daisyUI 5 - Tailwind CSS Component Library",
5+
"description": "daisyUI 5 - The Tailwind CSS Component Library",
66
"author": "Pouya Saadeghi",
77
"license": "MIT",
88
"homepage": "https://daisyui.com",

packages/daisyui/src/components/alert.css

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
justify-content: start;
55
justify-items: start;
66
grid-auto-flow: column;
7-
grid-template-columns: auto minmax(auto, 1fr);
7+
grid-template-columns: auto;
88
text-align: start;
99
border: var(--border) solid var(--color-base-200);
1010
font-size: 0.875rem;
@@ -21,6 +21,9 @@
2121
#0000
2222
),
2323
0 4px 3px -2px oklch(0% 0 0 / calc(var(--depth) * 0.08));
24+
&:has(:nth-child(2)) {
25+
grid-template-columns: auto minmax(auto, 1fr);
26+
}
2427
&.alert-outline {
2528
@apply bg-transparent;
2629
color: var(--alert-color);
@@ -79,12 +82,18 @@
7982
grid-auto-flow: row;
8083
grid-template-columns: auto;
8184
text-align: center;
85+
&:has(:nth-child(2)) {
86+
grid-template-columns: auto;
87+
}
8288
}
8389

8490
.alert-horizontal {
8591
justify-content: start;
8692
justify-items: start;
8793
grid-auto-flow: column;
88-
grid-template-columns: auto minmax(auto, 1fr);
94+
grid-template-columns: auto;
8995
text-align: start;
96+
&:has(:nth-child(2)) {
97+
grid-template-columns: auto minmax(auto, 1fr);
98+
}
9099
}

packages/docs/src/routes/(routes)/docs/install/rails/+page.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ This works as a Tailwind CSS plugin so only the class names you need will be add
6969
Run this code to download latest version of daisyUI as a single js file
7070

7171
```sh:Terminal
72-
curl -sLo app/assets/tailwind/daisyui.js https://esm.run/daisyui@5/index.js
72+
curl -sLo app/assets/tailwind/daisyui.js https://github.com/saadeghi/daisyui/releases/latest/download/daisyui.js
7373
```
7474

7575
Put Tailwind CSS and daisyUI in your CSS file (and remove old styles)

packages/docs/src/routes/(routes)/docs/install/standalone/+page.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Follow [Tailwind CSS guide](https://tailwindcss.com/blog/standalone-cli) and get
1616
Run this code to download latest version of daisyUI as a single js file and put it next to Tailwind's executable file.
1717

1818
```sh:Terminal
19-
curl -sLo daisyui.js https://esm.run/daisyui@5/index.js
19+
curl --sLO https://github.com/saadeghi/daisyui/releases/latest/download/daisyui.js
2020
```
2121

2222
### 3. Add Tailwind CSS and daisyUI

0 commit comments

Comments
 (0)