Skip to content

Commit 319cddf

Browse files
authored
fix(css) webview style regression in cloud9 #2711
Problem: After 0f86958 #2691, buttons in cloud9 webviews are gray. And the headers are not sticky. Solution: Copy some of the base.css stuff to base-cloud9.css. Remove some of the forced background-color items.
1 parent acbd172 commit 319cddf

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

media/css/base-cloud9.css

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ input[type='number'] {
6464
border: 1px solid var(--vscode-settings-textInputBorder);
6565
padding: 4px 4px;
6666
}
67-
body.vscode-dark input {
67+
68+
/* "Cloud9 gray" in input boxes (not buttons/radios). */
69+
body.vscode-dark input:not([type='submit']):not([type='radio']) {
6870
background: rgba(var(--shade), 0.1);
6971
}
7072

@@ -122,16 +124,18 @@ button,
122124
padding: 8px;
123125
}
124126
button,
125-
.button-theme-primary:hover {
127+
.button-theme-primary:hover:not(:disabled) {
126128
background: var(--vscode-button-hoverBackground);
129+
cursor: pointer;
127130
}
128131
.button-theme-secondary {
129132
color: var(--vscode-button-secondaryForeground);
130133
background: var(--vscode-button-secondaryBackground);
131134
border: 1px solid var(--vscode-button-border);
132135
}
133-
.button-theme-secondary:hover {
136+
.button-theme-secondary:hover:not(:disabled) {
134137
background: var(--vscode-button-secondaryHoverBackground);
138+
cursor: pointer;
135139
}
136140
.button-theme-soft {
137141
color: var(--vscode-settings-textInputForeground);
@@ -162,14 +166,31 @@ body.vscode-dark textarea {
162166
display: contents;
163167
}
164168

169+
.button-container {
170+
display: flex;
171+
align-items: flex-start;
172+
flex-direction: row;
173+
/* margin: 16px 0 0 0; */
174+
padding: 10px;
175+
position: sticky;
176+
top: 10px;
177+
justify-content: flex-end;
178+
border-bottom: 1px solid var(--vscode-menu-separatorBackground);
179+
/**
180+
* HACK: Using background-color alpha as a workaround because "opacity" affects children.
181+
* TODO: Is there a way to use alpha with var(--vscode-menu-background) ?
182+
*/
183+
/* background-color: rgba(0, 0, 0, 0.1); */
184+
}
185+
186+
.button-container h1 {
187+
margin: 0px;
188+
}
189+
165190
/* Overrides */
166191
body.vscode-dark .settings-panel {
167192
background: rgba(var(--tint), 0.02) !important;
168193
}
169194
body.vscode-light .settings-panel {
170195
background: rgba(var(--shade), 0.02) !important;
171196
}
172-
.button-container {
173-
border: none !important;
174-
background: none !important;
175-
}

0 commit comments

Comments
 (0)