Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt CSS logical properties #3406

Merged
merged 1 commit into from
May 1, 2024
Merged
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
22 changes: 11 additions & 11 deletions .storybook/welcome.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2023 The Tekton Authors
Copyright 2023-2024 The Tekton Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand All @@ -13,16 +13,16 @@ limitations under the License.

.welcome__container {
position: absolute;
top: 0;
left: 0;
width: 100vw;
max-width: 120ch;
inset-block-start: 0;
inset-inline-start: 0;
inline-size: 100vi;
max-inline-size: 120ch;
padding: 3rem;
background-color: $ui-background;

.welcome__heading {
display: flex;
margin-bottom: 2rem;
margin-block-end: 2rem;
}

h2 {
Expand All @@ -36,12 +36,12 @@ limitations under the License.
}

h3 {
margin-top: 2rem;
margin-block-start: 2rem;
}

img {
height: 250px;
margin-left: auto;
block-size: 250px;
margin-inline-start: auto;
}

a:not([target="_self"]) {
Expand All @@ -65,11 +65,11 @@ limitations under the License.
}

p {
margin-top: 1rem;
margin-block-start: 1rem;
}

ul li {
margin-top: 0.5rem;
margin-block-start: 0.5rem;
}

.tkn-graph-story .sb-story {
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/components/Actions/Actions.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2022 The Tekton Authors
Copyright 2022-2024 The Tekton Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand All @@ -12,5 +12,5 @@ limitations under the License.
*/

.tkn--actions-dropdown--button {
width: auto;
inline-size: auto;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2020-2023 The Tekton Authors
Copyright 2020-2024 The Tekton Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand All @@ -17,23 +17,23 @@ limitations under the License.
vertical-align: middle;

&:nth-child(3n + 1) {
width: 10%;
inline-size: 10%;
}

&:nth-child(3n + 2) {
width: 30%;
inline-size: 30%;
}

&:nth-child(3n + 3) {
width: 15%;
inline-size: 15%;
}
}

th span,
td span {
@include skeleton;
width: 75%;
height: 1rem;
inline-size: 75%;
block-size: 1rem;
display: block;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ limitations under the License.

.tkn--delete-modal {
.tkn--table {
margin-top: 1rem;
margin-block-start: 1rem;
}
}
34 changes: 19 additions & 15 deletions packages/components/src/components/DetailsHeader/DetailsHeader.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2023 The Tekton Authors
Copyright 2019-2024 The Tekton Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand All @@ -13,10 +13,12 @@ limitations under the License.

header.tkn--step-details-header {
background-color: $ui-01;
padding: 1rem 1rem 0;
padding-block-start: 1rem;
padding-block-end: 0;
padding-inline: 1rem;

h2.tkn--details-header--heading {
height: 1.7rem;
block-size: 1.7rem;
font-size: 1.3rem;
font-weight: 400;
display: flex;
Expand All @@ -35,38 +37,40 @@ header.tkn--step-details-header {
}

> .skeleton-placeholder {
height: 100%;
width: 12rem;
block-size: 100%;
inline-size: 12rem;
}

> .tkn--status-icon {
vertical-align: top;
margin-right: 0.75rem;
width: 24px;
height: 24px;
margin-inline-end: 0.75rem;
inline-size: 24px;
block-size: 24px;

&.tkn--spinner {
position: relative;
top: -1px;
left: -1px;
inset-block-start: -1px;
inset-inline-start: -1px;
}

&.tkn--status-icon--warning.tkn--status-icon--type-normal {
width: 28px;
height: 28px;
margin-right: 0.5rem;
inline-size: 28px;
block-size: 28px;
margin-inline-end: 0.5rem;
}
}

> .tkn--status-label {
font-size: 0.9rem;
margin-left: 0.75rem;
margin-inline-start: 0.75rem;
}
}

.tkn--run-details-time {
display: inline-block;
margin: 0.5rem 0 0.5rem 2.25rem;
margin-block: 0.5rem;
margin-inline-start: 2.25rem;
margin-inline-end: 0;
font-size: 0.75rem;
}

Expand Down
8 changes: 4 additions & 4 deletions packages/components/src/components/Header/Header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ limitations under the License.

header.#{$prefix}--header.tkn--header {
.#{$prefix}--list-box__wrapper {
margin-top: 0.5rem;
margin-right: 1rem;
margin-block-start: 0.5rem;
margin-inline-end: 1rem;

&:last-child {
margin-right: 2rem;
margin-inline-end: 2rem;
}
}

.tkn--logout-btn {
padding-right: 2px;
padding-inline-end: 2px;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2023 The Tekton Authors
Copyright 2019-2024 The Tekton Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand All @@ -12,7 +12,7 @@ limitations under the License.
*/

.tkn--keyvalues {
margin-bottom: $spacing-06;
margin-block-end: $spacing-06;

.tkn--keyvalue-invalid {
color: $support-01;
Expand All @@ -24,27 +24,27 @@ limitations under the License.
.tkn--keyvalue-label {
color: $text-02;
font-size: 12px;
height: 29px;
block-size: 29px;
flex: 1;
text-align: left;
text-align: start;
margin: auto;
}

.tkn--keyvalue-row {
position: relative;
display: flex;
align-items: center;
margin-bottom: 5px;
margin-block-end: 5px;

.#{$prefix}--form-item.#{$prefix}--text-input-wrapper {
width: 48%;
inline-size: 48%;
display: inline-flex;
margin-bottom: 0;
margin-right: $spacing-05;
margin-block-end: 0;
margin-inline-end: $spacing-05;
}

.#{$prefix}--text-input-wrapper:first-child {
margin-right: $spacing-07;
margin-inline-end: $spacing-07;
}

.#{$prefix}--btn--ghost.#{$prefix}--btn--icon-only {
Expand Down
19 changes: 11 additions & 8 deletions packages/components/src/components/LabelFilter/LabelFilter.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2023 The Tekton Authors
Copyright 2019-2024 The Tekton Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand All @@ -21,25 +21,28 @@ limitations under the License.
flex-wrap: wrap;
align-items: baseline;

// NOTE: add offset to min-height to prevent layout shift.
min-height: calc(#{$spacing-08} + #{$button-border-width} + 2px);
margin-bottom: calc(#{$spacing-05} - #{$button-border-width});
// NOTE: add offset to min-block-size to prevent layout shift.
min-block-size: calc(#{$spacing-08} + #{$button-border-width} + 2px);
margin-block-end: calc(#{$spacing-05} - #{$button-border-width});

.#{$prefix}--tag {
flex-shrink: 0;
margin: $spacing-05 $spacing-03 0 0;
margin-block-start: $spacing-05;
margin-inline-end: $spacing-03;
margin-block-end: 0;
margin-inline-start: 0;
}

.#{$prefix}--btn {
margin-top: calc(#{$spacing-04} - 1px );
margin-block-start: calc(#{$spacing-04} - 1px );
}
}
}

.tkn--visually-hidden:not(:focus):not(:active) {
position: absolute;
height: 1px;
width: 1px;
block-size: 1px;
inline-size: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
Expand Down
8 changes: 4 additions & 4 deletions packages/components/src/components/Loading/Loading.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2023 The Tekton Authors
Copyright 2023-2024 The Tekton Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand All @@ -12,12 +12,12 @@ limitations under the License.
*/

.#{$prefix}--loading-overlay.tkn--loading-overlay {
top: 3rem;
inset-block-start: 3rem;
flex-direction: column;

.#{$prefix}--loading {
margin-top: -3rem;
margin-bottom: $spacing-05;
margin-block-start: -3rem;
margin-block-end: $spacing-05;
}

.tkn--loading-text {
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/components/Log/Log.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export class LogContainer extends Component {
className={`${carbonPrefix}--copy-btn`}
hasIconOnly
iconDescription={scrollButtonTopMessage}
id="log-scroll-to-top-btn"
id="log-scroll-to-start-btn"
onClick={this.scrollToTopLog}
renderIcon={() => (
<UpToTop16>
Expand All @@ -233,7 +233,7 @@ export class LogContainer extends Component {
className={`${carbonPrefix}--copy-btn`}
iconDescription={scrollButtonBottomMessage}
hasIconOnly
id="log-scroll-to-bottom-btn"
id="log-scroll-to-end-btn"
onClick={this.scrollToBottomLog}
renderIcon={() => (
<DownToBottom16>
Expand Down
Loading
Loading