fix(theme): synchronize navbar logo with active color scheme
Replace CSS background-image switching with direct navbar image source updates to avoid Safari and WebKit repaint failures. Select the appropriate logo during initial DOM construction and update it when the system color scheme changes, Safari restores a cached page, or the document returns to the foreground. Preserve CSP compatibility and Gitea subpath support while retaining the existing logo dimensions.
This commit is contained in:
@@ -293,15 +293,7 @@ gitea-theme-meta-info {
|
||||
--cc-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
}
|
||||
|
||||
html[data-theme="codecraftsmen-dark"] #navbar #navbar-logo {
|
||||
background-image: url("../img/logo-dark-no-slogan.svg");
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 60px 30px;
|
||||
}
|
||||
|
||||
html[data-theme="codecraftsmen-dark"] #navbar #navbar-logo img {
|
||||
visibility: hidden;
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user