Skip to content

Commit 2025887

Browse files
committed
fix: add comments
1 parent b05fc9e commit 2025887

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

src/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.scss

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
// Mixins for pseudo-element patterns
22

3+
/**
4+
* Base mixin for creating positioned pseudo-elements with consistent sizing
5+
* Used as foundation for all tab filler pseudo-elements
6+
* @param {string} $side - Which side to position the element (left|right)
7+
* @param {length} $height - Height of the pseudo-element
8+
*/
9+
310
@mixin pseudo-base($side: left, $height: var(--tab-filler-size)) {
411
position: absolute;
512
top: 100%;
@@ -12,30 +19,61 @@
1219
background-color: var(--g-color-base-background);
1320
}
1421

22+
/**
23+
* Creates a vertical filler for active tab states
24+
* Used to extend the active tab's background below the container
25+
* @param {string} $side - Which side to position the filler (left|right)
26+
*/
27+
1528
@mixin pseudo-active-filler($side: left) {
1629
@include pseudo-base($side, var(--g-spacing-3));
1730
border-#{$side}: var(--tab-border-width) solid var(--g-color-line-generic);
1831
}
1932

33+
/**
34+
* Creates a rounded corner filler for inactive tab states
35+
* Provides visual separation between tabs with border and radius
36+
* @param {string} $side - Which side to position the filler (left|right)
37+
*/
38+
2039
@mixin pseudo-inactive-filler($side: left) {
2140
border-top: var(--tab-border-width) solid var(--g-color-line-generic);
2241
@include pseudo-base($side, var(--tab-filler-size));
2342
border-#{$side}: var(--tab-border-width) solid var(--g-color-line-generic);
2443
border-top-#{$side}-radius: var(--g-border-radius-s);
2544
}
2645

46+
/**
47+
* Creates a simple background fill without borders
48+
* Used as a background layer behind other pseudo-elements
49+
* @param {string} $side - Which side to position the fill (left|right)
50+
*/
51+
2752
@mixin pseudo-background-fill($side: left) {
2853
@include pseudo-base($side, var(--tab-filler-size));
2954
}
3055

3156
// Utility mixins for common patterns
3257

58+
/**
59+
* Consistent tab border styling for both active and inactive states
60+
* Creates the characteristic tab shape with top and side borders only
61+
* @param {color} $color - Border color to use
62+
*/
63+
3364
@mixin tab-border-base($color) {
3465
border: var(--tab-border-width) solid $color;
3566
border-bottom: none;
3667
border-radius: var(--g-border-radius-s) var(--g-border-radius-s) 0 0;
3768
}
3869

70+
/**
71+
* Complete edge filler system for first/last tabs
72+
* Handles all pseudo-element states (active/inactive, ::before/::after)
73+
* Creates the complex tab connection visuals for edge containers
74+
* @param {string} $side - Which edge this applies to (left|right)
75+
*/
76+
3977
@mixin tab-edge-filler($side) {
4078
&.tenant-metrics-cards__link-container_active::after {
4179
@include pseudo-active-filler($side);

0 commit comments

Comments
 (0)