Skip to content

Commit 2beb91d

Browse files
nabramovitznorman-abramovitz
authored andcommitted
Drop Variables tab SCSS in favor of inline Tailwind
The variables-tab component had a small per-page SCSS file (18 lines) that only ever applied @apply directives to BEM class names invented to host them — the classes added no semantic value beyond being a selector for the styles. Move each rule inline as Tailwind classes on the elements it targeted, drop the BEM names that nothing else references, delete the SCSS file, and remove styleUrls from the component decorator. Per-page SCSS removed: - pt-5 on the env-code-block wrapper → class on the wrapper div - pt-5 on .card-content → class on card-body - m-0 whitespace-pre-wrap on inner <pre> → class on each <pre> - pt-[15px] on non-first sections → [&:not(:first-of-type)]:pt-[15px] arbitrary variant on the section wrappers Global SCSS classes the page still uses (card, card-header, card-body, btn-icon, btn-success) are out of scope for this commit — they're shared with many other pages and need a coordinated sweep.
1 parent b543788 commit 2beb91d

3 files changed

Lines changed: 8 additions & 28 deletions

File tree

src/frontend/packages/cloud-foundry/src/features/applications/application/application-tabs-base/tabs/variables-tab/variables-tab.component.html

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<div class="variables-tab">
2-
<div class="variables-tab__env-table">
1+
<div>
2+
<div>
33
<app-list-sub-nav title="Total Variables" [count]="totalVariables"
44
[addAction]="addVariableAction" [isAdding]="isAdding">
55
<!-- Inline add form rendered on the L5 row when isAdding is true.
@@ -38,24 +38,23 @@
3838
<app-list [addForm]="addForm" [suppressAddButton]="true"></app-list>
3939
</div>
4040

41-
<div class="variables-tab__env-code-block">
41+
<div class="pt-5">
4242
<div class="card">
4343
<div class="card-header">
4444
<div>All Variables</div>
4545
</div>
46-
<div class="card-body">
46+
<div class="card-body pt-5">
4747
<app-code-block>
4848
@for (envVar of (allEnvVars$ | async); track $index) {
49-
<div class="variables-tab__env-code-block--line"
50-
[ngClass]="{'variables-tab__env-code-block--section': envVar.section}">
49+
<div [class]="envVar.section ? '[&:not(:first-of-type)]:pt-[15px]' : ''">
5150
@if (envVar.section) {
52-
<pre>{{envVar.name}}</pre>
51+
<pre class="m-0 whitespace-pre-wrap">{{envVar.name}}</pre>
5352
} @else {
54-
<pre>{{envVar.name}}=@if (!isObject(envVar.value)) {
53+
<pre class="m-0 whitespace-pre-wrap">{{envVar.name}}=@if (!isObject(envVar.value)) {
5554
<span>{{envVar.value}}</span>
5655
}</pre>
5756
@if (isObject(envVar.value)) {
58-
<pre>{{ envVar.value | json }}</pre>
57+
<pre class="m-0 whitespace-pre-wrap">{{ envVar.value | json }}</pre>
5958
}
6059
}
6160
</div>

src/frontend/packages/cloud-foundry/src/features/applications/application/application-tabs-base/tabs/variables-tab/variables-tab.component.scss

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/frontend/packages/cloud-foundry/src/features/applications/application/application-tabs-base/tabs/variables-tab/variables-tab.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export interface VariableTabAllEnvVarType {
3737
@Component({
3838
selector: 'app-variables-tab',
3939
templateUrl: './variables-tab.component.html',
40-
styleUrls: ['./variables-tab.component.scss'],
4140
standalone: true,
4241
changeDetection: ChangeDetectionStrategy.OnPush,
4342
providers: [{

0 commit comments

Comments
 (0)