-
Hi, I wrote my custom theme and I'd like the footer to contain the copyright text. We can copy it in the slides, but I'd prefer if possible to set it from the theme. I tried setting the content of the footer tag from CSS and setting in :root the --footer variable, without success. Any suggestions? Thank you, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
A common way is using /* @theme your-theme */
footer::before {
content: 'Copyright © 2025 Your Name';
} ---
theme: your-theme
# Footer directive should be defined as non-empty value to render <footer> tag for each slide page.
footer: " "
---
# Hello! AlternativeAs shown here, /* @theme your-theme */
section::before {
content: 'Copyright © 2023 Your Name';
/* Custom styles as the footer */
position: absolute;
left: 1rem;
bottom: 1rem;
display: block;
font-size: 1rem;
color: #999;
} |
Beta Was this translation helpful? Give feedback.
A common way is using
content
property withinfooter::before
pseudo selector to prepend the specific content by CSS.Alternative
As shown here,
footer
directive should be enabled as non-empty value, such as whitespace(s), to render the<footer>
element for each slide page. If you want to let theme users show the content specified by theme CSS without using thefooter
directive, you can usesection::before
instead.