elements. The difference comes
+// down to the fact that .dl-horizontal uses a CSS grid, while other
+// elements use flexbox.
.dl-horizontal {
- dt {
- @include text-overflow-ellipsis;
- flex-shrink: 0;
- width: 160px;
- }
+ $padding-between: 10px;
+ $dt-width: 160px + $padding-panel-body + $padding-between;
+
+ display: grid;
+ // Components may override grid-template-columns in order to adjust the width
+ // of the - .
+ grid-template-columns: $dt-width 1fr;
+
+ dt { padding-left: $padding-panel-body; }
+ dd { padding-right: $padding-panel-body; }
- dd { margin-left: 20px; }
+ // Equally distribute the padding between the
- and the
- so that it is
+ // easy for components to give the two elements the same width.
+ dt { padding-right: $padding-between; }
+ dd { padding-left: $padding-between; }
}
.dfn { border-bottom: 2px dotted #999; }
diff --git a/src/components/entity/upload/header-errors.vue b/src/components/entity/upload/header-errors.vue
index 389fc8c57..cfa7ec9a4 100644
--- a/src/components/entity/upload/header-errors.vue
+++ b/src/components/entity/upload/header-errors.vue
@@ -11,38 +11,42 @@ except according to the terms contained in the LICENSE file.
-->
+
+
+
@@ -108,20 +112,18 @@ const formattedDelimiter = computed(() => formatCSVDelimiter(props.delimiter));
#entity-upload-header-errors {
margin-bottom: 0;
- div {
- padding-left: $padding-panel-body;
- padding-right: $padding-panel-body;
- }
-
.csv-header {
@include line-clamp(3);
font-family: $font-family-monospace;
overflow-x: auto;
white-space: break-spaces;
}
+ dd:has(.csv-header) { overflow-x: hidden; }
}
-#entity-upload-header-errors-suggestions {
+#entity-upload-header-errors-filename { @include text-overflow-ellipsis; }
+
+.entity-upload-header-errors-suggestions {
color: $color-danger;
p:last-child { margin-bottom: 0; }
diff --git a/test/components/entity/upload/header-errors.spec.js b/test/components/entity/upload/header-errors.spec.js
index c3bb36c1b..d91258b5c 100644
--- a/test/components/entity/upload/header-errors.spec.js
+++ b/test/components/entity/upload/header-errors.spec.js
@@ -36,7 +36,7 @@ describe('EntityUploadHeaderErrors', () => {
describe('suggestions', () => {
const getSuggestion = (component) => {
- const p = component.findAll('#entity-upload-header-errors-suggestions p');
+ const p = component.findAll('.entity-upload-header-errors-suggestions p');
p.length.should.equal(1);
return p[0];
};
@@ -48,7 +48,7 @@ describe('EntityUploadHeaderErrors', () => {
const component = mountComponent({
props: { header: 'label', missingProperty: true }
});
- component.find('#entity-upload-header-errors-suggestions').exists().should.be.false;
+ component.find('.entity-upload-header-errors-suggestions').exists().should.be.false;
});
describe('delimiter is not a comma', () => {