-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: load custom VSCode styling for HTML suggestion panel [IDE-240] (#…
…463) * refactor: update CSP and nonce handling in `CodeSuggestionWebviewProvider` - Added logic to dynamically set the nonce for `<script>` and `<style>` tags. - Updated the `iconPath` for the panel to use the correct Snyk Code icon. - Added handling to replace `${headerEnd}` with the appropriate stylesheet link. * feat: inject custom styling * refactor: move nonce computation to ide * feat: add ignore footer styling * fix: move uppercase text transform just to vscode --------- Co-authored-by: Teodora Sandu <teodora.sandu@snyk.io>
- Loading branch information
1 parent
8c6889e
commit ffd88f3
Showing
3 changed files
with
132 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
.ignore-warning { | ||
background: #FFF4ED; | ||
color: #B6540B; | ||
border: 1px solid #E27122; | ||
} | ||
|
||
.ignore-badge { | ||
background: #FFF4ED; | ||
color: #B6540B; | ||
border: 1px solid #E27122; | ||
} | ||
|
||
.tabs-nav {} | ||
|
||
.tab-item { | ||
color: var(--vscode-foreground); | ||
border-bottom: 1px solid transparent; | ||
} | ||
|
||
.tab-item-icon path { | ||
fill: var(--tab-item-github-icon-color); | ||
} | ||
|
||
.tab-item:hover {} | ||
|
||
.tab-item.is-selected { | ||
border-bottom: 3px solid var(--vscode-focusBorder); | ||
} | ||
|
||
.tab-content { | ||
background-color: var(--vscode-editor-background); | ||
} | ||
|
||
.ignore-details-header, | ||
.data-flow-header, | ||
.example-fixes-header { | ||
text-transform: uppercase; | ||
} | ||
|
||
.ignore-details-tab, | ||
.fix-analysis-tab, | ||
.vuln-overview-tab { | ||
text-transform: uppercase; | ||
} | ||
|
||
.example-line-number, | ||
.example-line>code { | ||
color: var(--vscode-editor-foreground); | ||
} | ||
|
||
.example-line.added { | ||
background-color: rgb(204, 255, 216); | ||
} | ||
|
||
.example-line.removed { | ||
background-color: rgb(255, 215, 213); | ||
} | ||
|
||
.vscode-dark .example-line.removed { | ||
background-color: rgba(84, 36, 38, 1); | ||
color: #fff; | ||
} | ||
|
||
.vscode-dark .example-line.added { | ||
background-color: rgba(28, 68, 40, 1); | ||
color: #fff; | ||
} | ||
|
||
.vscode-dark .example-line.added>code { | ||
color: #fff; | ||
background-color: transparent; | ||
} | ||
|
||
.vscode-dark .example-line.removed>code { | ||
color: #fff; | ||
background-color: transparent; | ||
} | ||
|
||
.vscode-high-contrast:not(.vscode-high-contrast-light) .example-line.removed { | ||
background-color: #542426; | ||
color: #fff; | ||
} | ||
|
||
.vscode-dark .added, | ||
.vscode-high-contrast:not(.vscode-high-contrast-light) .example-line.added { | ||
background-color: #1C4428; | ||
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); | ||
} | ||
|
||
.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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters