Skip to content

Commit b66c900

Browse files
authored
Merge pull request #13578 from Nico3012/bugfix/change-to-dynamic-viewport-units
Bugfix/change to dynamic viewport units
2 parents 2b815bd + e0b19a1 commit b66c900

15 files changed

Lines changed: 29 additions & 22 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Bugfix: Use dynamic viewport units (dvh/dvw) instead of viewport units (vh/vw)
2+
3+
We have updated the CSS to use dynamic viewport units (dvh/dvw) instead of
4+
viewport units (vh/vw) for better responsiveness on mobile devices, especially
5+
when the virtual keyboard appears.
6+
7+
https://github.com/owncloud/web/pull/13578

packages/design-system/src/components/OcModal/OcModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ const iconName = computed(() => {
326326
border: 1px solid var(--oc-color-input-border);
327327
border-radius: 15px;
328328
box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3);
329-
max-height: 90vh;
329+
max-height: 90dvh;
330330
max-width: 500px;
331331
overflow: auto;
332332
width: 100%;

packages/design-system/src/styles/theme/oc-height.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ $height-large-height: 450px !default;
3030
* Useful to create image teasers
3131
*/
3232

33-
.oc-height-viewport { min-height: 100vh; }
33+
.oc-height-viewport { min-height: 100dvh; }
3434

3535
/*
3636
* Pixel

packages/web-app-files/src/components/FilesList/NotFoundMessage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ const spacesRoute = createLocationSpaces('files-spaces-projects')
7575
</script>
7676
<style>
7777
#files-list-not-found-message {
78-
height: 75vh;
78+
height: 75dvh;
7979
}
8080
</style>

packages/web-app-files/src/views/spaces/Projects.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ function openSidebarSharePanel(space: SpaceResource) {
477477

478478
<style lang="scss">
479479
#files-spaces-empty {
480-
height: 75vh;
480+
height: 75dvh;
481481
}
482482
483483
.table-preview {

packages/web-app-password-protected-folders/src/components/FolderViewModal.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const onLoad = () => {
4747

4848
<style lang="scss">
4949
.oc-modal.folder-view-modal {
50-
max-width: 80vw;
50+
max-width: 80dvw;
5151
border: none;
5252
overflow: hidden;
5353
@@ -59,7 +59,7 @@ const onLoad = () => {
5959
padding: 0;
6060
6161
&-message {
62-
height: 60vh;
62+
height: 60dvh;
6363
margin: 0;
6464
}
6565
}

packages/web-app-search/src/portals/SearchBar.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ onBeforeUnmount(() => {
737737
right: 0;
738738
margin: 0 auto;
739739
top: 0;
740-
max-width: 95vw !important;
740+
max-width: 95dvw !important;
741741
z-index: 9;
742742
743743
.oc-search-input-icon {
@@ -759,7 +759,7 @@ onBeforeUnmount(() => {
759759
width: 100%;
760760
max-width: 450px;
761761
overflow-y: auto;
762-
max-height: calc(100vh - 60px);
762+
max-height: calc(100dvh - 60px);
763763
text-decoration: none;
764764
765765
// Prevent all elements inside dropdown from being focusable via tab
@@ -790,7 +790,7 @@ onBeforeUnmount(() => {
790790
}
791791
792792
@media (max-width: 639px) {
793-
max-width: 93vw !important;
793+
max-width: 93dvw !important;
794794
}
795795
796796
ul {

packages/web-app-text-editor/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ defineEmits<Emits>()
3737
padding: 18px 25px;
3838
3939
//Fixes in readonly mode vertical scrolling is not available
40-
height: calc(100vh - 52px);
40+
height: calc(100dvh - 52px);
4141
overflow: auto;
4242
}
4343

packages/web-pkg/src/components/Modals/ExportAsPdfModal.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ onBeforeUnmount(() => {
122122

123123
<style lang="scss">
124124
.oc-modal.export-as-pdf-modal {
125-
max-width: 80vw;
125+
max-width: 80dvw;
126126
border: none;
127127
overflow: hidden;
128128
@@ -134,7 +134,7 @@ onBeforeUnmount(() => {
134134
padding: 0;
135135
136136
&-message {
137-
height: 60vh;
137+
height: 60dvh;
138138
margin: 0;
139139
}
140140
}

packages/web-pkg/src/components/Modals/FilePickerModal.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ onBeforeUnmount(() => {
112112

113113
<style lang="scss">
114114
.oc-modal.open-with-app-modal {
115-
max-width: 80vw;
115+
max-width: 80dvw;
116116
border: none;
117117
overflow: hidden;
118118
@@ -124,7 +124,7 @@ onBeforeUnmount(() => {
124124
padding: 0;
125125
126126
&-message {
127-
height: 60vh;
127+
height: 60dvh;
128128
margin: 0;
129129
}
130130
}

0 commit comments

Comments
 (0)