Enhance CSS for mobile responsiveness and layout

Added mobile fixes and improved box-sizing to prevent horizontal scrolling.
This commit is contained in:
Dome
2026-04-07 20:15:08 +02:00
committed by GitHub
parent 5832cd0449
commit edd095efc4
+33 -3
View File
@@ -1,6 +1,6 @@
/* /*
Copyright 2020 The Matrix.org Foundation C.I.C. Copyright 2020 The Matrix.org Foundation C.I.C.
Modified 2026 for Zeitfresser Matrix Community Look Modified 2026 for Zeitfresser Matrix Community Look & Mobile Fixes
*/ */
@import url('spinner.css'); @import url('spinner.css');
@@ -9,6 +9,11 @@ Modified 2026 for Zeitfresser Matrix Community Look
@import url('create.css'); @import url('create.css');
@import url('open.css'); @import url('open.css');
/* Globaler Fix für Box-Berechnungen (verhindert horizontales Scrollen) */
* {
box-sizing: border-box;
}
:root { :root {
--app-background: #1e1f29; /* Tief-Anthrazit der Webseite */ --app-background: #1e1f29; /* Tief-Anthrazit der Webseite */
--background: #282a36; /* Hintergrund der Card */ --background: #282a36; /* Hintergrund der Card */
@@ -29,6 +34,7 @@ html {
margin: 0; margin: 0;
padding: 0; padding: 0;
height: 100%; height: 100%;
overflow-x: hidden; /* Verhindert Wackeln nach links/rechts auf Mobile */
} }
body { body {
@@ -42,14 +48,20 @@ body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
width: 100%;
} }
h1, h2, h3 { h1, h2, h3 {
color: var(--foreground); color: var(--foreground);
letter-spacing: -0.5px; letter-spacing: -0.5px;
word-wrap: break-word; /* Verhindert, dass lange Titel Mobile sprengen */
}
p {
line-height: 1.7;
word-wrap: break-word;
} }
p { line-height: 1.7; }
a { text-decoration: none; color: var(--link); } a { text-decoration: none; color: var(--link); }
body, button, input, textarea { body, button, input, textarea {
@@ -68,7 +80,7 @@ button, input[type=submit] {
border-left: 4px solid var(--ztfr-purple); border-left: 4px solid var(--ztfr-purple);
box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.3); box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.3);
padding: 2.5rem; padding: 2.5rem;
box-sizing: border-box; width: 100%; /* Wichtig für Mobile */
} }
.RootView { .RootView {
@@ -88,6 +100,7 @@ button, input[type=submit] {
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 1px; letter-spacing: 1px;
transition: all 0.2s ease; transition: all 0.2s ease;
width: 100%; /* Damit Buttons auf Mobile die volle Breite nutzen */
} }
.primary { .primary {
@@ -134,6 +147,7 @@ input[type='text'].large {
color: var(--sub-text); /* Das sanfte Grau */ color: var(--sub-text); /* Das sanfte Grau */
opacity: 0.7; opacity: 0.7;
border-top: 1px solid rgba(255, 255, 255, 0.05); /* Dezente Trennlinie */ border-top: 1px solid rgba(255, 255, 255, 0.05); /* Dezente Trennlinie */
width: 100%;
} }
/* Entfernt die hässlichen Listenpunkte */ /* Entfernt die hässlichen Listenpunkte */
@@ -180,3 +194,19 @@ input[type='text'].large {
color: var(--foreground) !important; color: var(--foreground) !important;
border-bottom-color: var(--ztfr-purple) !important; border-bottom-color: var(--ztfr-purple) !important;
} }
/* SPEZIELLE MOBILE ANPASSUNGEN */
@media screen and (max-width: 480px) {
body {
padding: 40px 10px 0 10px; /* Weniger Abstand oben und seitlich */
}
.card {
padding: 1.5rem; /* Mehr Platz für Inhalt auf kleinem Screen */
border-radius: 2px; /* Fast ganz eckig für mehr Fläche */
}
h1 {
font-size: 1.5rem; /* Etwas kleinere Schrift für Mobile Titel */
}
}