Style elevations & update styleTrees

Also rename `info` -> `accent`

Co-Authored-By: Kay Simmons <3323631+Kethku@users.noreply.github.com>
This commit is contained in:
Nate Butler
2022-10-11 17:38:28 -04:00
co-authored by Kay Simmons
parent 95bc18a995
commit 5708879b5a
11 changed files with 84 additions and 79 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ export default function commandPalette(colorScheme: ColorScheme) {
key: {
text: text(layer, "mono", "on", "default", { size: "xs" }),
cornerRadius: 2,
background: withOpacity(background(layer, "on"), 0.5),
background: background(layer, "on"),
padding: {
top: 1,
bottom: 1,
@@ -22,7 +22,7 @@ export default function commandPalette(colorScheme: ColorScheme) {
left: 2,
},
active: {
text: text(layer, "mono", "on", "active", { size: "xs" }),
text: text(layer, "mono", "on", "inverted", { size: "xs" }),
background: withOpacity(background(layer, "on"), 0.2),
},
},
+2 -2
View File
@@ -6,14 +6,14 @@ function isStyleSet(key: any): key is StyleSets {
"base",
"variant",
"on",
"info",
"accent",
"positive",
"warning",
"negative",
].includes(key);
}
function isStyle(key: any): key is Styles {
return ["default", "active", "disabled", "hovered", "pressed"].includes(key);
return ["default", "active", "disabled", "hovered", "pressed", "inverted"].includes(key);
}
function getStyle(
layer: Layer,
+4 -4
View File
@@ -36,8 +36,8 @@ export default function editor(colorScheme: ColorScheme) {
}),
},
message: {
text: text(layer, "sans", styleSet, { size: "sm" }),
highlightText: text(layer, "sans", styleSet, {
text: text(layer, "sans", styleSet, "inverted", { size: "sm" }),
highlightText: text(layer, "sans", styleSet, "inverted", {
size: "sm",
weight: "bold",
}),
@@ -153,7 +153,7 @@ export default function editor(colorScheme: ColorScheme) {
.neutral(0.5)
.alpha(0.4)
.hex(), // TODO: This was blend * 2
errorColor: foreground(layer, "negative"),
errorColor: background(layer, "negative"),
gutterBackground: background(layer),
gutterPaddingFactor: 3.5,
lineNumber: foreground(layer, "disabled"),
@@ -225,7 +225,7 @@ export default function editor(colorScheme: ColorScheme) {
},
errorDiagnostic: diagnostic(elevation.middle, "negative"),
warningDiagnostic: diagnostic(elevation.middle, "warning"),
informationDiagnostic: diagnostic(elevation.middle, "info"),
informationDiagnostic: diagnostic(elevation.middle, "accent"),
hintDiagnostic: diagnostic(elevation.middle, "warning"),
invalidErrorDiagnostic: diagnostic(elevation.middle, "base"),
invalidHintDiagnostic: diagnostic(elevation.middle, "base"),
+2 -2
View File
@@ -23,8 +23,8 @@ export default function HoverPopover(elevation: Elevation) {
container: baseContainer,
infoContainer: {
...baseContainer,
background: background(layer, "info"),
border: border(layer, "info"),
background: background(layer, "accent"),
border: border(layer, "accent"),
},
warningContainer: {
...baseContainer,
+4 -4
View File
@@ -26,11 +26,11 @@ export default function picker(colorScheme: ColorScheme) {
},
cornerRadius: 8,
text: text(layer, "sans", "variant"),
highlightText: text(layer, "sans", "info", { weight: "bold" }),
highlightText: text(layer, "sans", "accent", { weight: "bold" }),
active: {
background: background(layer, "active"),
text: text(layer, "sans", "active"),
highlightText: text(layer, "sans", "info", "active", {
background: background(layer, "base", "inverted"),
text: text(layer, "sans", "base", "inverted"),
highlightText: text(layer, "sans", "accent", "inverted", {
weight: "bold",
}),
},
+1 -1
View File
@@ -111,7 +111,7 @@ export default function statusBar(colorScheme: ColorScheme) {
padding: 2,
margin: { bottom: -1, right: -1 },
border: border(layer),
background: background(layer, "info"),
background: background(layer, "accent"),
},
},
};
+1 -1
View File
@@ -31,7 +31,7 @@ export default function tabBar(colorScheme: ColorScheme) {
// Indicators
iconConflict: foreground(layer, "warning"),
iconDirty: foreground(layer, "info"),
iconDirty: foreground(layer, "accent"),
// When two tabs of the same name are open, a label appears next to them
description: {