Przeglądaj źródła

[visual] fix styling for showing authors (#13772)

* [visual] fix styling for showing authors

* add horizontal padding

* use gap

* prettier

* maxWidth and flex wrap

* min-width

* use only min-width

GitOrigin-RevId: 1fdc1baac6fd98ee909f847716f6aedf88e96aec
Domagoj Kriskovic 3 lat temu
rodzic
commit
b0d994575d

+ 7 - 8
services/web/frontend/js/features/source-editor/extensions/visual/visual-theme.ts

@@ -88,17 +88,16 @@ export const visualTheme = EditorView.theme({
     padding: '0.5em',
     lineHeight: 'calc(var(--line-height) * 5/6)',
   },
+  '.ol-cm-authors': {
+    display: 'flex',
+    justifyContent: 'space-evenly',
+    gap: '0.5em',
+    flexWrap: 'wrap',
+  },
   '.ol-cm-author': {
-    display: 'inline-block',
-    maxWidth: '45%',
-    minWidth: '200px',
-    verticalAlign: 'top',
     cursor: 'pointer',
-  },
-  '.ol-cm-author:not(:first-child)': {
     display: 'inline-block',
-    marginLeft: '5%',
-    maxWidth: '45%',
+    minWidth: '150px',
   },
   '.ol-cm-icon-brace': {
     filter: 'grayscale(1)',