wip: refactor margin bottom management in caption title

This commit is contained in:
Yohan Boniface 2024-06-11 19:35:11 +02:00
parent 3f6940cd5b
commit 017e407758
3 changed files with 18 additions and 5 deletions

View file

@ -60,6 +60,21 @@ kbd {
display: inline-block;
white-space: nowrap;
}
h3 {
font-size: 1.2rem;
}
h4 {
font-size: 1.1rem;
}
hgroup > * {
margin-bottom: 0;
}
hgroup {
margin-bottom: var(--box-space);
}
hgroup > :not(:first-child):last-child {
font-weight: normal;
}
/*
* List

View file

@ -18,8 +18,9 @@ export default class Caption {
open() {
const container = DomUtil.create('div', 'umap-caption')
DomUtil.createTitle(container, this.map.options.name, 'icon-caption icon-block')
this.map.permissions.addOwnerLink('h5', container)
const hgroup = DomUtil.element({tagName: 'hgroup', parent: container})
DomUtil.createTitle(hgroup, this.map.options.name, 'icon-caption icon-block')
this.map.permissions.addOwnerLink('h4', hgroup)
if (this.map.options.description) {
const description = DomUtil.element({
tagName: 'div',

View file

@ -987,9 +987,6 @@ a.umap-control-caption,
.datalayer-name {
cursor: pointer;
}
.umap-caption h3 {
margin-bottom: 0;
}
.umap-caption .umap-map-owner {
padding-left: 31px;
}