Feature Request - Custom CSS #139
-
I made a few UI tweaks which I'm running client-side (put a tint on the background image, background blur on the content divs, tweaked some spacing and changed the font); would certainly be preferable if there was a call to a blank style.css in the config directory, where you could add in whatever overrides you'd like. I poked around in the code to see if I'd be able to add that myself, and well.. not quite. |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 4 replies
-
It'd be easy to check and load a custom css file, but targeting elements would be hard. The project uses Tailwind CSS so there are no element specific classes, only utility classes are used. For it to be really useful, I'd have to go through every part of the site and tag on "targeting" classes. It's a nice idea, but I'll have to see what the best way of adding this would be. |
Beta Was this translation helpful? Give feedback.
-
For reference, here are the overrides I'm using:
Loading these browser-side automatically via the Magic CSS extension. Might be able to include this by overriding a CSS file via docker-compose.yaml, just haven't had a chance to tinker with that yet. |
Beta Was this translation helpful? Give feedback.
-
@benphelps - any more thought to this? Maybe just to start, can you add and import a blank config/custom.css? That would at least allow us to have direct css access like mentioned above (ex. .text-left.cursor-pointer > .flex div:nth-child(2)). Thanks |
Beta Was this translation helpful? Give feedback.
-
I got this working in a hacky way:
volumes:
- ./data/homepage/f2c4a203e63efddc.css:/app/.next/static/css/f2c4a203e63efddc.css
Here's a snippet of my css file: /* START OF CUSTOM ----------------------------------------------------- */
/* fix padding between first cards */
.grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4.gap-x-2.mt-3 li:first-child {
padding-right: 10px;
}
/* spacing between cards */
.gap-x-2 {
-moz-column-gap: 1.5rem !important;
column-gap: 1.5rem !important;
}
/* drop shadow */
.shadow-md {
--tw-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.5) !important;
}
/* body */
body {
font-family: Raleway,sans-serif;
font-size: 18px;
}
/* service title */
.flex-1.px-2.py-2.text-sm.text-left {
font-weight: bold;
font-size: 17.6px;
}
/* cards */
:is(.dark .dark\:bg-white\/5) {
border-radius: 15px;
background-color: rgba(24, 28, 58, 0.8) !important;
padding: 10px;
}
:is(.dark .dark\:bg-white\/5):hover {
top: -2px;
}
/* search box - inner text */
:is(.dark .dark\:text-white) {
font-size: 18px;
}
/* search box - icon */
.w-3 {
width: 1rem;
}
.h-3 {
height: 1rem;
}
/* subtitle */
.text-theme-500 {
font-size: .9em;
font-weight: 500;
padding-top: 5px;
}
/* error box */
:is(.dark .dark\:bg-rose-900) {
display: none;
}
/* detail boxes */
:is(.dark .dark\:bg-theme-900\/20) {
background-color: rgb(var(--color-900)/.5);
border-radius: 10px;
}
/* END OF CUSTOM ----------------------------------------------------- */
/*
! tailwindcss v3.3.0 | MIT License | https://tailwindcss.com
*/
/* etc, etc, etc.... */ |
Beta Was this translation helpful? Give feedback.
-
Closed by #1950, great work 🚀 |
Beta Was this translation helpful? Give feedback.
-
This discussion has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. |
Beta Was this translation helpful? Give feedback.
Closed by #1950, great work 🚀