diff --git a/packages/components/src/components/Trigger/Trigger.jsx b/packages/components/src/components/Trigger/Trigger.jsx
index 1313410d9..4415a9acc 100644
--- a/packages/components/src/components/Trigger/Trigger.jsx
+++ b/packages/components/src/components/Trigger/Trigger.jsx
@@ -20,12 +20,14 @@ import {
ListItem,
UnorderedList
} from 'carbon-components-react';
-import { urls } from '@tektoncd/dashboard-utils';
+import { getCarbonPrefix, urls } from '@tektoncd/dashboard-utils';
import CustomLink from '../Link';
import Table from '../Table';
import ViewYAML from '../ViewYAML';
+const carbonPrefix = getCarbonPrefix();
+
const Trigger = ({ namespace, trigger }) => {
const intl = useIntl();
const tableHeaders = [
@@ -289,7 +291,9 @@ const Trigger = ({ namespace, trigger }) => {
defaultMessage: 'Filter:'
})}
-
+
{interceptor.cel.filter}
>
diff --git a/packages/components/src/components/ViewYAML/SyntaxHighlighter.jsx b/packages/components/src/components/ViewYAML/SyntaxHighlighter.jsx
index d1170d782..d661c2fb0 100644
--- a/packages/components/src/components/ViewYAML/SyntaxHighlighter.jsx
+++ b/packages/components/src/components/ViewYAML/SyntaxHighlighter.jsx
@@ -14,6 +14,9 @@ limitations under the License.
import React from 'react';
import jsYaml from 'js-yaml';
+import { getCarbonPrefix } from '@tektoncd/dashboard-utils';
+
+const carbonPrefix = getCarbonPrefix();
function addLine({ addBullet, key, level, lines, path, rawString, value }) {
let valueNode;
@@ -193,7 +196,7 @@ export default function SyntaxHighlighter({ resource }) {
return (
{lines}
diff --git a/packages/components/src/components/ViewYAML/ViewYAML.jsx b/packages/components/src/components/ViewYAML/ViewYAML.jsx
index 1d49276ec..1f74fe0cd 100644
--- a/packages/components/src/components/ViewYAML/ViewYAML.jsx
+++ b/packages/components/src/components/ViewYAML/ViewYAML.jsx
@@ -14,10 +14,12 @@ limitations under the License.
import React from 'react';
import PropTypes from 'prop-types';
import jsYaml from 'js-yaml';
-import { classNames } from '@tektoncd/dashboard-utils';
+import { classNames, getCarbonPrefix } from '@tektoncd/dashboard-utils';
import SyntaxHighlighter from './SyntaxHighlighter';
+const carbonPrefix = getCarbonPrefix();
+
function YAMLRaw({ children, className }) {
return (
@@ -39,7 +41,7 @@ function ViewYAML({
if (enableSyntaxHighlighting && typeof resource !== 'string') {
yamlComponent = ;
} else {
- const clz = classNames('bx--snippet--multi', className, {
+ const clz = classNames(`${carbonPrefix}--snippet--multi`, className, {
'tkn--view-yaml--dark': dark
});
const yaml = jsYaml.dump(resource);
diff --git a/packages/components/src/components/ViewYAML/ViewYAML.scss b/packages/components/src/components/ViewYAML/ViewYAML.scss
index 6aff0d5b4..8b4c8d948 100644
--- a/packages/components/src/components/ViewYAML/ViewYAML.scss
+++ b/packages/components/src/components/ViewYAML/ViewYAML.scss
@@ -1,5 +1,5 @@
/*
-Copyright 2020-2021 The Tekton Authors
+Copyright 2020-2023 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
@@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-.bx--snippet--multi.tkn--view-yaml--dark {
+.#{$prefix}--snippet--multi.tkn--view-yaml--dark {
background-color: $gray-90; // TODO: $inverse-02 - see Log.scss
color: $gray-10; // $inverse-01
}
@@ -49,7 +49,7 @@ pre.tkn--syntax-highlighter {
flex-grow: 1;
}
-.bx--snippet--multi {
+.#{$prefix}--snippet--multi {
max-width: none;
// Styles based on a11y-dark by @ericwbailey
diff --git a/packages/components/src/scss/Run.scss b/packages/components/src/scss/Run.scss
index a79a7e426..ee18b7787 100644
--- a/packages/components/src/scss/Run.scss
+++ b/packages/components/src/scss/Run.scss
@@ -1,5 +1,5 @@
/*
-Copyright 2019-2021 The Tekton Authors
+Copyright 2019-2023 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
@@ -27,7 +27,7 @@ limitations under the License.
padding-left: 1rem;
}
- .bx--data-table {
+ .#{$prefix}--data-table {
td {
background-color: $ui-02;
border-top-color: $ui-02;
@@ -38,6 +38,6 @@ limitations under the License.
}
}
-.bx--snippet--multi {
+.#{$prefix}--snippet--multi {
overflow-x: auto
}
diff --git a/packages/e2e/cypress.config.js b/packages/e2e/cypress.config.js
index 816761242..52814d633 100644
--- a/packages/e2e/cypress.config.js
+++ b/packages/e2e/cypress.config.js
@@ -21,7 +21,9 @@ module.exports = defineConfig({
baseUrl: 'http://localhost:8000',
experimentalRunAllSpecs: true,
experimentalStudio: true,
- setupNodeEvents(on, _config) {
+ setupNodeEvents(on, config) {
+ config.env.carbonPrefix = 'bx'; // eslint-disable-line no-param-reassign
+
on('after:spec', (spec, results) => {
if (isCI && results && results.video && results.stats.failures === 0) {
console.log('Deleting video for passing test'); // eslint-disable-line no-console
@@ -30,6 +32,8 @@ module.exports = defineConfig({
return null;
});
+
+ return config;
}
},
screenshotOnRunFailure: !isCI,
diff --git a/packages/e2e/cypress/e2e/common/extensions.cy.js b/packages/e2e/cypress/e2e/common/extensions.cy.js
index 518d80eb1..1058ab115 100644
--- a/packages/e2e/cypress/e2e/common/extensions.cy.js
+++ b/packages/e2e/cypress/e2e/common/extensions.cy.js
@@ -11,6 +11,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
+const carbonPrefix = Cypress.env('carbonPrefix');
+
const namespace = 'tekton-dashboard-e2e-extensions';
describe('Extensions', () => {
before(() => {
@@ -38,7 +40,7 @@ spec:
displayname: Namespaces
`);
- cy.contains('.bx--side-nav a', 'Namespaces').click();
+ cy.contains(`.${carbonPrefix}--side-nav a`, 'Namespaces').click();
cy.hash().should('equal', '#/core/v1/namespaces');
cy.contains('h1', 'core/v1/namespaces');
cy.get('table');
diff --git a/packages/e2e/cypress/e2e/common/read-permissions.cy.js b/packages/e2e/cypress/e2e/common/read-permissions.cy.js
index dc2f94515..15ad0516b 100644
--- a/packages/e2e/cypress/e2e/common/read-permissions.cy.js
+++ b/packages/e2e/cypress/e2e/common/read-permissions.cy.js
@@ -1,5 +1,5 @@
/*
-Copyright 2022 The Tekton Authors
+Copyright 2022-2023 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
@@ -13,6 +13,8 @@ limitations under the License.
import kinds from '../../fixtures/kinds.json';
+const carbonPrefix = Cypress.env('carbonPrefix');
+
describe('Read permissions', { testIsolation: false }, () => {
before(() => {
cy.visit('/');
@@ -22,7 +24,10 @@ describe('Read permissions', { testIsolation: false }, () => {
kinds.forEach(kind => {
it(`should display ${kind.label} page`, () => {
- cy.contains('.bx--side-nav a', new RegExp(`^${kind.label}$`)).click();
+ cy.contains(
+ `.${carbonPrefix}--side-nav a`,
+ new RegExp(`^${kind.label}$`)
+ ).click();
cy.hash().should('equal', `#${kind.path}`);
cy.contains('h1', kind.label);
cy.get('table');
diff --git a/packages/e2e/cypress/e2e/import/import-resources.cy.js b/packages/e2e/cypress/e2e/import/import-resources.cy.js
index a5d0e9bf8..0b13502e2 100644
--- a/packages/e2e/cypress/e2e/import/import-resources.cy.js
+++ b/packages/e2e/cypress/e2e/import/import-resources.cy.js
@@ -11,6 +11,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
+const carbonPrefix = Cypress.env('carbonPrefix');
+
const namespace = 'tekton-dashboard-e2e-import-resources';
describe('Import resources', () => {
before(() => {
@@ -65,7 +67,7 @@ subjects:
cy.get('#import-namespaces-dropdown').click();
cy.contains(namespace).click();
- cy.contains('button.bx--btn--primary', 'Import').click();
+ cy.contains(`button.${carbonPrefix}--btn--primary`, 'Import').click();
cy.contains('a', 'View status of this run').click();
cy.get('header[class="tkn--pipeline-run-header"]')
diff --git a/packages/e2e/cypress/e2e/run/pipelinerun-edit.cy.js b/packages/e2e/cypress/e2e/run/pipelinerun-edit.cy.js
index a3e8ea85f..8a90e0aaa 100644
--- a/packages/e2e/cypress/e2e/run/pipelinerun-edit.cy.js
+++ b/packages/e2e/cypress/e2e/run/pipelinerun-edit.cy.js
@@ -11,6 +11,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
+const carbonPrefix = Cypress.env('carbonPrefix');
+
const namespace = 'tkn-dashboard-e2e-pipelinerun-edit';
describe('Edit and run PipelineRun', () => {
before(() => {
@@ -57,7 +59,7 @@ spec:
cy.contains('h1', 'PipelineRuns');
cy.get(
- `td:has(.bx--link[title*=${pipelineName}-run]) + td:has(.tkn--status[data-reason=Succeeded])`,
+ `td:has(.${carbonPrefix}--link[title*=${pipelineName}-run]) + td:has(.tkn--status[data-reason=Succeeded])`,
{ timeout: 15000 }
).should('have.length', 1);
@@ -69,7 +71,7 @@ spec:
cy.contains('h1', 'PipelineRuns');
cy.get(
- `td:has(.bx--link[title*=${pipelineName}-run]) + td:has(.tkn--status[data-reason=Succeeded])`,
+ `td:has(.${carbonPrefix}--link[title*=${pipelineName}-run]) + td:has(.tkn--status[data-reason=Succeeded])`,
{ timeout: 15000 }
).should('have.length', 2);
});
diff --git a/packages/e2e/cypress/e2e/run/taskrun-edit.cy.js b/packages/e2e/cypress/e2e/run/taskrun-edit.cy.js
index 6d7e4b3ab..1b54bf5d5 100644
--- a/packages/e2e/cypress/e2e/run/taskrun-edit.cy.js
+++ b/packages/e2e/cypress/e2e/run/taskrun-edit.cy.js
@@ -11,6 +11,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
+const carbonPrefix = Cypress.env('carbonPrefix');
+
const namespace = 'tkn-dashboard-e2e-taskrun-edit';
describe('Edit and run TaskRun', () => {
before(() => {
@@ -52,7 +54,7 @@ spec:
cy.contains('h1', 'TaskRuns');
cy.get(
- `td:has(.bx--link[title*=${taskName}-run]) + td:has(.tkn--status[data-reason=Succeeded])`,
+ `td:has(.${carbonPrefix}--link[title*=${taskName}-run]) + td:has(.tkn--status[data-reason=Succeeded])`,
{ timeout: 15000 }
).should('have.length', 1);
@@ -64,7 +66,7 @@ spec:
cy.contains('h1', 'TaskRuns');
cy.get(
- `td:has(.bx--link[title*=${taskName}-run]) + td:has(.tkn--status[data-reason=Succeeded])`,
+ `td:has(.${carbonPrefix}--link[title*=${taskName}-run]) + td:has(.tkn--status[data-reason=Succeeded])`,
{ timeout: 15000 }
).should('have.length', 2);
});
diff --git a/packages/graph/src/components/newGraph.scss b/packages/graph/src/components/newGraph.scss
index 7ac4e69a8..d73b7c377 100644
--- a/packages/graph/src/components/newGraph.scss
+++ b/packages/graph/src/components/newGraph.scss
@@ -18,7 +18,7 @@ limitations under the License.
@import '@carbon/charts/styles/styles.scss';
// }
-.bx--cc--card-node {
+.#{$prefix}--cc--card-node {
&.card-status-success {
border-color: $support-02;
}
@@ -33,22 +33,22 @@ limitations under the License.
}
}
-.bx--cc--card-node__column {
+.#{$prefix}--cc--card-node__column {
overflow: hidden;
}
-.bx--cc--card-node__title {
+.#{$prefix}--cc--card-node__title {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
-.bx--cc--shape-node__icon .bx--tooltip__label .bx--tooltip__trigger {
+.#{$prefix}--cc--shape-node__icon .#{$prefix}--tooltip__label .#{$prefix}--tooltip__trigger {
margin-left: 0;
}
.status-icon {
- .bx--cc--shape-node__icon & {
+ .#{$prefix}--cc--shape-node__icon & {
width: 24px;
height: 24px;
}
diff --git a/packages/utils/src/utils/hooks.js b/packages/utils/src/utils/hooks.js
index 5184297c9..ad07bbab3 100644
--- a/packages/utils/src/utils/hooks.js
+++ b/packages/utils/src/utils/hooks.js
@@ -1,5 +1,5 @@
/*
-Copyright 2021 The Tekton Authors
+Copyright 2021-2023 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
diff --git a/packages/utils/src/utils/index.js b/packages/utils/src/utils/index.js
index b8d8071d7..6c72b02f4 100644
--- a/packages/utils/src/utils/index.js
+++ b/packages/utils/src/utils/index.js
@@ -11,6 +11,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
+import { settings } from 'carbon-components';
+
import { labels as labelConstants } from './constants';
import { getStatus } from './status';
@@ -529,3 +531,7 @@ export function taskRunHasWarning(taskRun) {
);
return !!onErrorContinueStep;
}
+
+export function getCarbonPrefix() {
+ return settings.prefix;
+}
diff --git a/src/containers/About/About.jsx b/src/containers/About/About.jsx
index 5f184cfc2..cbe2d1853 100644
--- a/src/containers/About/About.jsx
+++ b/src/containers/About/About.jsx
@@ -21,7 +21,11 @@ import {
Tile
} from 'carbon-components-react';
import { ArrowRight24 as ArrowIcon } from '@carbon/icons-react';
-import { getErrorMessage, useTitleSync } from '@tektoncd/dashboard-utils';
+import {
+ getCarbonPrefix,
+ getErrorMessage,
+ useTitleSync
+} from '@tektoncd/dashboard-utils';
import { useProperties } from '../../api';
@@ -29,6 +33,8 @@ import tektonLogo from '../../images/tekton-dashboard-color.svg';
import { ReactComponent as DocsPictogram } from '../../images/assets.svg';
import { ReactComponent as HubPictogram } from '../../images/user--interface.svg';
+const carbonPrefix = getCarbonPrefix();
+
function ClickableTile(props) {
return (
- {property}
+ {property}
{displayValue}
)
diff --git a/src/containers/About/About.scss b/src/containers/About/About.scss
index 72b557646..2919d6bf3 100644
--- a/src/containers/About/About.scss
+++ b/src/containers/About/About.scss
@@ -1,5 +1,5 @@
/*
-Copyright 2020-2022 The Tekton Authors
+Copyright 2020-2023 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
@@ -99,7 +99,7 @@ limitations under the License.
}
}
- .bx--tile {
+ .#{$prefix}--tile {
display: flex;
flex-direction: column;
justify-content: space-between;
diff --git a/src/containers/CustomRun/CustomRun.jsx b/src/containers/CustomRun/CustomRun.jsx
index 123eeb60f..3ca83c74e 100644
--- a/src/containers/CustomRun/CustomRun.jsx
+++ b/src/containers/CustomRun/CustomRun.jsx
@@ -29,7 +29,12 @@ import {
StatusIcon,
Table
} from '@tektoncd/dashboard-components';
-import { getStatus, urls, useTitleSync } from '@tektoncd/dashboard-utils';
+import {
+ getCarbonPrefix,
+ getStatus,
+ urls,
+ useTitleSync
+} from '@tektoncd/dashboard-utils';
import { InlineNotification } from 'carbon-components-react';
import {
@@ -41,6 +46,8 @@ import {
import { getViewChangeHandler } from '../../utils';
import NotFound from '../NotFound';
+const carbonPrefix = getCarbonPrefix();
+
function getRunDuration(run) {
if (!run) {
return null;
@@ -290,7 +297,7 @@ function CustomRun() {
actions={
showNotification.logsURL ? (
{intl.formatMessage({
diff --git a/src/containers/ImportResources/ImportResources.scss b/src/containers/ImportResources/ImportResources.scss
index 9bae134c5..53f8b413e 100644
--- a/src/containers/ImportResources/ImportResources.scss
+++ b/src/containers/ImportResources/ImportResources.scss
@@ -1,5 +1,5 @@
/*
-Copyright 2019-2021 The Tekton Authors
+Copyright 2019-2023 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
@@ -12,49 +12,49 @@ limitations under the License.
*/
.tkn--importresources {
- .bx--form__helper-text,
- .bx--label--disabled {
+ .#{$prefix}--form__helper-text,
+ .#{$prefix}--label--disabled {
color: $text-05; // Since by default the contrast/colour choice is barely readable.
}
- .bx--label {
+ .#{$prefix}--label {
display: flex;
align-items: center;
- .bx--tooltip__trigger {
+ .#{$prefix}--tooltip__trigger {
margin-left: 0.5rem;
}
}
- .bx--combo-box.bx--list-box,
- .bx--dropdown.bx--list-box,
- .bx--text-input__field-wrapper {
+ .#{$prefix}--combo-box.#{$prefix}--list-box,
+ .#{$prefix}--dropdown.#{$prefix}--list-box,
+ .#{$prefix}--text-input__field-wrapper {
width: 50%;
min-width: 300px;
}
- .bx--combo-box.bx--list-box {
+ .#{$prefix}--combo-box.#{$prefix}--list-box {
max-width: 350px;
}
- .bx--toast-notification {
+ .#{$prefix}--toast-notification {
margin: 2rem 0 1rem 0;
}
- .bx--form-item,
- .bx--list-box__wrapper {
+ .#{$prefix}--form-item,
+ .#{$prefix}--list-box__wrapper {
margin-bottom: 1.5rem;
}
- .bx--btn {
+ .#{$prefix}--btn {
margin-top: 1rem;
}
- .bx--accordion {
+ .#{$prefix}--accordion {
margin-bottom: 1rem;
- .bx--accordion__content,
- .bx--accordion__item--active .bx--accordion__content {
+ .#{$prefix}--accordion__content,
+ .#{$prefix}--accordion__item--active .#{$prefix}--accordion__content {
padding: .5rem 0;
margin-left: 0;
}
diff --git a/src/containers/ImportResources/ImportResources.test.jsx b/src/containers/ImportResources/ImportResources.test.jsx
index a38fc43db..058df61ab 100644
--- a/src/containers/ImportResources/ImportResources.test.jsx
+++ b/src/containers/ImportResources/ImportResources.test.jsx
@@ -13,13 +13,19 @@ limitations under the License.
import React from 'react';
import { fireEvent, waitFor } from '@testing-library/react';
-import { ALL_NAMESPACES, urls } from '@tektoncd/dashboard-utils';
+import {
+ ALL_NAMESPACES,
+ getCarbonPrefix,
+ urls
+} from '@tektoncd/dashboard-utils';
import { render, renderWithRouter } from '../../utils/test';
import ImportResourcesContainer from './ImportResources';
import * as API from '../../api';
import * as APIUtils from '../../api/utils';
+const carbonPrefix = getCarbonPrefix();
+
describe('ImportResources component', () => {
beforeEach(() => {
vi.spyOn(API, 'useNamespaces').mockImplementation(() => ({
@@ -129,8 +135,9 @@ describe('ImportResources component', () => {
);
expect(
- document.getElementsByClassName('bx--toast-notification__caption')[0]
- .innerHTML
+ document.getElementsByClassName(
+ `${carbonPrefix}--toast-notification__caption`
+ )[0].innerHTML
).toContain(
urls.pipelineRuns.byName({
namespace: 'tekton-dashboard',
diff --git a/src/containers/LoadingShell/LoadingShell.scss b/src/containers/LoadingShell/LoadingShell.scss
index a8c19e9c5..4896987ec 100644
--- a/src/containers/LoadingShell/LoadingShell.scss
+++ b/src/containers/LoadingShell/LoadingShell.scss
@@ -14,8 +14,8 @@ limitations under the License.
// TODO: move SideNav.scss to components and import here for consistency
.tkn--config-loading-shell {
- .bx--header ~ {
- .bx--content {
+ .#{$prefix}--header ~ {
+ .#{$prefix}--content {
background-color: $ui-background;
transform: none;
padding-top: $spacing-06;
@@ -23,32 +23,32 @@ limitations under the License.
}
.tkn--config-loading-nav-skeleton {
- .bx--skeleton__text {
+ .#{$prefix}--skeleton__text {
margin-left: 1rem;
}
- .bx--skeleton__heading {
+ .#{$prefix}--skeleton__heading {
margin-top: 1.5rem;
}
}
- nav.bx--side-nav {
- .bx--side-nav__items {
+ nav.#{$prefix}--side-nav {
+ .#{$prefix}--side-nav__items {
display: flex;
flex-direction: column;
- .bx--side-nav__item {
+ .#{$prefix}--side-nav__item {
flex-shrink: 0;
}
- div + .bx--side-nav__item {
+ div + .#{$prefix}--side-nav__item {
display: flex;
flex-direction: column;
flex-grow: 1;
justify-content: flex-end;
}
- .bx--side-nav__item:last-child {
+ .#{$prefix}--side-nav__item:last-child {
margin-bottom: 1rem;
}
}
diff --git a/src/containers/PipelineRun/PipelineRun.jsx b/src/containers/PipelineRun/PipelineRun.jsx
index 526d20d7d..e01069e48 100644
--- a/src/containers/PipelineRun/PipelineRun.jsx
+++ b/src/containers/PipelineRun/PipelineRun.jsx
@@ -14,6 +14,7 @@ limitations under the License.
import React, { useEffect, useRef, useState } from 'react';
import { Actions, PipelineRun } from '@tektoncd/dashboard-components';
import {
+ getCarbonPrefix,
getStatus,
getTaskRunsWithPlaceholders,
isPending,
@@ -29,6 +30,7 @@ import {
RadioTile,
TileGroup
} from 'carbon-components-react';
+
import { Link } from 'react-router-dom';
import {
useLocation,
@@ -60,6 +62,7 @@ import {
} from '../../utils';
import NotFound from '../NotFound';
+const carbonPrefix = getCarbonPrefix();
const { PIPELINE_TASK, RETRY, STEP, TASK_RUN_NAME, VIEW } = queryParamConstants;
export /* istanbul ignore next */ function PipelineRunContainer() {
@@ -514,7 +517,7 @@ export /* istanbul ignore next */ function PipelineRunContainer() {
actions={
showRunActionNotification.logsURL ? (
{intl.formatMessage({
diff --git a/src/containers/Settings/Settings.scss b/src/containers/Settings/Settings.scss
index 65bd77766..6ea5c5f73 100644
--- a/src/containers/Settings/Settings.scss
+++ b/src/containers/Settings/Settings.scss
@@ -13,7 +13,7 @@ limitations under the License.
.tkn--settings {
.tkn--settings--content {
- .bx--tile-group {
+ .#{$prefix}--tile-group {
margin-bottom: 2rem;
max-width: 400px;
@@ -21,15 +21,15 @@ limitations under the License.
margin-bottom: 1rem;
}
- .bx--tile {
+ .#{$prefix}--tile {
display: flex;
align-items: center;
- .bx--tile__checkmark {
+ .#{$prefix}--tile__checkmark {
top: calc(50% - 0.5rem);
}
- .bx--tile-content {
+ .#{$prefix}--tile-content {
display: flex;
align-items: center;
@@ -40,12 +40,12 @@ limitations under the License.
}
}
- .bx--tile:not(:last-child) {
+ .#{$prefix}--tile:not(:last-child) {
margin-bottom: 0.5rem;
}
}
- .bx--form-item + .bx--form-item {
+ .#{$prefix}--form-item + .#{$prefix}--form-item {
margin-top: 2rem;
}
}
diff --git a/src/containers/SideNav/SideNav.scss b/src/containers/SideNav/SideNav.scss
index 1e36fda4d..41102fe2b 100644
--- a/src/containers/SideNav/SideNav.scss
+++ b/src/containers/SideNav/SideNav.scss
@@ -1,5 +1,5 @@
/*
-Copyright 2019-2021 The Tekton Authors
+Copyright 2019-2023 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
@@ -11,35 +11,35 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-.bx--header ~ {
- nav.bx--side-nav {
+.#{$prefix}--header ~ {
+ nav.#{$prefix}--side-nav {
background-color: $gray-100;
border-color: $gray-80;
color: $gray-10;
- .bx--side-nav__items {
+ .#{$prefix}--side-nav__items {
display: flex;
flex-direction: column;
- .bx--side-nav__item {
+ .#{$prefix}--side-nav__item {
flex-shrink: 0;
}
- .bx--side-nav__item.bx--side-nav__item--icon
- + .bx--side-nav__item:not(.bx--side-nav__item--icon) {
+ .#{$prefix}--side-nav__item.#{$prefix}--side-nav__item--icon
+ + .#{$prefix}--side-nav__item:not(.#{$prefix}--side-nav__item--icon) {
display: flex;
flex-direction: column;
flex-grow: 1;
justify-content: flex-end;
}
- .bx--side-nav__item:last-child {
+ .#{$prefix}--side-nav__item:last-child {
margin-bottom: 1rem;
}
}
- .bx--side-nav__icon {
- &:not(.bx--side-nav__submenu-chevron) {
+ .#{$prefix}--side-nav__icon {
+ &:not(.#{$prefix}--side-nav__submenu-chevron) {
margin-right: 1rem;
}
@@ -48,17 +48,17 @@ limitations under the License.
}
}
- &:not(.bx--side-nav--expanded) {
- .bx--side-nav__submenu {
+ &:not(.#{$prefix}--side-nav--expanded) {
+ .#{$prefix}--side-nav__submenu {
padding: 0 .875rem;
}
- .bx--side-nav__icon:not(.bx--side-nav__submenu-chevron) > svg {
+ .#{$prefix}--side-nav__icon:not(.#{$prefix}--side-nav__submenu-chevron) > svg {
width: 1.25rem;
height: 1.25rem;
}
}
- .bx--side-nav__submenu {
+ .#{$prefix}--side-nav__submenu {
color: $gray-10;
&:focus {
@@ -69,61 +69,61 @@ limitations under the License.
background-color: $gray-90;
color: white;
- .bx--side-nav__icon > svg path {
+ .#{$prefix}--side-nav__icon > svg path {
fill: white;
}
}
}
- .bx--side-nav__item.bx--side-nav__item--icon {
+ .#{$prefix}--side-nav__item.#{$prefix}--side-nav__item--icon {
margin-bottom: 1rem;
- a.bx--side-nav__link {
+ a.#{$prefix}--side-nav__link {
padding-left: 3rem;
}
}
- .bx--side-nav__link {
+ .#{$prefix}--side-nav__link {
&:focus {
outline-color: white;
}
- .bx--side-nav__link-text {
+ .#{$prefix}--side-nav__link-text {
color: $gray-10;
}
- &:hover .bx--side-nav__link-text {
+ &:hover .#{$prefix}--side-nav__link-text {
color: white;
}
}
- .bx--side-nav__item--active {
- .bx--side-nav__submenu[aria-expanded=false] {
+ .#{$prefix}--side-nav__item--active {
+ .#{$prefix}--side-nav__submenu[aria-expanded=false] {
background-color: $gray-80;
}
- .bx--side-nav__submenu-title {
+ .#{$prefix}--side-nav__submenu-title {
color: $gray-10;
}
}
- .bx--side-nav__menu a.bx--side-nav__link--current,
- .bx--side-nav__menu a.bx--side-nav__link[aria-current=page] {
+ .#{$prefix}--side-nav__menu a.#{$prefix}--side-nav__link--current,
+ .#{$prefix}--side-nav__menu a.#{$prefix}--side-nav__link[aria-current=page] {
background-color: $gray-80;
}
- a.bx--side-nav__link[aria-current=page],
- a.bx--side-nav__link--current {
+ a.#{$prefix}--side-nav__link[aria-current=page],
+ a.#{$prefix}--side-nav__link--current {
background-color: $gray-90;
}
- .bx--side-nav__item:not(.bx--side-nav__item--active) > .bx--side-nav__link:hover > span,
- .bx--side-nav__item:not(.bx--side-nav__item--active) .bx--side-nav__menu-item > .bx--side-nav__link:hover > span {
+ .#{$prefix}--side-nav__item:not(.#{$prefix}--side-nav__item--active) > .#{$prefix}--side-nav__link:hover > span,
+ .#{$prefix}--side-nav__item:not(.#{$prefix}--side-nav__item--active) .#{$prefix}--side-nav__menu-item > .#{$prefix}--side-nav__link:hover > span {
color: white;
}
- .bx--side-nav__item:not(.bx--side-nav__item--active):hover .bx--side-nav__item:not(.bx--side-nav__item--active) > .bx--side-nav__submenu:hover,
- .bx--side-nav__item:not(.bx--side-nav__item--active) > .bx--side-nav__link:hover, .bx--side-nav__menu a.bx--side-nav__link:not(.bx--side-nav__link--current):not([aria-current=page]):hover,
- .bx--side-nav a.bx--header__menu-item:hover, .bx--side-nav .bx--header__menu-title[aria-expanded=true]:hover {
+ .#{$prefix}--side-nav__item:not(.#{$prefix}--side-nav__item--active):hover .#{$prefix}--side-nav__item:not(.#{$prefix}--side-nav__item--active) > .#{$prefix}--side-nav__submenu:hover,
+ .#{$prefix}--side-nav__item:not(.#{$prefix}--side-nav__item--active) > .#{$prefix}--side-nav__link:hover, .#{$prefix}--side-nav__menu a.#{$prefix}--side-nav__link:not(.#{$prefix}--side-nav__link--current):not([aria-current=page]):hover,
+ .#{$prefix}--side-nav a.#{$prefix}--header__menu-item:hover, .#{$prefix}--side-nav .#{$prefix}--header__menu-title[aria-expanded=true]:hover {
background-color: $gray-90;
color: white;
}
diff --git a/src/containers/TaskRun/TaskRun.jsx b/src/containers/TaskRun/TaskRun.jsx
index ec893022b..a83d9ba8f 100644
--- a/src/containers/TaskRun/TaskRun.jsx
+++ b/src/containers/TaskRun/TaskRun.jsx
@@ -31,6 +31,7 @@ import {
TaskTree
} from '@tektoncd/dashboard-components';
import {
+ getCarbonPrefix,
getStatus,
getStepDefinition,
getStepStatus,
@@ -61,6 +62,7 @@ import {
} from '../../api';
import NotFound from '../NotFound';
+const carbonPrefix = getCarbonPrefix();
const { STEP, RETRY, TASK_RUN_DETAILS, VIEW } = queryParamConstants;
export function TaskRunContainer() {
@@ -440,7 +442,7 @@ export function TaskRunContainer() {
actions={
showNotification.logsURL ? (
{intl.formatMessage({
diff --git a/src/scss/App.scss b/src/scss/App.scss
index 042061a9e..2ed57ef7a 100644
--- a/src/scss/App.scss
+++ b/src/scss/App.scss
@@ -72,12 +72,12 @@ a {
color: $link-01;
}
-.bx--btn.link-btn.bx--btn--ghost {
+.#{$prefix}--btn.link-btn.#{$prefix}--btn--ghost {
text-decoration: none;
}
-.bx--header ~ {
- .bx--content {
+.#{$prefix}--header ~ {
+ .#{$prefix}--content {
position: relative;
background-color: $ui-background;
transform: none;
@@ -94,29 +94,29 @@ a {
}
}
-.bx--modal-header,
-.bx--modal-content {
+.#{$prefix}--modal-header,
+.#{$prefix}--modal-content {
width: 100%;
}
-.bx--modal-content,
-.bx--modal-header {
+.#{$prefix}--modal-content,
+.#{$prefix}--modal-header {
padding-right: 1rem;
}
-.bx--modal-content {
+.#{$prefix}--modal-content {
margin-bottom: $spacing-07;
}
-.bx--data-table-container {
+.#{$prefix}--data-table-container {
margin-top: $spacing-07;
}
-.bx--table-header-label {
+.#{$prefix}--table-header-label {
white-space: nowrap;
}
-.bx--list--unordered {
+.#{$prefix}--list--unordered {
margin-top: 1rem;
}
@@ -137,6 +137,6 @@ a {
}
}
-.bx--overflow-menu-options:after {
+.#{$prefix}--overflow-menu-options:after {
display: none;
}
diff --git a/src/scss/Create.scss b/src/scss/Create.scss
index c90b7f387..b4cb44926 100644
--- a/src/scss/Create.scss
+++ b/src/scss/Create.scss
@@ -12,30 +12,30 @@ limitations under the License.
*/
.tkn--create {
- .bx--fieldset:not(:last-of-type) {
+ .#{$prefix}--fieldset:not(:last-of-type) {
margin-bottom: 0;
}
- .bx--form__helper-text {
+ .#{$prefix}--form__helper-text {
color: $text-05; // Since by default the contrast/colour choice is barely readable.
max-width: 100%;
}
- .bx--label--disabled {
+ .#{$prefix}--label--disabled {
color: $text-05;
}
- .bx--text-input__field-wrapper {
+ .#{$prefix}--text-input__field-wrapper {
width: 100%;
}
- .bx--list-box__wrapper,
- .bx--form-item {
+ .#{$prefix}--list-box__wrapper,
+ .#{$prefix}--form-item {
margin-bottom: $spacing-06;
max-width: 40rem;
}
- .bx--btn.bx--btn--secondary {
+ .#{$prefix}--btn.#{$prefix}--btn--secondary {
margin-left: $spacing-03;
}
}
diff --git a/src/scss/Definitions.scss b/src/scss/Definitions.scss
index eb3976b4e..defe518bb 100644
--- a/src/scss/Definitions.scss
+++ b/src/scss/Definitions.scss
@@ -1,5 +1,5 @@
/*
-Copyright 2019-2021 The Tekton Authors
+Copyright 2019-2023 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
@@ -18,14 +18,14 @@ limitations under the License.
}
main {
- .bx--data-table-header {
+ .#{$prefix}--data-table-header {
background-color: transparent !important;
}
- .bx--inline-notification {
+ .#{$prefix}--inline-notification {
max-width: 100%;
- .bx--inline-notification__text-wrapper {
+ .#{$prefix}--inline-notification__text-wrapper {
align-items: center;
}
}
diff --git a/src/scss/Triggers.scss b/src/scss/Triggers.scss
index 4b843c141..93d39cc76 100644
--- a/src/scss/Triggers.scss
+++ b/src/scss/Triggers.scss
@@ -29,14 +29,14 @@ limitations under the License.
margin-right: $spacing-02;
}
- .bx--link span {
+ .#{$prefix}--link span {
font-weight: normal;
}
}
.tkn--table {
- .bx--data-table-container {
- .bx--data-table {
+ .#{$prefix}--data-table-container {
+ .#{$prefix}--data-table {
.cell-description {
max-width: 30vw;
}
@@ -45,12 +45,12 @@ limitations under the License.
}
}
- .bx--snippet--multi {
+ .#{$prefix}--snippet--multi {
margin-top: $spacing-03
}
.tkn--trigger-details {
- .bx--list--unordered {
+ .#{$prefix}--list--unordered {
position: relative;
top: 2px;
}
@@ -62,7 +62,7 @@ limitations under the License.
padding: $spacing-05;
background-color: $ui-01;
- .bx--tag {
+ .#{$prefix}--tag {
margin-top: 0;
}