Skip to content

Commit

Permalink
feat(web-stack): replace components CSS color variables with new ones (
Browse files Browse the repository at this point in the history
…#7984)

Replace legacy CSS colors variables in components with new ones created by #7973
  • Loading branch information
OlivierFL authored Sep 17, 2024
1 parent 04f3a09 commit 5e11547
Show file tree
Hide file tree
Showing 125 changed files with 583 additions and 582 deletions.
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ useUnreachableHosts()
overflow: auto;
flex: 1;
height: calc(100vh - 5.5rem);
background-color: var(--background-color-secondary);
background-color: var(--color-neutral-background-secondary);
&.no-ui {
height: 100vh;
Expand Down
12 changes: 6 additions & 6 deletions @xen-orchestra/lite/src/components/AccountButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ const openSettings = () => router.push({ name: 'settings' })
display: flex;
align-items: center;
padding: 1rem;
color: var(--color-grey-100);
color: var(--color-neutral-txt-primary);
border: none;
border-radius: 0.8rem;
background-color: var(--background-color-secondary);
background-color: var(--color-neutral-background-secondary);
gap: 0.8rem;
&:disabled {
color: var(--color-grey-500);
color: var(--color-neutral-border);
}
&:not(:disabled) {
Expand All @@ -67,12 +67,12 @@ const openSettings = () => router.push({ name: 'settings' })
&:hover,
&:active,
&.active {
background-color: var(--background-color-primary);
background-color: var(--color-neutral-background-primary);
}
&:active,
&.active {
color: var(--color-purple-base);
color: var(--color-normal-txt-base);
}
}
}
Expand All @@ -86,6 +86,6 @@ const openSettings = () => router.push({ name: 'settings' })
}
.menu-item-logout {
color: var(--color-red-base);
color: var(--color-danger-txt-base);
}
</style>
4 changes: 2 additions & 2 deletions @xen-orchestra/lite/src/components/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const { trigger: navigationTrigger } = storeToRefs(navigationStore)
justify-content: space-between;
height: 5.5rem;
padding: 1rem;
border-bottom: 0.1rem solid var(--color-grey-500);
background-color: var(--background-color-secondary);
border-bottom: 0.1rem solid var(--color-neutral-border);
background-color: var(--color-neutral-background-secondary);
img {
width: 4rem;
Expand Down
8 changes: 4 additions & 4 deletions @xen-orchestra/lite/src/components/AppLogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ async function handleSubmit() {
justify-content: center;
min-height: 100vh;
max-width: 100vw;
background-color: var(--background-color-primary);
background-color: var(--color-neutral-background-primary);
}
form {
Expand All @@ -131,10 +131,10 @@ form {
justify-content: center;
margin: 0 auto;
padding: 8.5rem;
background-color: var(--background-color-secondary);
background-color: var(--color-neutral-background-secondary);
.error {
color: var(--color-red-base);
color: var(--color-danger-txt-base);
}
}
Expand All @@ -155,7 +155,7 @@ input {
max-width: 100%;
margin-bottom: 1rem;
padding: 1rem 1.5rem;
border: 1px solid var(--color-grey-500);
border: 1px solid var(--color-neutral-border);
border-radius: 0.8rem;
background-color: white;
}
Expand Down
12 changes: 6 additions & 6 deletions @xen-orchestra/lite/src/components/AppMarkdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ useEventListener(
}
code:not(.hljs-code) {
background-color: var(--background-color-purple-10);
background-color: var(--color-normal-background-selected);
padding: 0.3rem 0.6rem;
border-radius: 0.6rem;
}
Expand All @@ -81,12 +81,12 @@ useEventListener(
}
thead th {
border-bottom: 2px solid var(--color-grey-500);
background-color: var(--background-color-secondary);
border-bottom: 2px solid var(--color-neutral-border);
background-color: var(--color-neutral-background-secondary);
}
tbody td {
border-bottom: 1px solid var(--color-grey-500);
border-bottom: 1px solid var(--color-neutral-border);
}
}
Expand All @@ -103,11 +103,11 @@ useEventListener(
background-color: transparent;
&:hover {
color: var(--color-purple-base);
color: var(--color-normal-txt-base);
}
&:active {
color: var(--color-purple-d20);
color: var(--color-normal-txt-hover);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions @xen-orchestra/lite/src/components/AppNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ whenever(isOpen, () => {
max-width: 37rem;
height: calc(100vh - 5.5rem);
padding: 0.5rem;
border-right: 1px solid var(--color-grey-500);
background-color: var(--background-color-primary);
border-right: 1px solid var(--color-neutral-border);
background-color: var(--color-neutral-background-primary);
&.collapsible {
position: fixed;
Expand Down
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/components/CollectionFilterRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const valueInputAfter = computed(() => (newFilter.value.builder.comparison === '
.collection-filter-row {
display: flex;
align-items: center;
border-bottom: 1px solid var(--background-color-secondary);
border-bottom: 1px solid var(--color-neutral-background-secondary);
gap: 1rem;
.or {
Expand Down
14 changes: 7 additions & 7 deletions @xen-orchestra/lite/src/components/FormWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ const isIcon = (maybeIcon: any): maybeIcon is IconDefinition => typeof maybeIcon
align-items: stretch;
overflow: hidden;
padding: 0 0.7rem;
border: 1px solid var(--color-grey-500);
border: 1px solid var(--color-neutral-border);
border-radius: 0.8rem;
background-color: var(--color-grey-600);
background-color: var(--color-normal-txt-item);
box-shadow: var(--shadow-100);
gap: 0.1rem;
&:focus-within {
outline: 1px solid var(--color-purple-l40);
outline: 1px solid var(--color-normal-item-active);
}
}
Expand All @@ -71,7 +71,7 @@ const isIcon = (maybeIcon: any): maybeIcon is IconDefinition => typeof maybeIcon
}
.form-widget:hover .widget {
border-color: var(--color-purple-l60);
border-color: var(--color-normal-item-disabled);
}
.element {
Expand All @@ -93,8 +93,8 @@ const isIcon = (maybeIcon: any): maybeIcon is IconDefinition => typeof maybeIcon
font-size: inherit;
border: none;
outline: none;
color: var(--color-grey-100);
background-color: var(--color-grey-600);
color: var(--color-neutral-txt-primary);
background-color: var(--color-normal-txt-item);
flex: 1;
&:disabled {
Expand Down Expand Up @@ -134,7 +134,7 @@ const isIcon = (maybeIcon: any): maybeIcon is IconDefinition => typeof maybeIcon
&:disabled {
cursor: not-allowed;
color: var(--color-grey-200);
color: var(--color-neutral-txt-secondary);
}
}
</style>
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/components/LoginError.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ defineProps<{
<style lang="postcss" scoped>
.error {
margin: 0.5rem 0;
color: var(--color-red-base);
color: var(--color-danger-txt-base);
& svg {
margin-right: 0.5rem;
Expand Down
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/components/NoDataError.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
margin: auto;
width: 8em;
font-style: normal;
color: var(--color-red-base);
color: var(--color-danger-txt-base);
}
</style>
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/components/NoResult.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
font-weight: 500;
font-size: 2rem;
line-height: 150%;
color: var(--color-purple-base);
color: var(--color-normal-txt-base);
}
</style>
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/components/ObjectLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const objectRoute = computed(() => {

<style lang="postcss" scoped>
.unknown {
color: var(--color-grey-300);
color: var(--color-neutral-txt-secondary);
font-style: italic;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const isRecordNotFound = computed(() => props.isReady && !props.uuidChecker(id.v
}
.spinner {
color: var(--color-purple-base);
color: var(--color-normal-txt-base);
display: flex;
margin: auto;
width: 10rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import UiStatusPanel from '@/components/ui/UiStatusPanel.vue'

<style lang="postcss" scoped>
.contact {
color: var(--color-grey-100);
color: var(--color-neutral-txt-primary);
& a {
text-transform: lowercase;
Expand Down
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/components/PoolOverrideWarning.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const masterSessionStorage = useSessionStorage('master', null)

<style lang="postcss" scoped>
.warning-not-current-pool {
color: var(--color-orange-base);
color: var(--color-warning-txt-base);
cursor: pointer;
.wrapper {
Expand Down
8 changes: 4 additions & 4 deletions @xen-orchestra/lite/src/components/PowerStateIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ const className = computed(() => `state-${props.state.toLocaleLowerCase()}`)

<style lang="postcss" scoped>
.power-state-icon {
color: var(--color-purple-d60);
color: var(--color-normal-txt-item);
&.state-running {
color: var(--color-green-base);
color: var(--color-success-txt-base);
}
&.state-paused {
color: var(--color-grey-300);
color: var(--color-neutral-txt-secondary);
}
&.state-suspended {
color: var(--color-purple-d20);
color: var(--color-normal-txt-hover);
}
}
</style>
6 changes: 3 additions & 3 deletions @xen-orchestra/lite/src/components/ProgressCircle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const progress = computed(() => {
.progress-circle-fill {
animation: progress 1s ease-out forwards;
fill: none;
stroke: var(--color-green-base);
stroke: var(--color-success-txt-base);
stroke-width: 1.2;
stroke-linecap: round;
stroke-dasharray: v-bind(progress), 100;
Expand All @@ -48,13 +48,13 @@ const progress = computed(() => {
.progress-circle-background {
fill: none;
stroke-width: 1.2;
stroke: var(--color-grey-500);
stroke: var(--color-neutral-border);
}
.progress-circle-text {
font-size: 0.7rem;
font-weight: bold;
fill: var(--color-green-base);
fill: var(--color-success-txt-base);
text-anchor: middle;
alignment-baseline: middle;
}
Expand Down
8 changes: 4 additions & 4 deletions @xen-orchestra/lite/src/components/TitleBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ defineProps<{
align-items: center;
height: 6rem;
padding: 0 1.5rem;
border-bottom: 1px solid var(--color-grey-500);
background-color: var(--background-color-primary);
border-bottom: 1px solid var(--color-neutral-border);
background-color: var(--color-neutral-background-primary);
gap: 0.8rem;
}
.icon {
font-size: 2.5rem;
color: var(--color-purple-base);
color: var(--color-normal-txt-base);
}
.title {
color: var(--color-grey-100);
color: var(--color-neutral-txt-primary);
}
.actions {
Expand Down
14 changes: 7 additions & 7 deletions @xen-orchestra/lite/src/components/UsageBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,28 +60,28 @@ const computedData = computed(() => {
}
.progress-item:nth-child(1) {
--progress-bar-color: var(--color-purple-d60);
--progress-bar-color: var(--color-normal-txt-item);
}
.progress-item:nth-child(2) {
--progress-bar-color: var(--color-purple-d40);
--progress-bar-color: var(--color-normal-txt-active);
}
.progress-item:nth-child(3) {
--progress-bar-color: var(--color-purple-d20);
--progress-bar-color: var(--color-normal-txt-hover);
}
.progress-item {
--progress-bar-height: 1.2rem;
--progress-bar-color: var(--color-purple-l20);
--progress-bar-background-color: var(--color-grey-500);
--progress-bar-color: var(--color-normal-item-hover);
--progress-bar-background-color: var(--color-neutral-border);
&.warning {
--progress-bar-color: var(--color-orange-base);
--progress-bar-color: var(--color-warning-txt-base);
}
&.error {
--progress-bar-color: var(--color-red-base);
--progress-bar-color: var(--color-danger-txt-base);
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
th,
td {
padding: 0.3rem 0.6rem;
border-bottom: 0.1rem solid var(--color-grey-500);
border-bottom: 0.1rem solid var(--color-neutral-border);
vertical-align: center;
}
&:nth-child(odd) {
background-color: var(--background-color-purple-10);
background-color: var(--color-normal-background-selected);
}
}
Expand Down
Loading

0 comments on commit 5e11547

Please sign in to comment.