Skip to content

Commit cbc4aae

Browse files
committed
Move word wrapping style, reuse for email in user preferences
1 parent 384d1a0 commit cbc4aae

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

client/src/components/Common/Heading.vue

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const element = computed(() => {
5353
</script>
5454

5555
<template>
56-
<div v-if="props.separator" class="separator heading">
56+
<div v-if="props.separator" class="separator heading word-wrap-break">
5757
<GButton v-if="collapsible" transparent size="small" icon-only inline @click="$emit('click')">
5858
<FontAwesomeIcon v-if="collapsed" fixed-width :icon="faAngleDoubleDown" />
5959
<FontAwesomeIcon v-else fixed-width :icon="faAngleDoubleUp" />
@@ -75,7 +75,7 @@ const element = computed(() => {
7575
<component
7676
:is="element"
7777
v-else
78-
class="heading"
78+
class="heading word-wrap-break"
7979
:class="[
8080
sizeClass,
8181
props.bold ? 'font-weight-bold' : '',
@@ -96,12 +96,6 @@ const element = computed(() => {
9696
<style lang="scss" scoped>
9797
@import "scss/theme/blue.scss";
9898
99-
.heading {
100-
overflow-wrap: break-word;
101-
white-space: normal;
102-
word-break: break-word;
103-
}
104-
10599
// prettier-ignore
106100
h1, h2, h3, h4, h5, h6 {
107101
&:not(.truncate) {

client/src/components/User/UserDetailsElement.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const getStoragePercentageClass = (percentage: number) => {
4545
<FontAwesomeIcon :icon="faAt" class="user-details-icon p-2" />
4646
<span
4747
id="user-preferences-current-email"
48+
class="word-wrap-break"
4849
v-b-tooltip.hover.noninteractive
4950
title="Your email address">
5051
{{ userEmail }}

client/src/style/scss/ui.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@
4949
word-wrap: normal;
5050
}
5151

52+
.word-wrap-break {
53+
overflow-wrap: break-word;
54+
white-space: normal;
55+
word-break: break-word;
56+
}
57+
5258
// utility class to set white space wrapping to normal
5359
.white-space-normal {
5460
white-space: normal;

0 commit comments

Comments
 (0)