Skip to content

Commit 4235e48

Browse files
authored
Merge pull request #1129 from opencloud-eu/refactor/tailwind-height
refactor: height to tailwind
2 parents 318bb6f + 02e98f1 commit 4235e48

File tree

108 files changed

+354
-552
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+354
-552
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,5 @@ const randomBackgroundColor = (seed: number, colors: string[]) => {
132132
<style lang="scss">
133133
.oc-avatar {
134134
user-select: none;
135-
136-
.avatarImg {
137-
height: auto;
138-
}
139135
}
140136
</style>

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
<div
88
v-if="isOpen"
99
ref="bottomDrawerRef"
10-
class="oc-bottom-drawer-background bg-black/40 w-full"
10+
class="oc-bottom-drawer-background bg-black/40 size-full"
1111
role="button"
1212
@click="onBackgroundClicked"
1313
>
1414
<focus-trap>
1515
<div
1616
:id="drawerId"
17-
class="oc-bottom-drawer bg-role-surface-container-high rounded-t-sm w-full"
17+
class="oc-bottom-drawer bg-role-surface-container-high rounded-t-sm w-full max-h-[66vh]"
1818
>
1919
<div class="oc-card bg-transparent">
2020
<div class="oc-card-header border-b-0 px-4 pt-4">
@@ -258,7 +258,6 @@ defineExpose({ show, hide, getElement })
258258
</style>
259259
<style lang="scss">
260260
.oc-bottom-drawer-background {
261-
height: 100%;
262261
left: 0;
263262
top: 0;
264263
position: fixed;
@@ -270,7 +269,6 @@ defineExpose({ show, hide, getElement })
270269
bottom: -100%;
271270
left: 0;
272271
right: 0;
273-
max-height: 66vh;
274272
overflow-y: auto;
275273
transition: all 0.2s;
276274

packages/design-system/src/components/OcBottomDrawer/__snapshots__/OcBottomDrawer.spec.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
exports[`OcBottomDrawer > renders when toggle is clicked 1`] = `
44
"<div drawerid="button-drawer" toggle="#button-drawer-toggle" title="Bottom Drawer" closeonclick="false"><button id="button-drawer-toggle">Toggle Drawer</button>
55
<div>
6-
<div class="oc-bottom-drawer-background bg-black/40 w-full" role="button">
7-
<div id="button-drawer" class="oc-bottom-drawer bg-role-surface-container-high rounded-t-sm w-full active">
6+
<div class="oc-bottom-drawer-background bg-black/40 size-full" role="button">
7+
<div id="button-drawer" class="oc-bottom-drawer bg-role-surface-container-high rounded-t-sm w-full max-h-[66vh] active">
88
<div class="oc-card bg-transparent">
99
<div class="oc-card-header border-b-0 px-4 pt-4">
1010
<div class="flex justify-between items-center">

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

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,13 @@ const onClick = (event: MouseEvent) => {
179179
@apply py-1.5 px-2.5;
180180
}
181181
.oc-button-s {
182-
@apply text-sm;
182+
@apply text-sm min-h-3;
183183
}
184184
.oc-button-m {
185-
@apply text-base;
185+
@apply text-base min-h-4;
186186
}
187187
.oc-button-l {
188-
@apply text-lg;
188+
@apply text-lg min-h-7;
189189
}
190190
.oc-button {
191191
@apply rounded-sm;
@@ -206,8 +206,6 @@ const onClick = (event: MouseEvent) => {
206206
@mixin oc-button-color-role($color, $on-color) {
207207
&-raw,
208208
&-raw-inverse {
209-
min-height: 0;
210-
211209
background-color: transparent;
212210
color: $color;
213211
.oc-icon > svg {
@@ -311,18 +309,6 @@ const onClick = (event: MouseEvent) => {
311309
cursor: pointer;
312310
}
313311
314-
&-s {
315-
min-height: 1.2rem;
316-
}
317-
318-
&-m {
319-
min-height: $global-control-height;
320-
}
321-
322-
&-l {
323-
min-height: 2rem;
324-
}
325-
326312
&-primary {
327313
@include oc-button-color-role(var(--oc-role-primary), var(--oc-role-on-primary));
328314
}

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
</div>
3636
<div
3737
v-if="showMessageLine"
38-
class="oc-color-input-message flex items-center text-sm mt-1"
38+
class="oc-color-input-message flex items-center text-sm mt-1 min-h-4.5"
3939
:class="{
4040
'oc-color-input-description text-role-on-surface-variant': !!descriptionMessage,
4141
'oc-color-input-danger text-role-on-error focus:text-role-on-error border-role-error':
@@ -207,10 +207,4 @@ const onInput = (value: string) => {
207207
top: var(--oc-space-xsmall);
208208
}
209209
}
210-
211-
.oc-color-input {
212-
&-message {
213-
min-height: $oc-font-size-default * 1.5;
214-
}
215-
}
216210
</style>

packages/design-system/src/components/OcDatepicker/__snapshots__/OcDatepicker.spec.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ exports[`OcDatePicker > renders 1`] = `
88
<!--v-if--> <input id="oc-textinput-1" aria-invalid="false" class="oc-text-input oc-input rounded-sm focus:border focus:border-role-surface" type="date" value="">
99
<!--v-if-->
1010
</div>
11-
<div class="oc-text-input-message flex align-center text-sm mt-1">
11+
<div class="oc-text-input-message flex align-center text-sm mt-1 min-h-4.5">
1212
<!--v-if-->
1313
</div>
1414
<!--v-if-->

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</div>
5050
<div
5151
v-if="showMessageLine"
52-
class="oc-file-input-message flex items-center text-sm mt-1"
52+
class="oc-file-input-message flex items-center text-sm mt-1 min-h-4.5"
5353
:class="{
5454
'oc-file-input-description text-role-on-surface-variant': !!descriptionMessage,
5555
'oc-file-input-danger text-role-on-error focus:text-role-on-error': !!errorMessage
@@ -235,11 +235,3 @@ const onFocus = async () => {
235235
emit('focus', unref(inputBtnRef))
236236
}
237237
</script>
238-
239-
<style scoped lang="scss">
240-
.oc-file-input {
241-
&-message {
242-
min-height: $oc-font-size-default * 1.5;
243-
}
244-
}
245-
</style>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ defineSlots<Slots>()
4646
width: 1.5px;
4747
}
4848
ul.oc-list.oc-timeline li::before {
49-
width: 10px;
49+
@apply size-2.5;
5050
}
5151
ul.oc-list-raw a:hover {
5252
@apply text-inherit;
@@ -72,7 +72,6 @@ ul.oc-list.oc-timeline {
7272
7373
&::before {
7474
content: '';
75-
height: 10px;
7675
position: absolute;
7776
left: -4px;
7877
top: 50%;

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
'after:bg-role-secondary',
99
'w-full',
1010
'after:w-0',
11-
{ 'oc-loader-flat rounded-none': flat },
12-
{ 'rounded-[500px]': !flat }
11+
'after:h-full',
12+
{ 'oc-loader-flat rounded-none h-1': flat },
13+
{ 'rounded-[500px] h-4': !flat }
1314
]"
1415
:aria-label="ariaLabel"
1516
/>
@@ -43,17 +44,11 @@ const { ariaLabel = 'Loading', flat = false } = defineProps<Props>()
4344
.oc-loader {
4445
-webkit-appearance: none;
4546
-moz-appearance: none;
46-
height: 15px;
4747
overflow: hidden;
4848
position: relative;
4949
50-
&-flat {
51-
height: 5px !important;
52-
}
53-
5450
&::after {
5551
content: '';
56-
height: 100%;
5752
position: absolute;
5853
5954
animation: {

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
:id="elementId"
88
ref="ocModal"
99
:class="classes"
10-
class="border border-role-outline rounded-sm focus:outline-0 w-full max-w-xl"
10+
class="border border-role-outline rounded-sm focus:outline-0 w-full max-w-xl max-h-[90vh]"
1111
tabindex="0"
1212
role="dialog"
1313
aria-modal="true"
@@ -327,7 +327,6 @@ export default {
327327
<style lang="scss">
328328
.oc-modal {
329329
box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3);
330-
max-height: 90vh;
331330
overflow: auto;
332331
333332
&-background {

0 commit comments

Comments
 (0)