|
| 1 | +--- |
| 2 | +title: The state of themes on Blueprint |
| 3 | +description: An update on our recent efforts to make theming easier on our platform |
| 4 | +author: Emma |
| 5 | +thumbnail: themes-on-blueprint.jpg |
| 6 | +date: 12/8/2025 20:00 (CEDST) |
| 7 | +num: 1 |
| 8 | +--- |
| 9 | + |
| 10 | +Ever since the first functional version of Blueprint, themes have been complicated to build and maintain. I recently introduced a new, easier way to build consistent themes through CSS variables and shipped it with [beta-2025-11](/releases/beta-2025-11). |
| 11 | + |
| 12 | +It broke, often. |
| 13 | + |
| 14 | +After weeks of experimenting, **I'm making the difficult decision to remove the "improved" theming functionality in beta-2025-12**. |
| 15 | + |
| 16 | +### The need for consistent theming support |
| 17 | + |
| 18 | +Creating a consistent theme in Blueprint has been difficult, unmaintainable and confusing to say the least. Themes such as [Nebula](/browse/nebula) modify hundreds of seemingly-random class names and deal with complicated CSS selectors to adjust styling. |
| 19 | + |
| 20 | +> I've written an [unofficial guide about making Blueprint themes](https://prpl.blog/#read/custom-pterodactyl-theme) over on my personal blog. I think it can give you enough of an idea of the wizard knowledge you need to make proper themes in Blueprint. I was quite optimistic about it back then, huh. |
| 21 | +
|
| 22 | +Despite this, the community has [built](/browse/darkenate) [some](/browse/euphoriatheme) [great](/browse/catppuccindactyl) [themes](/browse/recolor) with Blueprint. |
| 23 | + |
| 24 | +### The theoretical solution |
| 25 | + |
| 26 | +Pterodactyl's user-side frontend is built with React, [Tailwind](https://tailwindcss.com) and a few other technologies. Tailwind condenses CSS properties to simple CSS classes. To change the background color of an element to white, for example, you would add `bg-white` to the list it's classes. This is similar to [inline styles](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style), but much shorter and the preferred method for many developers. |
| 27 | + |
| 28 | +Tailwind allows for defining a list of colors, fonts, etc for your website (the "Tailwind configuration"). This helps with keeping your site consistent, while retaining the flexibility. Tailwind is often compared to [Bootstrap](https://getbootstrap.com) (of which an old version is used for the Pterodactyl admin panel), but with more flexibility over Bootstrap's more standard UI. |
| 29 | + |
| 30 | +> I've personally used both Tailwind and Bootstrap on a few websites. The Blueprint site you're on is actually built with Tailwind, while our legacy site was built with Bootstrap. |
| 31 | +
|
| 32 | +In theory, allowing extensions to modify the Tailwind configuration would allow themes to change the colors, fonts, spacing and more through a simple configuration. The best way I could think of doing this was through CSS variables. |
| 33 | + |
| 34 | +CSS variables; |
| 35 | + |
| 36 | +- Wouldn't require the panel's frontend assets to be rebuilt when adjusting the color scheme. This would allow them to be adjusted on the fly through, for example, a theme's admin dashboard. |
| 37 | +- Could be edited in and outside of the panel's frontend asset bundle. |
| 38 | +- Priority would be handled by the browser, and would prevent me from having to build out a complicated parser to handle theme values. |
| 39 | + |
| 40 | +### The first roadblock |
| 41 | + |
| 42 | +Pterodactyl uses a few (outdated) libraries. Lots of extensions and panel components rely on these libraries. Upgrading them to their latest versions would break more than it would fix. |
| 43 | + |
| 44 | +The version of Tailwind used by the Pterodactyl panel (v3.0.24, [package.json](https://github.com/pterodactyl/panel/blob/9b703fb40f2c8d0fe08c15a08d9f919a9cee7fa3/package.json#L47)) was able to use CSS variables for configuration options. It ran into problems, however, when calculating the [opacity](https://v3.tailwindcss.com/docs/text-color#changing-the-opacity) of colors set this way. |
| 45 | + |
| 46 | +> It's worth noting that Tailwind v4's configuration is written in a CSS file. Tailwind v3's configuration **is not**. |
| 47 | +
|
| 48 | +Upgrading Tailwind to v3.4.17 seemed to fix this issue, so we went with that and it worked.. sort of. |
| 49 | + |
| 50 | +### The second roadblock |
| 51 | + |
| 52 | +I wrote [a simple theme](https://github.com/prplwtf/tailwindfourblueprint) to test the theming functionality. It seemed to only apply the changes to a few of the panel's elements. |
| 53 | + |
| 54 | +After diving deeper, the issue seemed to lie in Pterodactyl's heavy use of [twin.macro](https://github.com/ben-rogerson/twin.macro). Removing Twin would require editing it out of basically the entire frontend, and existing themes for Blueprint breaking. Besides, a lot of extensions depend on it, so kicking it out isn't really an option. |
| 55 | + |
| 56 | +> Projects like Twin aren't built to be hyper-extensible, especially in the way we're doing it. Our use-case is anything but standard. |
| 57 | +
|
| 58 | +At this point, I was pretty much a week into building this feature already, and it seemed to work, so I called it a day. |
| 59 | + |
| 60 | +### Don't deploy on Fridays |
| 61 | + |
| 62 | +On November 28th, I shipped [beta-2025-11](/releases/beta-2025-11). |
| 63 | + |
| 64 | +A portion of users immediately started experiencing errors when building the frontend asset bundle. I shipped a few patches until it (largely) worked. |
| 65 | + |
| 66 | +The final patch solved most issues. A percentage of users, however, started experiencing issues with a few elements' colors turning black (bug was often referred to "black graphs"). The exact reason why it worked on my and a few others' Pterodactyl panels wasn't found, but there's a good chance cache was to blame. |
| 67 | + |
| 68 | +### The third and final roadblock |
| 69 | + |
| 70 | +I spent the next week experimenting even more; |
| 71 | + |
| 72 | +- Using PostCSS together with a script to go through CSS variables and apply them to the Tailwind configuration on build time. Even though it didn't even work properly in the first place, it also removed the ability for these CSS variables to be adjusted on the fly, as they'd be indexed only when building the frontend asset bundle. |
| 73 | +- Replacing Twin's `theme()` function. This was moreso a proof of concept. It was abandoned as it only fixed issues for a small amount of the affected components that made use of the function. |
| 74 | +- Messing with libraries' configuration options. |
| 75 | + |
| 76 | +None of these seemed to fix the "black graphs" bug, and when they did, I couldn't replicate the fix on other Pterodactyl installations. |
| 77 | + |
| 78 | +> I was generally just pushing buttons until something happened, with a large amount of the "fixes" coded by AI. The fixes listed above never made it to a release. I was pretty desperate to find a solution to have this **just work**, but after weeks of trying, it's time to admit defeat. |
| 79 | +
|
| 80 | +### A final decision |
| 81 | + |
| 82 | +This December there will be a release that will roll-back the theming-related changes made in [beta-2025-11](/releases/beta-2025-11). The [related documentation article](/docs/themes/colors) has been unlisted and [beta-2025-11](/releases/beta-2025-11) will be marked as unsupported once beta-2025-12 releases. |
| 83 | + |
| 84 | +Thank you for your patience with me and the rest of the team. |
| 85 | + |
| 86 | +#### Things break sometimes |
| 87 | + |
| 88 | +Blueprint has been in a stable state over the past year. Due to this, it might be easy to forget that Blueprint, after all, is still in it's beta stage. |
| 89 | + |
| 90 | +That said, I should have never released Blueprint in this state. I think it's important for us to do more extensive testing before shipping a release, through CI and test deployments for example. |
| 91 | + |
| 92 | +People are people, and people make mistakes. |
0 commit comments