hfviewer / style.css
HannesVonEssen's picture
Restore Space styling and add native Hugging Face login
7f00c04 verified
Raw
History Blame Contribute Delete
1.97 kB
/* Space-owned safety net. The full hfviewer shell is vendored alongside this
file, but these colors also prevent a white flash while the larger styles
are parsed. */
:root,
html,
body {
color-scheme: dark;
background: #050914 !important;
}
body {
min-height: 100vh;
color: #f5f7fb;
}
/* The Space snapshot normally hides hfviewer.com's own cross-origin auth.
Native Space OAuth is the one exception. */
body .hfnx-auth > [data-space-native-auth] {
display: inline-flex !important;
}
.space-native-auth-login {
align-items: center;
justify-content: center;
min-height: 36px;
padding: 0 14px;
border: 1px solid rgba(255, 255, 255, 0.16);
border-radius: 10px;
background: rgba(255, 255, 255, 0.07);
color: #f8fafc;
font: 600 13px/1 Inter, ui-sans-serif, system-ui, sans-serif;
text-decoration: none;
white-space: nowrap;
transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.space-native-auth-login:hover {
border-color: rgba(159, 255, 102, 0.62);
background: rgba(159, 255, 102, 0.1);
transform: translateY(-1px);
}
.space-native-auth-login[aria-disabled="true"] {
cursor: wait;
opacity: 0.62;
}
.space-native-auth-wrap {
position: relative;
align-items: center;
}
.space-native-auth-wrap .hfnx-auth__chip {
display: inline-flex !important;
}
body .space-native-auth-menu {
display: none !important;
position: absolute;
top: calc(100% + 8px);
right: 0;
z-index: 4200;
min-width: 168px;
padding: 6px;
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 12px;
background: rgba(13, 17, 29, 0.98);
box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}
body .space-native-auth-menu.is-open {
display: grid !important;
}
.space-native-auth-menu .hfnx-auth__item {
width: 100%;
box-sizing: border-box;
text-align: left;
}
@media (max-width: 640px) {
.space-native-auth-login {
min-height: 34px;
padding: 0 10px;
font-size: 12px;
}
}