Skip to content

Commit 83f7f85

Browse files
fix: border in button group
1 parent c390c72 commit 83f7f85

File tree

4 files changed

+108
-24
lines changed

4 files changed

+108
-24
lines changed

GitHub Dark.sublime-theme

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@
5050
"inputBorder": "#21262d",
5151
"inputForeground": "#c9d1d9",
5252
"buttonForeground": "#c9d1d9",
53-
"buttonBackground": "color(#c9d1d9 alpha(0.05))",
53+
"buttonBackground": "color(#c9d1d9 alpha(0.02))",
5454
"buttonBorder": "#21262d",
5555
"buttonHoverBackground": "color(#c9d1d9 alpha(0.1))",
5656
"buttonPressedBackground": "color(#c9d1d9 alpha(0.2))",
57-
"buttonSelecteddBackground": "color(#c9d1d9 alpha(0.1))",
57+
"buttonSelecteddBackground": "color(#c9d1d9 alpha(0.08))",
5858
"buttonIconForeground": "var(foreground)",
5959
"buttonIconSelecteddForeground": "var(accent)",
6060
"statusBarForeground": "#8b949e",
@@ -1122,7 +1122,7 @@
11221122
"layer1.inner_margin": [
11231123
0,
11241124
1,
1125-
1,
1125+
0,
11261126
1
11271127
],
11281128
"layer1.tint": "var(buttonBorder)",
@@ -1137,8 +1137,32 @@
11371137
"attributes": [
11381138
"left"
11391139
],
1140-
"layer1.inner_margin": 1,
1141-
"layer1.tint": "var(buttonBorder)"
1140+
"layer1.inner_margin": [
1141+
1,
1142+
1,
1143+
0,
1144+
1
1145+
]
1146+
},
1147+
{
1148+
"class": "icon_button_control",
1149+
"attributes": [
1150+
"right"
1151+
],
1152+
"layer1.inner_margin": [
1153+
0,
1154+
1,
1155+
1,
1156+
1
1157+
]
1158+
},
1159+
{
1160+
"class": "icon_button_control",
1161+
"attributes": [
1162+
"left",
1163+
"right"
1164+
],
1165+
"layer1.inner_margin": 1
11421166
},
11431167
{
11441168
"class": "icon_button_control",
@@ -1844,7 +1868,8 @@
18441868
"settings": [
18451869
"show_sidebar_button"
18461870
],
1847-
"layer0.tint": "var(statusBarForeground)"
1871+
"layer0.tint": "var(statusBarForeground)",
1872+
"layer0.opacity": 1
18481873
},
18491874
{
18501875
"class": "sidebar_button_control",

GitHub Dimmed.sublime-theme

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@
5050
"inputBorder": "#373e47",
5151
"inputForeground": "#adbac7",
5252
"buttonForeground": "#adbac7",
53-
"buttonBackground": "color(#adbac7 alpha(0.05))",
53+
"buttonBackground": "color(#adbac7 alpha(0.02))",
5454
"buttonBorder": "#373e47",
5555
"buttonHoverBackground": "color(#adbac7 alpha(0.1))",
5656
"buttonPressedBackground": "color(#adbac7 alpha(0.2))",
57-
"buttonSelecteddBackground": "color(#adbac7 alpha(0.1))",
57+
"buttonSelecteddBackground": "color(#adbac7 alpha(0.08))",
5858
"buttonIconForeground": "var(foreground)",
5959
"buttonIconSelecteddForeground": "var(accent)",
6060
"statusBarForeground": "#768390",
@@ -1122,7 +1122,7 @@
11221122
"layer1.inner_margin": [
11231123
0,
11241124
1,
1125-
1,
1125+
0,
11261126
1
11271127
],
11281128
"layer1.tint": "var(buttonBorder)",
@@ -1137,8 +1137,32 @@
11371137
"attributes": [
11381138
"left"
11391139
],
1140-
"layer1.inner_margin": 1,
1141-
"layer1.tint": "var(buttonBorder)"
1140+
"layer1.inner_margin": [
1141+
1,
1142+
1,
1143+
0,
1144+
1
1145+
]
1146+
},
1147+
{
1148+
"class": "icon_button_control",
1149+
"attributes": [
1150+
"right"
1151+
],
1152+
"layer1.inner_margin": [
1153+
0,
1154+
1,
1155+
1,
1156+
1
1157+
]
1158+
},
1159+
{
1160+
"class": "icon_button_control",
1161+
"attributes": [
1162+
"left",
1163+
"right"
1164+
],
1165+
"layer1.inner_margin": 1
11421166
},
11431167
{
11441168
"class": "icon_button_control",
@@ -1844,7 +1868,8 @@
18441868
"settings": [
18451869
"show_sidebar_button"
18461870
],
1847-
"layer0.tint": "var(statusBarForeground)"
1871+
"layer0.tint": "var(statusBarForeground)",
1872+
"layer0.opacity": 1
18481873
},
18491874
{
18501875
"class": "sidebar_button_control",

GitHub Light.sublime-theme

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@
5050
"inputBorder": "#e1e4e8",
5151
"inputForeground": "#24292e",
5252
"buttonForeground": "#24292e",
53-
"buttonBackground": "color(#24292e alpha(0.05))",
53+
"buttonBackground": "color(#24292e alpha(0.02))",
5454
"buttonBorder": "#e1e4e8",
5555
"buttonHoverBackground": "color(#24292e alpha(0.1))",
5656
"buttonPressedBackground": "color(#24292e alpha(0.2))",
57-
"buttonSelecteddBackground": "color(#24292e alpha(0.1))",
57+
"buttonSelecteddBackground": "color(#24292e alpha(0.08))",
5858
"buttonIconForeground": "var(foreground)",
5959
"buttonIconSelecteddForeground": "var(accent)",
6060
"statusBarForeground": "#586069",
@@ -1122,7 +1122,7 @@
11221122
"layer1.inner_margin": [
11231123
0,
11241124
1,
1125-
1,
1125+
0,
11261126
1
11271127
],
11281128
"layer1.tint": "var(buttonBorder)",
@@ -1137,8 +1137,32 @@
11371137
"attributes": [
11381138
"left"
11391139
],
1140-
"layer1.inner_margin": 1,
1141-
"layer1.tint": "var(buttonBorder)"
1140+
"layer1.inner_margin": [
1141+
1,
1142+
1,
1143+
0,
1144+
1
1145+
]
1146+
},
1147+
{
1148+
"class": "icon_button_control",
1149+
"attributes": [
1150+
"right"
1151+
],
1152+
"layer1.inner_margin": [
1153+
0,
1154+
1,
1155+
1,
1156+
1
1157+
]
1158+
},
1159+
{
1160+
"class": "icon_button_control",
1161+
"attributes": [
1162+
"left",
1163+
"right"
1164+
],
1165+
"layer1.inner_margin": 1
11421166
},
11431167
{
11441168
"class": "icon_button_control",
@@ -1844,7 +1868,8 @@
18441868
"settings": [
18451869
"show_sidebar_button"
18461870
],
1847-
"layer0.tint": "var(statusBarForeground)"
1871+
"layer0.tint": "var(statusBarForeground)",
1872+
"layer0.opacity": 1
18481873
},
18491874
{
18501875
"class": "sidebar_button_control",

src/theme.ts

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ export function variables(theme: Primer): ThemeVariables {
9696
inputForeground: color.text.primary,
9797

9898
buttonForeground: color.text.primary,
99-
buttonBackground: `color(${color.text.primary} alpha(0.05))`,
99+
buttonBackground: `color(${color.text.primary} alpha(0.02))`,
100100
buttonBorder: color.input.border,
101101
buttonHoverBackground: `color(${color.text.primary} alpha(0.1))`,
102102
buttonPressedBackground: `color(${color.text.primary} alpha(0.2))`,
103-
buttonSelecteddBackground: `color(${color.text.primary} alpha(0.1))`,
103+
buttonSelecteddBackground: `color(${color.text.primary} alpha(0.08))`,
104104

105105
buttonIconForeground: 'var(foreground)',
106106
buttonIconSelecteddForeground: 'var(accent)',
@@ -906,16 +906,25 @@ export const rules = [
906906
'layer0.inner_margin': [5, 6],
907907
'layer0.opacity': 1.0,
908908
'layer1.draw_center': false,
909-
'layer1.inner_margin': [0, 1, 1 ,1],
909+
'layer1.inner_margin': [0, 1, 0, 1],
910910
'layer1.tint': 'var(buttonBorder)',
911911
'layer1.opacity': 1.0,
912912
content_margin: [12, 8],
913913
},
914914
{
915915
class: 'icon_button_control',
916-
"attributes": ["left"],
916+
attributes: ['left'],
917+
'layer1.inner_margin': [1, 1, 0, 1],
918+
},
919+
{
920+
class: 'icon_button_control',
921+
attributes: ['right'],
922+
'layer1.inner_margin': [0, 1, 1, 1],
923+
},
924+
{
925+
class: 'icon_button_control',
926+
attributes: ['left', 'right'],
917927
'layer1.inner_margin': 1,
918-
'layer1.tint': 'var(buttonBorder)',
919928
},
920929
{
921930
class: 'icon_button_control',
@@ -1287,6 +1296,7 @@ export const rules = [
12871296
class: 'sidebar_button_control',
12881297
settings: ['show_sidebar_button'],
12891298
'layer0.tint': 'var(statusBarForeground)',
1299+
'layer0.opacity': 1.0,
12901300
},
12911301
{
12921302
class: 'sidebar_button_control',
@@ -1295,7 +1305,6 @@ export const rules = [
12951305
'layer0.tint': 'var(statusBarForeground)',
12961306
'layer0.opacity': 0.0,
12971307
},
1298-
12991308
{
13001309
class: 'sidebar_button_control',
13011310
settings: ['show_sidebar_button'],

0 commit comments

Comments
 (0)