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

[EuiTableCell] Default table cell alignment in Safari is mixed #4568

Closed
ryankeairns opened this issue Feb 23, 2021 · 8 comments · Fixed by #5283
Closed

[EuiTableCell] Default table cell alignment in Safari is mixed #4568

ryankeairns opened this issue Feb 23, 2021 · 8 comments · Fixed by #5283
Assignees
Labels
⚠️ needs validation For bugs that need confirmation as to whether they're reproducible

Comments

@ryankeairns
Copy link
Contributor

In elastic/kibana#92374 , it was noted that the table cell content alignment is inconsistent on Safari. Using the align prop works for right and center, as that applies an explicit class, but left and start appear to have no effect (i.e. they are left to the browser default, I suspect).

In effect, this means you cannot reliably for a left/start alignment on Safari. The likely code in question is below:

.euiTableCellContent {
overflow: hidden; /* 4 */
display: flex;
align-items: center; /* 1 */
padding: $euiTableCellContentPadding; /* 2 */
}
.euiTableCellContent__text {
@include euiTextBreakWord; /* 4 */
min-width: 0;
text-overflow: ellipsis;
}
.euiTableCellContent--alignRight {
justify-content: flex-end;
text-align: right;
}
.euiTableCellContent--alignCenter {
justify-content: center;
text-align: center;
}

Screenshot from Safari

Screen Shot 2021-02-23 at 12 01 48 PM

@ryankeairns ryankeairns added the ⚠️ needs validation For bugs that need confirmation as to whether they're reproducible label Feb 23, 2021
@cchaos
Copy link
Contributor

cchaos commented Mar 19, 2021

Can we get a copy/paste of the actual implementation code, or at lease the rendered cell DOM? I feel like this may be specific to the inner child.

@cchaos cchaos changed the title Default table cell alignment in Safari is mixed [EuiTableCell] Default table cell alignment in Safari is mixed Mar 19, 2021
@ryankeairns
Copy link
Contributor Author

The linked PR provides more context. There are some interesting details in there.

@cchaos
Copy link
Contributor

cchaos commented Mar 22, 2021

In that PR it looks like the root of problem was tracked to the specific content:

The problem appeared when the link was wrapped with additional <div>, which comes from RedirectAppLinks component.

@ryankeairns
Copy link
Contributor Author

I tinkered with the markup, briefly, and it didn't seem to be the culprit. Also, the first example in the EUI docs site shows the same result on Safari:

Screen Shot 2021-03-22 at 8 33 59 AM

@cchaos
Copy link
Contributor

cchaos commented Mar 22, 2021

👍 Ugh, just another place where Safari is way too heavy-handed with their default browser styles.

@github-actions
Copy link

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

@cchaos cchaos self-assigned this Sep 18, 2021
@cchaos
Copy link
Contributor

cchaos commented Sep 18, 2021

I'll try to tackle this fix as part of the new Emotion global styles.

@cchaos
Copy link
Contributor

cchaos commented Oct 18, 2021

I found that the root of the problem was when we converted the first column from rendering a <td> to a <th> to make it a row header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️ needs validation For bugs that need confirmation as to whether they're reproducible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants