Commit 46a2057
authored
chore!(website): migrate tailwind to v4, daisyui to v5 and flowbite-react to v0.12, change how custom colors are defined (#6510)
Breaking: custom color themes now need to be defined in
`src/styles/custom-colors.css` as CSS variables:
```css
/* src/styles/custom-colors.css
* Custom colors now defined in this file */
:root,
:host {
--color-primary-400: #52b4de;
--color-primary-600: #1c7dad;
/* etc */
}
```
Resolves #4020, resolves #3714, resolves #5117
Unblocks #6513
Commit messages have more detail about reasoning behind the changes.
I've tried to keep changes minimal but a bunch of things were
unavoidable. Overview of main changes:
- Tailwind renames a lot of classes, this causes the majority of the
churn. Much of the renames were done by tailwind's upgrade cli but it
missed some files and some class patterns so Codex/Claude reviewed
migration guide as well to find anything remaining.
- DaisyUI v5 hides modals with `.modal-box` class unless they are inside
`.modal`, we had a bunch of modals that weren't following this pattern
- We now need to pin vite to v6, the same used by our current version of
astro, as otherwise our 2-stage build with `npm ci --omit=dev` gets
mismatch issues
- Fix some console errors related to react ref forwarding and SSR
hydration
- Flowbite v0.10 used to set a bunch of global styles that are no longer
set in v0.12. To keep styling consistent I add relevant global styles as
a CSS file. We use those styles for example in radio buttons, checkboxes
- Color theme is now defined as css instead of `colors.json`
(`website/colors.json`) as we can no longer import a json file in CSS
(it could be imported into tailwind config, but that's no longer
possible in tailwind v4). This would be breaking for people who override
colors (heads up to Genspectrum @chaoran-chen @fengelniederhammer if you
do).
Feel free to ask if you have questions about some of the changes.1 parent b56b43d commit 46a2057
86 files changed
Lines changed: 2094 additions & 2140 deletions
File tree
- .github
- integration-tests/tests/fixtures
- website
- src
- components
- DataUseTerms
- Edit
- Group
- OrganismMetadataTable
- ReviewPage
- SearchPage
- DownloadDialog
- FieldSelector
- fields
- SeqSetCitations
- SequenceDetailsPage
- SequencesDisplay
- Submission
- FileUpload
- User
- common
- layouts
- pages
- [organism]/submission
- [groupId]
- api-documentation
- styles
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
0 commit comments