Skip to content

Commit

Permalink
refactor: remove unnecessary css (#560)
Browse files Browse the repository at this point in the history
* chore: removed unnecessary file and toggle code ignore

* fix: lint

* refactor: remove unneeded css and push to ls

* chore: lint
  • Loading branch information
DariusZdroba authored Dec 6, 2024
1 parent 6bff18c commit 51e786c
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 288 deletions.
25 changes: 0 additions & 25 deletions media/views/common/learn.scss

This file was deleted.

2 changes: 0 additions & 2 deletions media/views/common/variables.scss

This file was deleted.

104 changes: 0 additions & 104 deletions media/views/common/vscode.scss

This file was deleted.

31 changes: 0 additions & 31 deletions media/views/common/webview.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,13 @@ html {
}

body {
padding: 0;
line-height: 1.5;
}

body * {
box-sizing: border-box;
}

h2, h3 {
margin-block-start: 0;
margin-block-end: 0.4rem;
text-transform: uppercase;
}

a {
cursor: pointer;
text-decoration: none;
}

a:hover {
text-decoration: underline;
}

table {
width: 100%;
border-collapse: collapse;
}

table td {
background: var(--vscode-editor-background);
border: 1px solid var(--vscode-button-border);
padding: 3px;
}

.font-light {
opacity: 0.75;
}
Expand Down Expand Up @@ -66,10 +39,6 @@ table td {
border-top: 1px solid rgba(255, 255, 255, 0.075);
}

section {
padding: 20px;
}

.hidden {
display: none !important;
}
19 changes: 0 additions & 19 deletions media/views/featureSelection/featureSelection.scss

This file was deleted.

18 changes: 0 additions & 18 deletions media/views/oss/suggestion/suggestion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
.vscode-light .dark-only {
display: none;
}

body {
font-size: var(--vscode-editor-font-size);
}
Expand All @@ -20,23 +19,6 @@ h2 {
font-size: 1.2rem;
}

.delimiter {
border-right: 1px solid var(--vscode-input-border);
}

.vulnerability-overview pre {
font-size: var(--vscode-editor-font-size);
font-family: var(--vscode-editor-font-family);
background-color: var(--vscode-editor-background);
border: 1px solid var(--vscode-input-border);
}

.vulnerability-overview code {
color: var(--vscode-foreground);
font-size: var(--vscode-editor-font-size);
font-family: var(--vscode-editor-font-family);
}

/* High-contrast dark mode */
.vscode-high-contrast:not(.vscode-high-contrast-light) .vulnerability-overview code {
color: var(--vscode-editor-background);
Expand Down
88 changes: 0 additions & 88 deletions media/views/snykCode/suggestion/suggestionLS.scss
Original file line number Diff line number Diff line change
@@ -1,76 +1,10 @@
@import '../../common/vscode';
@import '../../common/webview';

body {
position: relative;
display: inline-flex;
flex-direction: column;
width: 100%;
height: 100%;
margin: 0;
}

.severity-title {
font-weight: 500;
line-height: 2.4rem;
text-transform: capitalize;
}

.data-flow-clickable-row {
color: var(--vscode-textLink-foreground);
}

.tab-item {
color: var(--vscode-panelTitle-inactiveForeground);
border-bottom: 1px solid transparent;
}

.tab-item-icon path {
fill: var(--vscode-foreground);
}

.tab-item.is-selected {
color: var(--vscode-foreground);
border-bottom: 3px solid var(--vscode-focusBorder);
}

.ignore-details-header,
.data-flow-header,
.ai-fix-header,
.example-fixes-header {
text-transform: uppercase;
}

.data-flow-number,
.data-flow-clickable-row,
.data-flow-delimiter,
.data-flow-text {
background-color: transparent;
border-color: transparent;
padding-top: 0px;
padding-bottom: 0px;
}

.data-flow-text {
font-family: "Courier New", Courier, monospace;
}

.ignore-details-tab,
.fix-analysis-tab,
.vuln-overview-tab {
text-transform: uppercase;
}

.example {
border: 1px solid var(--vscode-input-border);
background-color: var(--vscode-editor-background);
}

.example-line-number,
.example-line > code {
color: var(--vscode-editor-foreground);
}

.example-line > code {
font-family: "Courier New", Courier, monospace;
}
Expand Down Expand Up @@ -114,28 +48,6 @@ body {
color: #fff;
}

.ignore-action-container {
background-color: var(--vscode-editor-background);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.075));
box-shadow: 0 -1px 3px rgba(0, 0, 0, .05);
border-top: 1px solid var(--vscode-input-border);
}

.ignore-button.secondary {
border: 1px solid var(--vscode-textLink-foreground);
color: var(--vscode-textLink-foreground);
}

.ignore-button.secondary:hover,
.ignore-button.secondary:active {
background: var(--vscode-button-hoverBackground);
border-color: var(--vscode-button-hoverBackground);
color: var(--vscode-button-foreground);
}

.sn-fix-wrapper {
background-color: var(--vscode-editor-background);
}

.vscode-dark .light-only,
.vscode-high-contrast:not(.vscode-high-contrast-light) .light-only {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class CodeSuggestionWebviewProvider
html = html.replace('${ideScript}', '<script nonce=${nonce}>' + ideScript + '</script>');
const nonce = getNonce();
html = html.replaceAll('${nonce}', nonce);

html = html.replace('--default-font: ', '--default-font: var(--vscode-font-family) ,');
this.panel.webview.html = html;
void this.postSuggestMessage({ type: 'set', args: this.mapToModel(issue) });
void this.postLearnLessonMessage(issue);
Expand Down

0 comments on commit 51e786c

Please sign in to comment.