Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added euiTextBreakWord mixin to the euiTitle mixin #5107

Merged
merged 5 commits into from
Aug 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## [`master`](https://github.com/elastic/eui/tree/master)

- Added `euiTextBreakWord()` mixin to the `euiTitle()` mixin to ensure all titles break long words ([#5107](https://github.com/elastic/eui/pull/5107))
- Added `euiTextBreakWord()` to `EuiFormLabels` ([#5107](https://github.com/elastic/eui/pull/5107))

**Bug fixes**

- Fixed `EuiSuperSelect`'s focus keyboard behavior when no initial value is passed, and focus label behavior ([#5097](https://github.com/elastic/eui/pull/5097))
Expand Down
1 change: 0 additions & 1 deletion src/components/form/form_row/_form_row.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
align-items: stretch;

.euiFormRow__label {
@include euiTextBreakWord;
hyphens: auto;
max-width: 100%; // Fixes IE
}
Expand Down
3 changes: 1 addition & 2 deletions src/components/table/_table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@
* 1. Vertically align all children.
* 2. The padding on this div allows the ellipsis to show if the content is truncated. If
* the padding was on the cell, the ellipsis would be cropped.
* 3. Support wrapping.
* 4. Prevent very long single words (e.g. the name of a field in a document) from overflowing
* the cell.
*/
Expand Down Expand Up @@ -175,7 +174,7 @@
.euiTableHeaderCell,
.euiTableFooterCell,
.euiTableCellContent--truncateText {
white-space: nowrap; /* 3 */
@include euiTextTruncate;

.euiTableCellContent__text {
overflow: hidden;
Expand Down
1 change: 0 additions & 1 deletion src/components/toast/_toast.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ $euiToastTypes: (

.euiToastHeader__title {
@include euiTitle('xs');
@include euiTextBreakWord;
font-weight: $euiFontWeightLight;
}

Expand Down
1 change: 1 addition & 0 deletions src/global_styling/mixins/_form.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Labels
@mixin euiFormLabel {
@include euiFontSizeXS;
@include euiTextBreakWord;
color: $euiTitleColor;
font-weight: $euiFontWeightSemiBold;
}
Expand Down
1 change: 1 addition & 0 deletions src/global_styling/mixins/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
}

@mixin euiTitle($size: 'm') {
@include euiTextBreakWord;
color: $euiTitleColor;

@if (map-has-key($euiTitles, $size)) {
Expand Down