File tree Expand file tree Collapse file tree
components/package/pannels Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // Import Third-party Dependencies
2+ import { css } from "lit" ;
3+
4+ export const scrollbarStyle = css `
5+ ::-webkit-scrollbar {
6+ width : 8px ;
7+ height : 8px ;
8+ border-radius : 4px ;
9+ }
10+
11+ ::-webkit-scrollbar-track-piece {
12+ /* Fond */
13+ background : transparent none;
14+ border : solid 4px transparent;
15+ border-right-width : 6px ;
16+ margin : 4px ;
17+ }
18+
19+ ::-webkit-scrollbar-track-piece : horizontal {
20+ /* Fond pour la barre du bas */
21+ border-right-width : 4px ;
22+ border-bottom-width : 8px ;
23+ }
24+
25+ ::-webkit-scrollbar-thumb {
26+ /* Barre */
27+ border : solid 0 transparent;
28+ border-right-width : 4px ;
29+ border-radius : 5px ;
30+ border-top-right-radius : 9px 5px ;
31+ border-bottom-right-radius : 9px 5px ;
32+ box-shadow : inset 0 0 0 1px # 3722AF,
33+ inset 0 0 0 6px # 3f27c7 ;
34+ }
35+
36+ ::-webkit-scrollbar-thumb : horizontal {
37+ /* Barre du bas */
38+ border-right-width : 0 ;
39+ border-bottom-width : 4px ;
40+ border-top-right-radius : 5px ;
41+ border-bottom-right-radius : 5px 9px ;
42+ border-bottom-left-radius : 5px 9px ;
43+ }
44+ ` ;
Original file line number Diff line number Diff line change @@ -6,11 +6,15 @@ import { when } from "lit/directives/when.js";
66import { currentLang } from "../../../../common/utils.js" ;
77import "../../../bundlephobia/bundlephobia.js" ;
88import "../../../items-list/items-list.js" ;
9+ import { scrollbarStyle } from "../../../../common/scrollbar-style.js" ;
910
1011class Files extends LitElement {
11- static styles = css `
12+ static styles = [ scrollbarStyle , css `
1213 :host{
1314 display: block;
15+ overflow: hidden auto;
16+ height: calc(100vh - 315px);
17+ box-sizing: border-box;
1418 }
1519
1620 .head-title {
@@ -39,7 +43,7 @@ class Files extends LitElement {
3943 letter-spacing: 1px;
4044 padding: 0 10px;
4145}
42- ` ;
46+ ` ] ;
4347 static properties = {
4448 package : { type : Object }
4549 } ;
Original file line number Diff line number Diff line change @@ -7,9 +7,17 @@ import { selectLicenses } from "./view-model.js";
77import { currentLang } from "../../../../common/utils.js" ;
88import "../../../file-box/file-box.js" ;
99import "../../../icon/icon.js" ;
10+ import { scrollbarStyle } from "../../../../common/scrollbar-style.js" ;
1011
1112class Licenses extends LitElement {
12- static styles = css `
13+ static styles = [ scrollbarStyle , css `
14+ :host {
15+ display: block;
16+ overflow: hidden auto;
17+ height: calc(100vh - 315px);
18+ box-sizing: border-box;
19+ }
20+
1321 .box-container-licenses {
1422 display: flex;
1523 flex-wrap: wrap;
@@ -68,7 +76,7 @@ class Licenses extends LitElement {
6876 text-decoration: underline;
6977 font-weight: bold;
7078 }
71- ` ;
79+ ` ] ;
7280
7381 static properties = {
7482 package : { type : Object }
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import * as utils from "../../../../common/utils.js";
99import "../../../expandable/expandable.js" ;
1010import "../../../items-list/items-list.js" ;
1111import "../../../icon/icon.js" ;
12+ import { scrollbarStyle } from "../../../../common/scrollbar-style.js" ;
1213
1314// CONSTANTS
1415const kUnsafeNpmScripts = new Set ( [
@@ -20,7 +21,15 @@ const kUnsafeNpmScripts = new Set([
2021] ) ;
2122
2223class Scripts extends LitElement {
23- static styles = css `
24+ static styles = [
25+ scrollbarStyle ,
26+ css `
27+ :host {
28+ display: block;
29+ overflow: hidden auto;
30+ height: calc(100vh - 315px);
31+ box-sizing: border-box;
32+ }
2433.package-scripts {
2534 display: flex;
2635 flex-direction: column;
@@ -127,7 +136,7 @@ class Scripts extends LitElement {
127136#show-hide-dependency nsecure-icon {
128137 transform: translateY(2px);
129138}
130- ` ;
139+ ` ] ;
131140
132141 static properties = {
133142 package : { type : Object } ,
Original file line number Diff line number Diff line change @@ -6,9 +6,17 @@ import { repeat } from "lit/directives/repeat.js";
66// Import Internal Dependencies
77import { EVENTS } from "../../../../core/events.js" ;
88import "../../../icon/icon.js" ;
9+ import { scrollbarStyle } from "../../../../common/scrollbar-style.js" ;
910
1011class Vulnerabilities extends LitElement {
11- static styles = css `
12+ static styles = [ scrollbarStyle , css `
13+ :host {
14+ display: block;
15+ overflow: hidden auto;
16+ height: calc(100vh - 315px);
17+ box-sizing: border-box;
18+ }
19+
1220p {
1321 margin: 0;
1422}
218226.packages-vuln .vuln> div .severity.low {
219227 background: #2545f9;
220228}
221- ` ;
229+ ` ] ;
222230
223231 static properties = {
224232 package : { type : Object } ,
You can’t perform that action at this time.
0 commit comments