Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
@use '@siemens/element-theme/src/styles/variables';

dt {
margin-block-start: map.get(variables.$spacers, 5);
margin-block-start: map.get(variables.$spacers-block, 5);
}

dd {
margin-block-start: map.get(variables.$spacers, 2);
margin-block-start: map.get(variables.$spacers-block, 2);
margin-block-end: 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
@use '@siemens/element-theme/src/styles/variables';

dt {
margin-block-start: map.get(variables.$spacers, 5);
margin-block-start: map.get(variables.$spacers-block, 5);
}

dd {
margin-block-start: map.get(variables.$spacers, 2);
margin-block-start: map.get(variables.$spacers-block, 2);
margin-block-end: 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
display: flex;
flex: 1 1 0;
flex-direction: column;
margin-inline: -1 * map.get(variables.$spacers, 2);
margin-block-start: -1 * map.get(variables.$spacers, 2);
margin-inline: map.get(variables.$negative-spacers-inline, 2);
margin-block-start: map.get(variables.$negative-spacers-block, 2);
}

.list-group-item {
Expand All @@ -25,6 +25,6 @@
justify-content: flex-end;

> * {
margin-inline-start: map.get(variables.$spacers, 6);
margin-inline-start: map.get(variables.$spacers-inline, 6);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,24 @@
// Overwrite to hide the gridstack.js icon
background-image: none !important;
transform: none !important;
inset-block-end: map.get(variables.$spacers, 3) !important;
inset-inline-end: map.get(variables.$spacers, 3) !important;
inset-block-end: map.get(variables.$spacers-block, 3) !important;
inset-inline-end: map.get(variables.$spacers-inline, 3) !important;
}
/* stylelint-enable declaration-no-important */
}

.resize-handle {
inset-block-end: map.get(variables.$spacers, 3);
inset-block-end: map.get(variables.$spacers-block, 3);
color: variables.$element-ui-2;
pointer-events: none;
position: absolute;
inset-inline-end: map.get(variables.$spacers, 3);
inset-inline-end: map.get(variables.$spacers-inline, 3);
text-align: center;
z-index: 10;
}

.draggable-overlay {
inset: map.get(variables.$spacers, 4);
inset: map.get(variables.$spacers-block, 4) map.get(variables.$spacers-inline, 4);
position: absolute;
z-index: 100;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
display: flex;
flex: 1 1 0;
flex-direction: column;
margin-inline: -1 * map.get(variables.$spacers, 2);
margin-block-start: -1 * map.get(variables.$spacers, 2);
margin-inline: map.get(variables.$negative-spacers-inline, 2);
margin-block-start: map.get(variables.$negative-spacers-block, 2);
}

.editor-footer {
Expand All @@ -17,6 +17,6 @@
justify-content: flex-end;

> * {
margin-inline-start: map.get(variables.$spacers, 6);
margin-inline-start: map.get(variables.$spacers-inline, 6);
}
}
2 changes: 1 addition & 1 deletion projects/element-ng/about/si-about.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

.list-group-item {
border-width: 0 0 1px;
padding-inline: map.get(variables.$spacers, 6);
padding-inline: map.get(variables.$spacers-inline, 6);

&.with-border:first-child {
border-block-start-width: 1px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}

.collapsible-header {
padding-block: map.get(variables.$spacers, 4);
padding-block: map.get(variables.$spacers-block, 4);

&:hover {
background: variables.$element-base-1-hover;
Expand All @@ -52,7 +52,7 @@
align-items: center;
background: variables.$element-base-1;
color: variables.$element-text-primary;
padding-block: map.get(variables.$spacers, 5);
padding-block: map.get(variables.$spacers-block, 5);
border-radius: var(--__radius);

&.disabled {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
align-items: center;
flex-flow: column nowrap;
position: relative;
padding-block: map.get(variables.$spacers, 8);
inline-size: calc(7rem + 2 * map.get(variables.$spacers, 7));
max-inline-size: calc(7rem + 2 * map.get(variables.$spacers, 7));
padding-inline: map.get(variables.$spacers, 4);
padding-block: map.get(variables.$spacers-block, 8);
inline-size: calc(7rem + 2 * map.get(variables.$spacers-inline, 7));
max-inline-size: calc(7rem + 2 * map.get(variables.$spacers-inline, 7));
padding-inline: map.get(variables.$spacers-inline, 4);
color: variables.$element-text-primary;
border-radius: variables.$element-radius-2;

Expand Down Expand Up @@ -47,21 +47,21 @@
justify-content: center;
inline-size: 3rem;
block-size: 3rem;
margin-block-end: map.get(variables.$spacers, 4);
margin-block-end: map.get(variables.$spacers-block, 4);
border-radius: variables.$element-radius-2;

&:is(si-icon) {
background: variables.$element-launchpad-app-background;
font-size: 2.5rem;
padding: map.get(variables.$spacers, 2);
padding: map.get(variables.$spacers-block, 2) map.get(variables.$spacers-inline, 2);
color: variables.$element-launchpad-app-color;
}
}

.favorite-icon {
position: absolute;
inset-inline-end: map.get(variables.$spacers, 6);
inset-block-start: map.get(variables.$spacers, 6);
inset-inline-end: map.get(variables.$spacers-inline, 6);
inset-block-start: map.get(variables.$spacers-block, 6);
color: variables.$element-text-primary;
}

Expand All @@ -74,24 +74,24 @@
flex-flow: row nowrap;
inline-size: 100%;
max-inline-size: 100%;
padding: map.get(variables.$spacers, 4);
padding: map.get(variables.$spacers-block, 4) map.get(variables.$spacers-inline, 4);

&:has(.favorite-icon) {
padding-inline-end: map.get(variables.$spacers, 9);
padding-inline-end: map.get(variables.$spacers-inline, 9);
}
}

.app-icon {
margin-block-end: 0;
margin-inline-end: map.get(variables.$spacers, 4);
margin-inline-end: map.get(variables.$spacers-inline, 4);
}

.app-text {
align-items: start;
}

.favorite-icon {
inset-inline-end: map.get(variables.$spacers, 4);
inset-block-start: map.get(variables.$spacers, 4);
inset-inline-end: map.get(variables.$spacers-inline, 4);
inset-block-start: map.get(variables.$spacers-block, 4);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
100vb - variables.$si-application-header-height - variables.$si-titlebar-spacing -
variables.$si-system-banner-spacing
);
padding: map.get(variables.$spacers, 6);
padding: map.get(variables.$spacers-block, 6) map.get(variables.$spacers-inline, 6);
display: flex;
flex-direction: column;
z-index: variables.$zindex-launchpad;
background-color: variables.$element-base-1;

@include all-variables.media-breakpoint-up(lg) {
padding-block: map.get(variables.$spacers, 6);
padding-inline: map.get(variables.$spacers, 8);
padding-block: map.get(variables.$spacers-block, 6);
padding-inline: map.get(variables.$spacers-inline, 8);
}
}

Expand All @@ -35,16 +35,16 @@
.apps-scroll {
overflow-y: auto;
// Prevent scrollbar from overlapping items on mobile
padding-inline-end: map.get(variables.$spacers, 6);
margin-inline-end: map.get(variables.$spacers, 6) * -1;
padding-inline-end: map.get(variables.$spacers-inline, 6);
margin-inline-end: map.get(variables.$negative-spacers-inline, 6);
}

.btn-show-all {
margin-block-start: map.get(variables.$spacers, 6);
margin-block-end: map.get(variables.$spacers, 4);
margin-block-start: map.get(variables.$spacers-block, 6);
margin-block-end: map.get(variables.$spacers-block, 4);

&.show {
margin-block-end: map.get(variables.$spacers, 8);
margin-block-end: map.get(variables.$spacers-block, 8);
}

&.show:has(+ si-launchpad-category.has-title) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

si-avatar.small {
// makes the avatar slightly larger with increased font size, aligning with the icons
--avatar-size: calc(1.5rem + #{2 * map.get(spacers.$spacers, 2)});
--avatar-size: calc(1.5rem + 2 * #{map.get(spacers.$spacers-block, 2)});
}
20 changes: 13 additions & 7 deletions projects/element-ng/avatar/si-avatar.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,34 @@
}

&.tiny {
--avatar-size: calc(#{variables.$si-icon-font-size} + #{2 * map.get(variables.$spacers, 1)});
--avatar-size: calc(
#{variables.$si-icon-font-size} + 2 * #{map.get(variables.$spacers-block, 1)}
);
}

&.xsmall {
--avatar-size: calc(#{variables.$si-icon-font-size} + #{2 * map.get(variables.$spacers, 2)});
--avatar-size: calc(
#{variables.$si-icon-font-size} + 2 * #{map.get(variables.$spacers-block, 2)}
);
}

&.small {
--avatar-size: calc(#{variables.$si-icon-font-size} + #{2 * map.get(variables.$spacers, 3)});
--avatar-size: calc(
#{variables.$si-icon-font-size} + 2 * #{map.get(variables.$spacers-block, 3)}
);
}

&.large {
--avatar-size: calc(
#{variables.$si-icon-font-size} + #{2 *
(map.get(variables.$spacers, 6) + map.get(variables.$spacers, 1))}
#{variables.$si-icon-font-size} + 2 *
(#{map.get(variables.$spacers-block, 6)} + #{map.get(variables.$spacers-block, 1)})
);
}

&.xlarge {
--avatar-size: calc(
#{variables.$si-icon-font-size} + #{2 *
(map.get(variables.$spacers, 8) + map.get(variables.$spacers, 3))}
#{variables.$si-icon-font-size} + 2 *
(#{map.get(variables.$spacers-block, 8)} + #{map.get(variables.$spacers-block, 3)})
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion projects/element-ng/card/si-card-header.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@

::ng-deep .icon[headerIcon] {
// The icon would be 8px too high without this.
margin-block: - map.get(spacers.$spacers, 2);
margin-block: map.get(spacers.$negative-spacers-block, 2);
}
2 changes: 1 addition & 1 deletion projects/element-ng/carousel/si-carousel.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '@siemens/element-theme/src/styles/variables/spacers';

:host {
--si-carousel-gap: #{map.get(spacers.$spacers, 6)};
--si-carousel-gap: #{map.get(spacers.$spacers-block, 6)};

display: flex;
flex-direction: column;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ si-chat-message {
// Because of the transparent background we need to remove the padding
--chat-message-bubble-padding: 0;

margin-block-end: -1 * map.get(variables.$spacers, 2);
margin-block-end: map.get(variables.$negative-spacers-block, 2);
}

.ai-message-actions {
margin-block-start: map.get(variables.$spacers, 5) - map.get(variables.$spacers, 2);
margin-block-start: calc(
map.get(variables.$spacers-block, 5) - map.get(variables.$spacers-block, 2)
);
}

// Loading spinner size adjustment (inherited from generic component)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

.chat-input-area,
si-ai-welcome-screen {
padding-inline-start: map.get(variables.$spacers, 6);
padding-inline-end: map.get(variables.$spacers, 6);
padding-inline-start: map.get(variables.$spacers-inline, 6);
padding-inline-end: map.get(variables.$spacers-inline, 6);
}
}

Expand All @@ -44,14 +44,17 @@
.messages-container {
overflow-y: auto;
overflow-x: visible;
padding-inline: map.get(variables.$spacers, 4);
padding-inline: map.get(variables.$spacers-inline, 4);
// Ensure the messages can still be seen on very short screens
min-block-size: 5rem;
gap: map.get(variables.$spacers, 9) + map.get(variables.$spacers, 4);
gap: calc(map.get(variables.$spacers-block, 9) + map.get(variables.$spacers-block, 4))
calc(map.get(variables.$spacers-inline, 9) + map.get(variables.$spacers-inline, 4));

// Padding is included here, cancel out the gap on the messages container
::ng-deep si-user-message:not(.last) {
margin-block-end: -1 * (map.get(variables.$spacers, 9) + map.get(variables.$spacers, 4));
margin-block-end: calc(
map.get(variables.$negative-spacers-block, 9) + map.get(variables.$negative-spacers-block, 4)
);
}

::ng-deep &:not(:has(si-ai-welcome-screen)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
.input-wrapper {
border-color: variables.$element-ui-4;
background-color: variables.$element-base-1;
padding-block: map.get(variables.$spacers, 5) map.get(variables.$spacers, 4);
padding-inline: map.get(variables.$spacers, 5);
padding-block: map.get(variables.$spacers-block, 5) map.get(variables.$spacers-block, 4);
padding-inline: map.get(variables.$spacers-inline, 5);
display: flex;
flex-direction: column;
gap: map.get(variables.$spacers, 5);
gap: map.get(variables.$spacers-block, 5) map.get(variables.$spacers-inline, 5);

&:hover,
&:active,
Expand Down
Loading
Loading