Closed hao-lee closed 1 month ago
You can always delete this part of code from .css file ;-)
Sure... But it would be even better if we can config it in toml...
Maybe but, the theme has been re-designed to be as bare-bone as possible (and still some things need to be changed). So when you want to change something small (and simple) in CSS, then you just go to .css files, the same goes for anything else.
There was the option for that in the config.toml, but I decided to remove it. I want to get rid of unnecessary complexity.
Your suggestion is certainly reasonable, but it would require users to modify the theme’s code directly to meet their needs. It seems like a better approach would be to allow users to create a new CSS file in their Hugo source directory, which could then override the theme’s default styles. Just an idea, though I’m not sure if this is feasible.
It seems like a better approach would be to allow users to create a new CSS file in their Hugo source directory, which could then override the theme’s default styles. Just an idea, though I’m not sure if this is feasible.
But this is possible too in Hugo — your local files can override any other file from the theme, please check this documentation: https://gohugo.io/templates/lookup-order/. And the theme has a special slot-file /static/style.css
(https://github.com/panr/hugo-theme-terminal?tab=readme-ov-file#how-to-edit-the-theme-) that can store anything you want and it will override the default styles.
The whole point of avoiding complex configuration is the fact that different people want different things and that complicates everything: it's harder to dive in into the theme, because people need to learn the config first. If you know how to install the theme, you probably know how to edit HTML/CSS/JS, so I want people to do this it on their own in a way they want to without re-building the theme. That's why I don't use other frameworks inside the theme, and everything is just plain file as is for HTML/CSS/JS (no htmlx, Sass/SCSS or React etc.)
EDIT: Sorry for closing the issue, something went wrong with my keyboard shortcuts. I did it by mistake.
Got it!
I tried this method. But it seems style.css
is loaded as the last one so I have to use !important
to override the previous style.
No you don't have to use !important
, because it's loaded as the last one ;-) Just make sure you're overriding things using the same specificity (https://www.w3schools.com/css/css_specificity.asp) as in the default styles, this matters.
This code should revert headings to the default browser styles:
h1, h2, h3, h4, h5, h6 {
font-size: revert;
text-transform: none;
}
You are right. Your snippet works well. Thanks!
I think the theme should keep the original case as in the md file.