Selaa lähdekoodia

fix: consistent styling in different languages

Sven 1 vuosi sitten
vanhempi
commit
bdca9f1e3a
2 muutettua tiedostoa jossa 18 lisäystä ja 7 poistoa
  1. 15 7
      src/menu/menu_old.css
  2. 3 0
      src/menu/menu_old.ts

+ 15 - 7
src/menu/menu_old.css

@@ -87,13 +87,17 @@
   transform: translate(0px, -6px);
 }
 
+#bytm-cfg-menu {
+  --bytm-menu-subtitle-color: #c6d2db;
+}
+
 #bytm-menu-subtitle-cont {
+  width: auto;
   display: flex;
   flex-direction: row;
   justify-content: space-between;
   align-items: flex-end;
   position: absolute;
-  width: 100%;
   bottom: -12px;
   left: 0;
   font-size: 10px;
@@ -101,10 +105,6 @@
   z-index: 7;
 }
 
-#bytm-cfg-menu {
-  --bytm-menu-subtitle-color: #c6d2db;
-}
-
 #bytm-menu-subtitle-cont .bytm-link {
   color: var(--bytm-menu-subtitle-color);
 }
@@ -121,6 +121,14 @@
   transform: translate(1px, 7px);
 }
 
+#bytm-menu-version-anchor,
+#bytm-cfg-menu-advanced-mode-indicator-wrapper
+{
+  overflow: hidden;
+  text-wrap: nowrap;
+  text-overflow: ellipsis;
+}
+
 #bytm-menu-linkscont {
   display: flex;
   align-items: center;
@@ -143,7 +151,7 @@
   position: relative;
   border-radius: 50%;
   bottom: 0px;
-  transition: bottom 0.15s ease-out;
+  transition: bottom 0.2s ease-out;
 }
 
 .bytm-menu-link:hover .bytm-menu-img {
@@ -161,7 +169,7 @@
   color: var(--bytm-menu-subtitle-color);
   white-space: pre;
   font-size: 1.1rem;
-  transition: visibility 0s, opacity 0.35s ease-out;
+  transition: visibility 0.15s ease-out, opacity 0.15s ease-out;
 }
 
 .bytm-menu-link:hover .extended-link {

+ 3 - 0
src/menu/menu_old.ts

@@ -606,6 +606,7 @@ async function addCfgMenu() {
   subtitleElemCont.id = "bytm-menu-subtitle-cont";
 
   const versionEl = document.createElement("a");
+  versionEl.id = "bytm-menu-version-anchor";
   versionEl.classList.add("bytm-link");
   versionEl.role = "button";
   versionEl.tabIndex = 0;
@@ -634,6 +635,8 @@ async function addCfgMenu() {
     advancedIndicatorLabelEl.textContent = t("advanced_mode");
 
     advancedIndicatorEl = document.createElement("span");
+    advancedIndicatorEl.id = "bytm-cfg-menu-advanced-mode-indicator-wrapper";
+
     advancedIndicatorEl.appendChild(advancedIndicatorIconEl);
     advancedIndicatorEl.appendChild(advancedIndicatorLabelEl);
   }