From fbfaeb55301743d9812f07a8664eea4c29c51ed5 Mon Sep 17 00:00:00 2001 From: Ilya Bogdanov Date: Tue, 26 Sep 2023 15:17:51 +0400 Subject: [PATCH] Minor changes to the top bar styles (#7802) My first attempts to work with the `gui2` codebase. When looking at the IDE, I noticed that the top bar seems slightly off. I checked and confirmed that the sizes (heights) of some elements were not matching Figma. Also, I tried using the `M PLUS 1` font, and it has a _completely_ different baseline than our previous one, effectively shifting all text down. I think we need to start using it as soon as possible, or else we will fix CSS rules everywhere. I understand that the way I added the font is not the correct one, but I guess we can live with that until we properly include the files to the package. Please forgive me, gods of Vue.js, @Frizi and @somebody1234, for this murder. Before: Screenshot 2023-09-13 at 12 19 18 AM After: Screenshot 2023-09-19 at 8 01 18 PM Dropdown animation: https://github.com/enso-org/enso/assets/6566674/bab6baa9-23e3-4c2d-8494-1d464ba6902b --- app/gui2/src/assets/base.css | 20 ++----- app/gui2/src/assets/main.css | 2 +- .../src/components/ExecutionModeSelector.vue | 56 ++++++++++++++----- app/gui2/src/components/GraphNode.vue | 4 +- app/gui2/src/components/NavBreadcrumb.vue | 5 +- app/gui2/src/components/ProjectTitle.vue | 5 +- 6 files changed, 55 insertions(+), 37 deletions(-) diff --git a/app/gui2/src/assets/base.css b/app/gui2/src/assets/base.css index dea5820e6a9d..d7e508f94834 100644 --- a/app/gui2/src/assets/base.css +++ b/app/gui2/src/assets/base.css @@ -1,3 +1,6 @@ +/* M PLUS 1 font import. */ +@import url('https://fonts.googleapis.com/css2?family=M+PLUS+1:wght@500;600&display=swap'); + /* color palette from */ :root { --vt-c-white: #ffffff; @@ -62,7 +65,6 @@ *::after { box-sizing: border-box; margin: 0; - font-weight: normal; } body { @@ -73,22 +75,10 @@ body { transition: color 0.5s, background-color 0.5s; - font-family: - Inter, - -apple-system, - BlinkMacSystemFont, - 'Segoe UI', - Roboto, - Oxygen, - Ubuntu, - Cantarell, - 'Fira Sans', - 'Droid Sans', - 'Helvetica Neue', - sans-serif; + font-family: 'M PLUS 1', sans-serif; font-size: 11.5px; font-weight: 500; - line-height: 174.5%; + line-height: 20px; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; diff --git a/app/gui2/src/assets/main.css b/app/gui2/src/assets/main.css index c106dd0f2e45..e846f2cb0e8b 100644 --- a/app/gui2/src/assets/main.css +++ b/app/gui2/src/assets/main.css @@ -8,6 +8,6 @@ body { display: flex; flex-direction: column; flex: 1; - font-weight: normal; + font-weight: 500; cursor: default; } diff --git a/app/gui2/src/components/ExecutionModeSelector.vue b/app/gui2/src/components/ExecutionModeSelector.vue index 5bc479d30cce..8df0bb05c1c2 100644 --- a/app/gui2/src/components/ExecutionModeSelector.vue +++ b/app/gui2/src/components/ExecutionModeSelector.vue @@ -43,25 +43,28 @@ useDocumentEvent('click', onDocumentClick) " /> -
- -
+ +
+ +
+
diff --git a/app/gui2/src/components/GraphNode.vue b/app/gui2/src/components/GraphNode.vue index d53db50041ee..4708d799c170 100644 --- a/app/gui2/src/components/GraphNode.vue +++ b/app/gui2/src/components/GraphNode.vue @@ -392,7 +392,7 @@ function updatePreprocessor(module: string, method: string, ...args: string[]) { @update:type="visualizationType = $event" />
- +
()