minor tweaks

K Simmons created

Change summary

styles/src/styleTree/tabBar.ts    |  4 +-
styles/src/themes/common/ramps.ts | 59 +++++++++++++++++++++++++++++++-
2 files changed, 59 insertions(+), 4 deletions(-)

Detailed changes

styles/src/styleTree/tabBar.ts 🔗

@@ -36,7 +36,7 @@ export default function tabBar(colorScheme: ColorScheme) {
   const activePaneActiveTab = {
     ...tab,
     background: background(elevation.top),
-    text: text(elevation.top, "sans", "base", "active", { size: "sm" }),
+    text: text(elevation.top, "sans", { size: "sm" }),
     border: {
       ...tab.border,
       bottom: false
@@ -52,7 +52,7 @@ export default function tabBar(colorScheme: ColorScheme) {
   const inactivePaneActiveTab = {
     ...tab,
     background: background(layer),
-    text: text(layer, "sans", "base", "active", { size: "sm" }),
+    text: text(layer, "sans", "base", "variant", { size: "sm" }),
     border: {
       ...tab.border,
       bottom: false

styles/src/themes/common/ramps.ts 🔗

@@ -144,13 +144,69 @@ function elevation(ramps: RampSet, isLight: boolean, shadow?: Shadow): Elevation
     ramps,
 
     bottom: topLayer(ramps, isLight),
-    middle: topLayer(ramps, isLight),
+    middle: middleLayer(ramps, isLight),
     top: topLayer(ramps, isLight),
 
     shadow,
   };
 }
 
+function middleLayer(ramps: RampSet, isLight: boolean): Layer {
+  let defaultStyle: Style = {
+    background: ramps.neutral(0.2).hex(),
+    border: ramps.neutral(0.7).hex(),
+    foreground: ramps.neutral(1).hex(),
+  };
+
+  let variantStyle: Style = {
+    background: ramps.neutral(0.3).hex(),
+    border: ramps.neutral(0.6).hex(),
+    foreground: ramps.neutral(0.8).hex(),
+  };
+
+  let hoveredStyle: Style = {
+    background: ramps.neutral(0.4).hex(),
+    border: ramps.neutral(1.0).hex(),
+    foreground: ramps.neutral(0.9).hex(),
+  };
+
+  let pressedStyle: Style = {
+    background: ramps.neutral(0.55).hex(),
+    border: ramps.neutral(0.9).hex(),
+    foreground: ramps.neutral(0.9).hex(),
+  };
+
+  let activeStyle: Style = {
+    background: ramps.neutral(0.8).hex(),
+    border: ramps.neutral(0.8).hex(),
+    foreground: ramps.neutral(0.1).hex(),
+  };
+
+  let disabledStyle: Style = {
+    background: ramps.neutral(0.25).hex(),
+    border: ramps.neutral(1).hex(),
+    foreground: ramps.neutral(0.9).hex(),
+  };
+
+  let styleSet: StyleSet = {
+    default: defaultStyle,
+    variant: variantStyle,
+    hovered: hoveredStyle,
+    pressed: pressedStyle,
+    active: activeStyle,
+    disabled: disabledStyle,
+  };
+
+  return {
+    base: styleSet,
+    on: styleSet,
+    info: styleSet,
+    positive: styleSet,
+    warning: styleSet,
+    negative: styleSet
+  };
+}
+
 function topLayer(ramps: RampSet, isLight: boolean): Layer {
   let defaultStyle: Style = {
     background: ramps.neutral(0).hex(),
@@ -164,7 +220,6 @@ function topLayer(ramps: RampSet, isLight: boolean): Layer {
     foreground: ramps.neutral(0.8).hex(),
   };
 
-
   let hoveredStyle: Style = {
     background: ramps.neutral(0.4).hex(),
     border: ramps.neutral(1.0).hex(),