Skip to content

Commit 4fdb817

Browse files
committed
make sure tag sizes are "normal"; revert tag colors for CVSS severity to pre-v1 Bulma
1 parent f598254 commit 4fdb817

6 files changed

Lines changed: 54 additions & 15 deletions

File tree

src/components/AdpVulnerabilityEnrichment.vue

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</div>
4242
<div v-if="roleName === 'adp'">
4343
<div id="cve-ssvcs" v-if="ssvcs.length > 0 && roleName === 'adp'" class="mt-5">
44-
<h4 class="title mb-0">SSVC <span class="tag">{{ ssvcs.length }} Total</span></h4>
44+
<h4 class="title mb-0">SSVC <span class="tag is-normal">{{ ssvcs.length }} Total</span></h4>
4545
<div class="cve-learn-more mb-5">
4646
<router-link to="/CVERecord/UserGuide/#cve-ssvc" class="cve-learn-more-link">Learn more</router-link>
4747
</div>
@@ -75,7 +75,7 @@
7575
</div>
7676
</div>
7777
<div id="cve-kevs" v-if="kevs.length > 0 && roleName === 'adp'" class="mt-5">
78-
<h4 class="title mb-0">KEV <span class="tag">{{ kevs.length }} Total</span></h4>
78+
<h4 class="title mb-0">KEV <span class="tag is-normal">{{ kevs.length }} Total</span></h4>
7979
<div class="cve-learn-more ">
8080
<router-link to="/CVERecord/UserGuide/#cve-kev" class="cve-learn-more-link">Learn more</router-link>
8181
</div>
@@ -121,7 +121,10 @@
121121
<div class="level-item">
122122
<span class="has-text-weight-semibold mr-1">Tags: </span>
123123
<span id="cve-tags">
124-
<span class="tag is-info is-light cve-tag" v-for="tag in cveFieldList.tags" :key="tag">{{tag}}</span>
124+
<span class="tag is-normal is-info is-light cve-tag"
125+
v-for="tag in cveFieldList.tags" :key="tag">
126+
{{tag}}
127+
</span>
125128
</span>
126129
</div>
127130
</div>
@@ -135,7 +138,8 @@
135138
</div>
136139
<div v-if="roleName !== 'cveProgram'">
137140
<div id="cve-cwes" v-if="cwes.length > 0" class="mt-5">
138-
<h4 class="title mb-0">CWE <span class="tag">{{ cwes.length }} Total</span></h4>
141+
<h4 class="title mb-0">CWE <span class="tag is-normal">{{ cwes.length }} Total</span>
142+
</h4>
139143
<div class="cve-learn-more mb-3">
140144
<router-link to="/CVERecord/UserGuide/#cve-cwe" class="cve-learn-more-link">Learn more</router-link>
141145
</div>
@@ -154,7 +158,7 @@
154158
</div>
155159
</div>
156160
<div id="cve-cvsss" v-if="cvsss.length > 0" class="mt-5">
157-
<h4 class="title mb-0">CVSS <span class="tag">{{ cvsss.length }} Total</span></h4>
161+
<h4 class="title mb-0">CVSS <span class="tag is-normal">{{ cvsss.length }} Total</span></h4>
158162

159163
<div class="cve-learn-more mb-3">
160164
<router-link to="/CVERecord/UserGuide/#cve-cvss" class="cve-learn-more-link">Learn more</router-link>
@@ -173,7 +177,10 @@
173177
<tr v-for="cvss in cvsss" :key="cvss.key">
174178
<td data-label="Score" style="width: 20%">{{ cvss.baseScore }}</td>
175179
<td data-label="Severity" style="width: 20%">
176-
<span :class="cvss.baseSeverityColorClass" class="tag has-text-weight-bold cve-state-tag">{{ cvss.baseSeverity }}</span>
180+
<span :class="cvss.baseSeverityColorClass"
181+
class="tag is-normal has-text-weight-bold cve-state-tag">
182+
{{ cvss.baseSeverity }}
183+
</span>
177184
</td>
178185
<td data-label="Version" style="width: 20%">{{ cvss.version }}</td>
179186
<td data-label="Vector String">{{ cvss.vectorString }}</td>
@@ -192,7 +199,10 @@
192199
<ul>
193200
<li v-for="(credit, index) in cveFieldList.credits" :key="`${credit}-${index}`">
194201
{{credit.value}}
195-
<span class="tag ml-2" v-if="typeof credit.type !== 'undefined' && credit.type.length > 0">{{credit.type}}</span>
202+
<span class="tag ml-2 is-normal"
203+
v-if="typeof credit.type !== 'undefined' && credit.type.length > 0">
204+
{{credit.type}}
205+
</span>
196206
</li>
197207
</ul>
198208
</div>
@@ -204,8 +214,8 @@
204214
</div>
205215

