Skip to content
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
6 changes: 3 additions & 3 deletions packages/design-system/src/components/OcTable/OcTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -506,15 +506,15 @@ const handleSort = (field: FieldType) => {
}

&-hover tr:not(&-footer-row, &-header-row):hover {
background-color: var(--oc-role-secondary-container);
background-color: var(--oc-role-surface-container);
}

&-highlighted {
background-color: var(--oc-role-surface-container) !important;
background-color: var(--oc-role-secondary-container) !important;
}

&-accentuated {
background-color: var(--oc-role-surface-container);
background-color: var(--oc-role-secondary-container);
}

&-disabled {
Expand Down
10 changes: 6 additions & 4 deletions packages/web-pkg/src/components/FilesList/ResourceTile.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div
ref="observerTarget"
class="oc-tile-card oc-card oc-card-default"
class="oc-tile-card oc-card"
:data-item-id="resource.id"
:class="{
'oc-tile-card-selected': isResourceSelected,
Expand Down Expand Up @@ -196,8 +196,10 @@ if (!lazy) {
</script>

<style lang="scss">
.oc-tile-card.oc-card {
background-color: var(--oc-role-surface-container);
}
Comment on lines +199 to +201
Copy link
Contributor

Choose a reason for hiding this comment

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

Nothing for now because it has always been like this, but having non-scoped and therefore global css instructions for the oc-tile class here feels a bit odd, we should improve that some day.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's more to finetune on the technical side 😅 At this point it might also make sense to introduce an OcCard component, which then has a color prop for defining the background-color. We sometimes need that (most of the time we don't), and when we need it it always gets hacky.

.oc-tile-card {
background-color: var(--oc-role-surface-container) !important;
box-shadow: none;
height: 100%;
display: flex;
Expand Down Expand Up @@ -267,10 +269,10 @@ if (!lazy) {
}
}
&:hover {
background-color: var(--oc-role-secondary-container) !important;
background-color: var(--oc-role-surface-container-highest);
}
&-selected {
background-color: var(--oc-role-surface-container-high) !important;
background-color: var(--oc-role-secondary-container) !important;
outline: 2px solid var(--oc-role-outline);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`OcTile component > renders default space correctly 1`] = `
"<div class="oc-tile-card oc-card oc-card-default">
"<div class="oc-tile-card oc-card">
<resource-link-stub resource="[object Object]" isresourceclickable="true" class="oc-card-media-top oc-flex oc-flex-center oc-flex-middle oc-m-rm" tabindex="-1">
<div class="oc-tile-card-selection"></div>
<!--v-if-->
Expand All @@ -26,7 +26,7 @@ exports[`OcTile component > renders default space correctly 1`] = `
`;

exports[`OcTile component > renders disabled space correctly 1`] = `
"<div class="oc-tile-card oc-card oc-card-default oc-tile-card-disabled">
"<div class="oc-tile-card oc-card oc-tile-card-disabled">
<resource-link-stub resource="[object Object]" isresourceclickable="true" class="oc-card-media-top oc-flex oc-flex-center oc-flex-middle oc-m-rm" tabindex="-1">
<div class="oc-tile-card-selection"></div>
<!--v-if-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports[`ResourceTiles component > renders an array of spaces correctly 1`] = `
</div>
<ul class="oc-list oc-my-rm oc-mx-rm oc-tiles">
<li class="oc-tiles-item has-item-context-menu">
<div class="oc-tile-card oc-card oc-card-default" data-item-id="1" draggable="false"><a attrs="[object Object]" target="_self" draggable="false" class="oc-resource-link oc-card-media-top oc-flex oc-flex-center oc-flex-middle oc-m-rm" no-hover="" tabindex="-1"></a>
<div class="oc-tile-card oc-card" data-item-id="1" draggable="false"><a attrs="[object Object]" target="_self" draggable="false" class="oc-resource-link oc-card-media-top oc-flex oc-flex-center oc-flex-middle oc-m-rm" no-hover="" tabindex="-1"></a>
<div class="oc-card-body oc-p-s">
<div class="oc-flex oc-flex-between oc-flex-middle">
<div class="oc-flex oc-flex-middle oc-text-truncate resource-name-wrapper">
Expand Down Expand Up @@ -49,7 +49,7 @@ exports[`ResourceTiles component > renders an array of spaces correctly 1`] = `
</div>
</li>
<li class="oc-tiles-item has-item-context-menu">
<div class="oc-tile-card oc-card oc-card-default" data-item-id="2" draggable="false"><a attrs="[object Object]" target="_self" draggable="false" class="oc-resource-link oc-card-media-top oc-flex oc-flex-center oc-flex-middle oc-m-rm" no-hover="" tabindex="-1"></a>
<div class="oc-tile-card oc-card" data-item-id="2" draggable="false"><a attrs="[object Object]" target="_self" draggable="false" class="oc-resource-link oc-card-media-top oc-flex oc-flex-center oc-flex-middle oc-m-rm" no-hover="" tabindex="-1"></a>
<div class="oc-card-body oc-p-s">
<div class="oc-flex oc-flex-between oc-flex-middle">
<div class="oc-flex oc-flex-middle oc-text-truncate resource-name-wrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export default defineComponent({
#nav-highlighter {
position: absolute;
border-radius: 5px;
background: var(--oc-role-surface);
background: var(--oc-role-secondary-container);
transition: transform 0.2s cubic-bezier(0.51, 0.06, 0.56, 1.37);
color: var(--oc-role-on-surface);
svg {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<oc-button
:type="handler ? 'button' : 'router-link'"
:appearance="active ? 'filled' : 'raw-inverse'"
:color-role="active ? 'surface' : 'secondaryContainer'"
color-role="secondaryContainer"
:class="['oc-sidebar-nav-item-link', 'oc-oc-width-1-1', { active: active }]"
:data-nav-id="index"
:data-nav-name="navName"
Expand Down Expand Up @@ -124,7 +124,7 @@ export default defineComponent({

&:focus:not(.active),
&:hover:not(.active) {
background: var(--oc-role-secondary-container) !important;
background: var(--oc-role-surface-container-highest) !important;
}

.oc-icon svg {
Expand Down