diff --git a/umap/static/umap/base.css b/umap/static/umap/base.css index 048b7602..bd9c7a28 100644 --- a/umap/static/umap/base.css +++ b/umap/static/umap/base.css @@ -119,13 +119,13 @@ dt { margin-bottom: 2rem; } .col { - float: left; + float: inline-start; } .right { float: right; } .col + .col { - padding-left: 20px; + padding-inline-start: 20px; } .half { width: 50%; @@ -143,7 +143,7 @@ dt { width: 100%; } .col + .wide { - padding-left: inherit; + padding-inline-start: inherit; } .mshow, .tshow { display: none; @@ -186,7 +186,7 @@ input[type="range"] { width: 100%; } input[type="radio"] { - margin-right: var(--text-margin); + margin-inline-end: var(--text-margin); } input[type="checkbox"] { margin: 0 var(--text-margin); @@ -272,7 +272,7 @@ button.flat, border: none; background-color: inherit; padding: 0; - text-align: left; + text-align: start; min-height: inherit; width: initial; display: initial; @@ -356,8 +356,8 @@ input:invalid { } details { margin-bottom: 5px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; + border-start-start-radius: 4px; + border-start-end-radius: 4px; } .dark details { border: 1px solid #222; @@ -392,7 +392,7 @@ fieldset legend { } [data-badge]:after { position: absolute; - right: -6px; + inset-inline-end: -6px; top: -6px; min-width: 8px; min-height: 8px; @@ -417,7 +417,7 @@ input.switch:empty { input.switch:empty ~ label { white-space: nowrap; position: relative; - float: left; + float: inline-start; line-height: 2em; height: 2em; text-indent: 6em; @@ -436,7 +436,7 @@ input.switch:empty ~ label:after { display: block; top: 0; bottom: 0; - left: 0; + inset-inline-start: 0; content: ' '; width: 6em; -webkit-transition: all 100ms ease-in; @@ -451,7 +451,7 @@ input.switch:empty ~ label:after { } input.switch:empty ~ label:after { width: 3em; - margin-left: 0.1em; + margin-inline-start: 0.1em; background-color: #ededed; content: "OFF"; text-indent: 3.5em; @@ -472,7 +472,7 @@ input.switch:checked ~ label:before { color: var(--color-darkGray); content: "ON"; text-indent: 0.7em; - text-align: left; + text-align: start; font-weight: bold; } .dark input.switch:checked ~ label:before { @@ -480,7 +480,7 @@ input.switch:checked ~ label:before { background-color: var(--color-accent); } input.switch:checked ~ label:after { - margin-left: 3em; + margin-inline-start: 3em; } .button-bar, .umap-multiplechoice { margin-top: 5px; @@ -552,21 +552,21 @@ input.switch:checked ~ label:after { .umap-field-iconUrl .action-button, .inheritable .define, .inheritable .undefine { - float: right; + float: inline-end; width: initial; min-height: 18px; line-height: 18px; margin-bottom: 0; } .inheritable .quick-actions { - float: right; + float: inline-end; } .inheritable .quick-actions .formbox { margin-bottom: 0; } .inheritable .quick-actions input { width: 100px; - margin-right: 5px; + margin-inline-end: 5px; } .inheritable .define, .inheritable.undefined .undefine, @@ -581,7 +581,7 @@ i.info { background-image: url('./img/16.svg'); background-position: -170px -50px; display: inline-block; - margin-left: 5px; + margin-inline-start: 5px; vertical-align: middle; width: 16px; height: 18px; @@ -592,7 +592,6 @@ i.info { .with-transition { transition: all .7s; } - .umap-delete:before, .umap-empty:before, .umap-to-polygon:before, .umap-clone:before, .umap-edit:before, .umap-download:before, .umap-to-polyline:before { @@ -614,25 +613,19 @@ i.info { vertical-align: middle; } .umap-to-polygon:before { - background-position: -80px -48px; + background-position: -72px -42px; } .umap-to-polyline:before { - background-position: -110px -42px; + background-position: -106px -42px; } .umap-clone:before { - background-position: -150px -78px; -} -.umap-delete:before { - background-position: -32px -8px; -} -.umap-edit:before { - background-position: -6px -6px; + background-position: -144px -78px; } .umap-empty:before { - background-position: -110px -78px; + background-position: -108px -78px; } .umap-download:before { - background-position: -77px -78px; + background-position: -72px -78px; } .permissions-panel, .umap-upload, @@ -711,7 +704,7 @@ i.info { .umap-pictogram-choice .leaflet-marker-icon { bottom: 0; - left: 30px; + inset-inline-start: 30px; position: absolute; } .umap-color-picker { @@ -727,14 +720,14 @@ i.info { padding: 0; margin: 0; cursor: pointer; - float: left; + float: inline-start; } input.blur { width: calc(100% - 40px); display: inline-block; vertical-align: middle; - border-top-right-radius: 0; - border-bottom-right-radius: 0; + border-start-end-radius: 0; + border-end-end-radius: 0; } .blur + .button:before, .blur + [type="button"]:before { @@ -747,8 +740,8 @@ input.blur { display: inline-block; vertical-align: middle; line-height: 18px; - border-top-left-radius: 0; - border-bottom-left-radius: 0; + border-start-start-radius: 0; + border-end-start-radius: 0; box-sizing: border-box; } input[type=hidden].blur + .button, @@ -763,9 +756,7 @@ input[type=hidden].blur + [type="button"] { border-radius: initial; } .copiable-input button { - background-repeat: no-repeat; - background-image: url('./img/16.svg'); - background-position: -141px -140px; + background-position: -46px -92px; display: inline; padding: 0 10px; height: 32px; diff --git a/umap/static/umap/content.css b/umap/static/umap/content.css index 12122b04..04cc8946 100644 --- a/umap/static/umap/content.css +++ b/umap/static/umap/content.css @@ -50,7 +50,7 @@ body.login header { background-size: 92px 92px; height: 92px; width: 92px; - margin-right: 10px; + margin-inline-end: 10px; } .login-grid .login-github { background-image: url("./github.png"); @@ -107,7 +107,7 @@ body.login header { .umap-features-list li:before { content: "✔"; color: #323E56; - padding-right: 5px; + padding-inline-end: 5px; } .summary { background-color: #eee; @@ -135,7 +135,7 @@ h2.section { h2.tabs { text-transform: uppercase; color: var(--color-darkBlue); - text-align: left; + text-align: start; padding-top: 28px; } h2.tabs a { @@ -144,13 +144,14 @@ h2.tabs a { text-decoration-thickness: 3px; text-decoration-skip-ink: none; text-underline-offset: 7px; - margin-right: 2rem; + margin-inline-end: 2rem; + display: inline-block; } h2.tabs a:not(.selected) { font-weight: normal; color: var(--color-darkBlue); text-decoration: none; - margin-right: 0; + margin-inline-end: 0; } h2.tabs a:hover { text-decoration: underline; @@ -278,7 +279,7 @@ ul.umap-autocomplete { } .umap-singleresult div .close, .umap-multiresult li .close { - float: right; + float: inline-end; cursor: pointer; } @@ -358,6 +359,11 @@ ul.umap-autocomplete { .content .icon-delete { background-image: url('./img/icon-delete.svg'); } +html[dir="rtl"] .content .icon-edit, +html[dir="rtl"] .content .icon-share, +html[dir="rtl"] .content .icon-delete { + background-position: initial; /* this takes precedence over similar selector in icon.css and fixes position */ +} .table-header { display: flex; justify-content: space-between; @@ -427,8 +433,8 @@ ul.umap-autocomplete { .table-wrapper table thead tr th, .table-wrapper table th[scope="row"] { color: var(--color-darkBlue); - text-align: left; - padding-left: 2px; + text-align: start; + padding-inline-start: 2px; } .table-wrapper table thead tr th { line-height: 1.2; @@ -525,7 +531,7 @@ dialog::backdrop { } .twide { width: 100%; - padding-left: 0!important; + padding-inline-start: 0!important; } .tthird { width: 33.3333%; @@ -542,7 +548,7 @@ dialog::backdrop { } @media only screen and (max-width: 639px) { .mwide { - padding-left: 0!important; + padding-inline-start: 0!important; width: 100%; } .mwide + .mwide { diff --git a/umap/static/umap/css/icon.css b/umap/static/umap/css/icon.css index fb22329f..9375b54d 100644 --- a/umap/static/umap/css/icon.css +++ b/umap/static/umap/css/icon.css @@ -2,9 +2,8 @@ .icon { background-repeat: no-repeat; display: inline-block; - padding: 0 10px; vertical-align: middle; - /* Reste default style, in case we apply this class on a button element */ + /* Reset default style, in case we apply this class on a button element */ border: none; background-color: initial; } @@ -12,115 +11,143 @@ background-image: url('../img/16.svg'); height: 24px; line-height: 24px; + width: 24px; + --tile: -24px; +} +.icon-24 { + background-image: url('../img/24.svg'); + --tile: -36px; + margin-inline-start: -6px; + height: 36px; + line-height: 36px; + width: 36px; } .icon + span { - margin-left: 10px; + margin-inline-start: 10px; +} +html[dir="rtl"] .icon { + transform: scaleX(-1); } .icon-block { display: block; - float: left; - margin-right: 10px; + float: inline-start; + margin-inline-end: 10px; } .icon-block + span { - margin-left: 0; + margin-inline-start: 0; } .dark .icon-16 { background-image: url('../img/16-white.svg'); } +.dark .icon-24 { + background-image: url('../img/24-white.svg'); +} .icon-add { - background-position: -26px -24px; + background-position: var(--tile) var(--tile); } .icon-back { - background-position: -122px -144px; + background-position: calc(var(--tile) * 5) calc(var(--tile) * 6); +} +.icon-backup { + background-position: var(--tile) calc(var(--tile) * 6); } .icon-caption { - background-position: -98px -24px; + background-position: calc(var(--tile) * 4) var(--tile); } .icon-close { - background-position: -26px 0px; + background-position: var(--tile) 0px; +} +.icon-copy { + background-position: calc(var(--tile) * 2) calc(var(--tile) * 4); } .icon-delete { - background-position: -121px -49px; + background-position: calc(var(--tile) * 5) calc(var(--tile) * 2); } .readonly .icon-delete, .off .icon-delete { - background-position: -121px -122px; + background-position: calc(var(--tile) * 5) calc(var(--tile) * 5); +} +.icon-download { + background-position: 0 calc(var(--tile) * 6); } .icon-drag { - background-position: -72px -73px; + background-position: calc(var(--tile) * 3) calc(var(--tile) * 3); cursor: move; - float: right; + float: inline-end; } .icon-eye { - background-position: -49px -26px; + background-position: calc(var(--tile) * 2) var(--tile); } .off .icon-eye { - background-position: -73px -26px; + background-position: calc(var(--tile) * 3) var(--tile); } .icon-edit { - background-position: -51px -49px; + background-position: calc(var(--tile) * 2) calc(var(--tile) * 2); } .off .icon-edit { - background-position: -51px -73px; + background-position: calc(var(--tile) * 2) calc(var(--tile) * 3); } .icon-filters { - background-position: -4px -24px; + background-position: 0px var(--tile); +} +.icon-forward { + background-position: calc(var(--tile) * 6) calc(var(--tile) * 6); } .icon-key { - background-position: -144px -121px; + background-position: calc(var(--tile) * 6) calc(var(--tile) * 5); } .icon-layers { - background-position: -96px -120px; + background-position: calc(var(--tile) * 4) calc(var(--tile) * 5); } .icon-list { - background-position: -28px -99px; + background-position: var(--tile) calc(var(--tile) * 4); } .icon-marker { - background-position: -72px -120px; + background-position: calc(var(--tile) * 3) calc(var(--tile) * 5); } .icon-polygon { - background-position: -24px -119px; + background-position: var(--tile) calc(var(--tile) * 5); } .icon-polyline { - background-position: 0 -119px; + background-position: 0 calc(var(--tile) * 5); } .icon-resize { - background-position: -74px -144px; + background-position: calc(var(--tile) * 3) calc(var(--tile) * 6); } .icon-restore { - background-position: -121px -74px; + background-position: calc(var(--tile) * 5) calc(var(--tile) * 3); } .expanded .icon-resize { - background-position: -50px -144px; + background-position: calc(var(--tile) * 2) calc(var(--tile) * 6); } .icon-search { - background-position: -27px -120px; + background-position: var(--tile) calc(var(--tile) * 5); } .icon-settings { - background-position: -23px -97px; + background-position: var(--tile) calc(var(--tile) * 4); } .icon-share { - background-position: 0px -120px; + background-position: 0px calc(var(--tile) * 5); } .icon-table { - background-position: -50px -1px; + background-position: calc(var(--tile) * 2) 0px; } .readonly .icon-table, .off .icon-table { - background-position: -74px -1px; + background-position: calc(var(--tile) * 3) 0px; } .remotelayer .icon-table { display: none !important; } .icon-tilelayer { - background-position: -98px -141px; + background-position: calc(var(--tile) * 4) calc(var(--tile) * 6); } .icon-upload { - background-position: -144px -97px; + background-position: calc(var(--tile) * 6) calc(var(--tile) * 4); } .icon-zoom { - background-position: -1px -49px; + background-position: 0px calc(var(--tile) * 2); } .off .icon-zoom { - background-position: -25px -49px; + background-position: var(--tile) calc(var(--tile) * 2); } diff --git a/umap/static/umap/css/importers.css b/umap/static/umap/css/importers.css index f4a265c4..50f7c1b8 100644 --- a/umap/static/umap/css/importers.css +++ b/umap/static/umap/css/importers.css @@ -21,7 +21,7 @@ width: 36px; height: 36px; display: inline-block; - margin-right: 10px; + margin-inline-end: 10px; background-size: 100%; vertical-align: -10px; } diff --git a/umap/static/umap/css/slideshow.css b/umap/static/umap/css/slideshow.css index 795c77da..c5084ccd 100644 --- a/umap/static/umap/css/slideshow.css +++ b/umap/static/umap/css/slideshow.css @@ -1,6 +1,6 @@ .umap-slideshow-toolbox { position: absolute; - right: 0; + inset-inline-end: 0; top: 0; display: none; } @@ -20,7 +20,7 @@ text-align: center; } .umap-slideshow-toolbox li + li { - border-left: 1px solid var(--color-light); + border-inline-start: 1px solid var(--color-light); } .umap-slideshow-toolbox li:hover { background-color: var(--color-mediumGray); @@ -28,8 +28,8 @@ .umap-slideshow-active .umap-slideshow-toolbox .play, .umap-slideshow-toolbox .play { width: calc(var(--footer-height) * 3); - text-align: left; - padding-left: 20px; + text-align: start; + padding-inline-start: 20px; } .umap-slideshow-toolbox .play:after { content: '⏯︎'; @@ -40,9 +40,11 @@ .umap-slideshow-toolbox .stop:before { content: '⏹'; } +html[dir="rtl"] .umap-slideshow-toolbox .prev:before, .umap-slideshow-toolbox .next:before { content: '⏵︎'; } +html[dir="rtl"] .umap-slideshow-toolbox .next:before, .umap-slideshow-toolbox .prev:before { content: '⏴︎'; } diff --git a/umap/static/umap/img/16-white.svg b/umap/static/umap/img/16-white.svg index 927c7028..8c60cbc3 100644 --- a/umap/static/umap/img/16-white.svg +++ b/umap/static/umap/img/16-white.svg @@ -34,9 +34,6 @@ - - -   @@ -44,7 +41,6 @@ - @@ -192,5 +188,6 @@ + diff --git a/umap/static/umap/img/16.svg b/umap/static/umap/img/16.svg index d30369be..7662fcc6 100644 --- a/umap/static/umap/img/16.svg +++ b/umap/static/umap/img/16.svg @@ -30,9 +30,6 @@ - - - @@ -43,7 +40,6 @@ - @@ -52,7 +48,6 @@ - @@ -175,8 +170,9 @@ - + + diff --git a/umap/static/umap/img/source/16-white.svg b/umap/static/umap/img/source/16-white.svg index 3d10b375..d678d3b9 100644 --- a/umap/static/umap/img/source/16-white.svg +++ b/umap/static/umap/img/source/16-white.svg @@ -16,7 +16,7 @@ - + @@ -52,9 +52,6 @@ - - - @@ -63,7 +60,6 @@ - @@ -214,5 +210,6 @@ + diff --git a/umap/static/umap/img/source/16.svg b/umap/static/umap/img/source/16.svg index c7569e88..5fd14d89 100644 --- a/umap/static/umap/img/source/16.svg +++ b/umap/static/umap/img/source/16.svg @@ -10,7 +10,7 @@ - + @@ -48,9 +48,6 @@ - - - @@ -62,7 +59,6 @@ - @@ -71,7 +67,6 @@ - @@ -194,8 +189,9 @@ - + + diff --git a/umap/static/umap/js/components/alerts/alert.css b/umap/static/umap/js/components/alerts/alert.css index af445e6f..e9926c17 100644 --- a/umap/static/umap/js/components/alerts/alert.css +++ b/umap/static/umap/js/components/alerts/alert.css @@ -14,7 +14,7 @@ display: flex; justify-content: space-between; align-items: flex-start; - left: 50%; + inset-inline-start: 50%; transform: translate(-50%, 0); max-width: calc(100% - var(--panel-gutter) * 2); width: max-content; @@ -25,20 +25,29 @@ min-width: 60%; background-size: 20px; background-position: 0 15px; - padding-left: 28px; + padding-inline-start: 28px; } .umap-alert[role="dialog"][data-level="info"] > div { background-image: url('../../../img/alert-icon-info.svg'); background-repeat: no-repeat; } +html[dir="rtl"] .umap-alert[role="dialog"][data-level="info"] > div { + background-position: right; +} .umap-alert[role="dialog"][data-level="success"] > div { background-image: url('../../../img/alert-icon-success.svg'); background-repeat: no-repeat; } +html[dir="rtl"] .umap-alert[role="dialog"][data-level="success"] > div { + background-position: right; +} .umap-alert[role="dialog"][data-level="error"] > div { background-image: url('../../../img/alert-icon-error.svg'); background-repeat: no-repeat; } +html[dir="rtl"] .umap-alert[role="dialog"][data-level="error"] > div { + background-position: right; +} .umap-alert[role="dialog"][data-level="error"] { background-color: var(--color-darkRed); } @@ -51,9 +60,12 @@ } .umap-alert[role="dialog"] a[target="_blank"] { background: url('../../../img/icon-external-link.svg') no-repeat right center; - padding-right: 14px; + padding-inline-end: 14px; background-size: 12px; } +html[dir="rtl"] .umap-alert[role="dialog"] a[target="_blank"] { + background: url('../../../img/icon-external-link.svg') no-repeat left center; +} h3[role="alert"] { margin-bottom: 0; margin-top: 1rem; @@ -74,14 +86,14 @@ h3[role="alert"] + p { } [role="group"] input:not([type="checkbox"], [type="radio"]):not(:last-child), [role="group"] > :not(:last-child) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; + border-start-end-radius: 0; + border-end-end-radius: 0; } [role="group"] input:not([type="checkbox"], [type="radio"]):not(:first-child), [role="group"] > :not(:first-child) { - margin-left: 0; - border-top-left-radius: 0; - border-bottom-left-radius: 0; + margin-inline-start: 0; + border-start-start-radius: 0; + border-end-start-radius: 0; width: 45%; } [role="group"] input[type="submit"] { diff --git a/umap/static/umap/js/modules/rendering/template.js b/umap/static/umap/js/modules/rendering/template.js index a90ae6ce..e972d662 100644 --- a/umap/static/umap/js/modules/rendering/template.js +++ b/umap/static/umap/js/modules/rendering/template.js @@ -43,10 +43,10 @@ class PopupTemplate { renderFooter(feature, container) { if (feature.hasPopupFooter()) { const template = ` -