206216
<CveRecordReferences id="cve-program-references"
207-
v-if="cveProgramReferences.length > 0" :references="cveProgramReferences"
208-
>
217+
v-if="cveProgramReferences.length > 0"
218+
:references="cveProgramReferences">
209219
</CveRecordReferences>
210220
</div>
211221
</div>
@@ -465,4 +475,29 @@ export default {
465475
overflow-y: scroll;
466476
}
467477
478+
// Override Bulma's default colors for the danger, info, and warning tags.
479+
// The colors defined below for the tag backgrounds are the original
480+
// pre-v1 Bulma colors (danger: #f14668, info: #3e8ed0, warning: #ffe08a).
481+
// We're keeping the same look for these tags as the originals.
482+
483+
.tag.is-danger {
484+
--bulma-danger-h: 348deg;
485+
--bulma-danger-s: 86%;
486+
--bulma-danger-l: 61%;
487+
color: white;
488+
}
489+
490+
.tag.is-info {
491+
--bulma-info-h: 207deg;
492+
--bulma-info-s: 61%;
493+
--bulma-info-l: 53%;
494+
color: white;
495+
}
496+
497+
.tag.is-warning {
498+
--bulma-warning-h: 44deg;
499+
--bulma-warning-s: 100%;
500+
--bulma-warning-l: 77%;
501+
}
502+
468503
</style>

src/components/CveRecordReferences.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
class="mt-5"
44
style="word-break:break-all;"
55
>
6-
<h4 class="title mb-3">References <span class="tag">{{ references.length }} Total</span></h4>
6+
<h4 class="title mb-3">References <span class="tag is-normal">{{ references.length }} Total</span></h4>
77
<div class="cve-scroll-box">
88
<ul class="mt-0">
99
<li v-for="(reference, index) in references" :key="`link-${index}`" class="cve-word-wrap">
@@ -17,7 +17,9 @@
1717
</a>
1818
</span>
1919
<span v-for="tag in reference.tags" :key="tag">
20-
<span class="tag ml-2" v-if="tag.length > 0">{{tag}}</span>
20+
<span class="tag ml-2 is-normal" v-if="tag.length > 0">
21+
{{tag}}
22+
</span>
2123
</span>
2224
</li>
2325
</ul>

src/components/ProductStatus.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</nav>
3232
<div id="cve-affected-unaffected-unknown-versions">
3333
<p class="cve-product-status-heading pb-1" >
34-
Versions <span class="tag">{{ versionsCount(product) }} Total</span>
34+
Versions <span class="tag is-normal">{{ versionsCount(product) }} Total</span>
3535
</p>
3636
<div class="cve-scroll-box pt-1">
3737
<div class="column is-12-desktop mb-4">

src/views/CVERecord/PublishedRecord.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
<h1 class="title">{{cveRecordStore.cveId}}</h1>
1111
</div>
1212
<div v-if="cveFieldList.state.length > 0" class="level-item">
13-
<span class="tag is-info is-light has-text-weight-bold cve-state-tag">{{cveFieldList.state}}</span>
13+
<span class="tag is-info is-light is-normal has-text-weight-bold
14+
cve-state-tag">{{cveFieldList.state}}
15+
</span>
1416
</div>
1517
</div>
1618
<div class="level-right ml-1">

src/views/CVERecord/RejectedRecordOrId.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<h1 class="title">{{usecveRecordStore.cveId}}</h1>
1010
</div>
1111
<div v-if="cveFieldList.state.length > 0" class="level-item">
12-
<span class="tag cve-state-tag has-text-weight-bold">{{cveFieldList.state}}</span>
12+
<span class="tag is-normal cve-state-tag has-text-weight-bold">{{cveFieldList.state}}</span>
1313
</div>
1414
</div>
1515
<div class="level-right ml-1">

src/views/CVERecord/ReservedId.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<h1 class="title">{{usecveRecordStore.cveId}}</h1>
1010
</div>
1111
<div class="level-item" v-if="hasState">
12-
<span class="tag cve-state-tag has-text-weight-bold">{{usecveRecordStore.idData.state}}</span>
12+
<span class="tag is-normal cve-state-tag has-text-weight-bold">{{usecveRecordStore.idData.state}}</span>
1313
</div>
1414
</div>
1515
<div class="level-right">

0 commit comments

Comments
 (0)