Skip to content

Commit f6513c2

Browse files
refactor(external): consolidate global CSS overrides into ExternalApp component
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 9c7e412 commit f6513c2

1 file changed

Lines changed: 26 additions & 12 deletions

File tree

src/ExternalApp.vue

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,37 @@ defineOptions({ name: 'LibreSignExternal' })
1818
import RightSidebar from './components/RightSidebar/RightSidebar.vue'
1919
</script>
2020

21+
<style lang="scss">
22+
// Override server.css layout rules that assume authenticated header layout.
23+
// `html body #content` beats the specificity of server.css selectors.
24+
html body #content {
25+
position: fixed;
26+
inset: 0;
27+
margin: 0;
28+
width: 100vw;
29+
height: 100vh;
30+
border-radius: 0;
31+
}
32+
33+
// On mobile, NcAppSidebar relies on NcContent to overlay content.
34+
// Without it, force the sidebar to cover the viewport as a full-screen overlay.
35+
@media (max-width: 512px) {
36+
#app-sidebar {
37+
position: fixed;
38+
inset: 0;
39+
width: 100vw !important;
40+
max-width: 100vw !important;
41+
height: 100vh;
42+
z-index: 2000;
43+
}
44+
}
45+
</style>
46+
2147
<style lang="scss" scoped>
2248
.external-app {
2349
position: absolute;
2450
inset: 0;
2551
display: flex;
2652
background-color: var(--color-main-background);
27-
// On mobile, NcAppSidebar relies on NcContent to overlay content.
28-
// Without it, force the sidebar to cover the viewport as a full-screen overlay.
29-
@media (max-width: 512px) {
30-
:deep(#app-sidebar) {
31-
position: fixed;
32-
inset: 0;
33-
width: 100vw !important;
34-
max-width: 100vw !important;
35-
height: 100vh;
36-
z-index: 2000;
37-
}
38-
}
3953
}
4054
</style>

0 commit comments

Comments
 (0)