Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions projects/element-ng/filter-bar/si-filter-bar.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
$list-header-filter-padding-horizontal: map.get(all-variables.$spacers, 5);
$list-header-filter-padding-vertical: map.get(all-variables.$spacers, 3);
$filter-bar-background-color: all-variables.$element-base-0;
$filter-pill-gap: map.get(all-variables.$spacers, 4); // Keep in sync with si-filter-pill.

:host {
--filter-pill-gap: #{map.get(all-variables.$spacers, 4)};
}

:host.reset .responsive .list-text {
line-height: calc(all-variables.$btn-font-size-lg + all-variables.$btn-padding-y * 2);
Expand All @@ -24,7 +27,7 @@ $filter-pill-gap: map.get(all-variables.$spacers, 4); // Keep in sync with si-fi
overflow: hidden;
display: flex;
align-items: center;
gap: $filter-pill-gap;
gap: var(--filter-pill-gap);

.list-text {
color: all-variables.$element-text-disabled;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
@use 'sass:map';
@use 'sass:math';

@use '@siemens/element-theme/src/styles/variables';

$filter-pill-height: map.get(variables.$spacers, 9);
$filter-pill-gap: map.get(variables.$spacers, 4);

:host {
--filter-pill-background-color: #{variables.$element-base-1};
Expand All @@ -15,8 +13,7 @@ $filter-pill-gap: map.get(variables.$spacers, 4);
}

.pill {
margin-inline-start: $filter-pill-gap;
background: var(--filter-pill-background-color);
margin-inline-start: var(--filter-pill-gap, #{map.get(variables.$spacers, 4)});
}

.wrapper {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
@use '@siemens/element-theme/src/styles/variables';
@use 'sass:map';

.pill {
background: var(--filter-pill-background-color);
}

.criteria {
display: flex;
cursor: pointer;
white-space: nowrap;
border-radius: 12px;

&.invalid-criterion {
border-radius: 0.75rem;
box-shadow: 0 0 0 1px variables.$element-status-danger;
}

Expand All @@ -26,7 +21,6 @@
}

.operator-input {
background: var(--filter-pill-background-color);
padding-inline: map.get(variables.$spacers, 2);
inline-size: calc(1ch + #{2 * map.get(variables.$spacers, 2)});
}
Expand Down
19 changes: 11 additions & 8 deletions projects/element-theme/src/styles/components/_pills.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
.pill {
display: flex;
align-items: center;
block-size: 24px;
border-radius: 12px;
background: variables.$element-base-0;
padding-block: map.get(variables.$spacers, 2);
border-radius: 0.75rem;
background: var(--filter-pill-background-color, variables.$element-base-0);
padding-inline: map.get(variables.$spacers, 4);
max-inline-size: 100%;

Expand All @@ -23,6 +21,11 @@
background: variables.$element-action-secondary-hover;
}
}

.name,
.value {
padding-block: map.get(variables.$spacers, 2);
}
}

.pill-group {
Expand All @@ -33,13 +36,13 @@
border-radius: 0;

&:first-child {
border-start-start-radius: 12px;
border-end-start-radius: 12px;
border-start-start-radius: 0.75rem;
border-end-start-radius: 0.75rem;
Comment on lines +39 to +40
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using a larger value for the border radius ensures that the pill maintains its capsule shape even if its height increases due to content scaling.

Suggested change
border-start-start-radius: 0.75rem;
border-end-start-radius: 0.75rem;
border-start-start-radius: 1.5rem;
border-end-start-radius: 1.5rem;

}

&:last-child {
border-start-end-radius: 12px;
border-end-end-radius: 12px;
border-start-end-radius: 0.75rem;
border-end-end-radius: 0.75rem;
Comment on lines +44 to +45
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using a larger value for the border radius ensures that the pill maintains its capsule shape even if its height increases due to content scaling.

Suggested change
border-start-end-radius: 0.75rem;
border-end-end-radius: 0.75rem;
border-start-end-radius: 1.5rem;
border-end-end-radius: 1.5rem;

}
}
}
Loading