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

List style overrides font-weight from parent in rich text #1454

Open
donquixote opened this issue May 22, 2024 · 0 comments
Open

List style overrides font-weight from parent in rich text #1454

donquixote opened this issue May 22, 2024 · 0 comments

Comments

@donquixote
Copy link

Steps to reproduce:

In a site with oe_theme, create content with the following rich text content,
using a text format that allows it.

<table><tr><th>
  <ul><li>List inside table header</li></ul>
</th></tr></table>

Expected behavior

The html will be like this (it is wrapped in .ecl):

<div class="ecl">
  <table><tr><th>
    <ul><li>List inside table header</li></ul>
  </th></tr></table>
</div>

The text "List inside table header" will be bold, because it is inside a <th> tag.

Actual behavior

(good) Html as above.
(bad) Text is not bold.

Technical explanation

From ecl-ec-default.css:

.ecl ul:is([class*=ecl-u-]),
.ecl ul:not([class*=ecl-],
[class*=wt-],
[class*=highcharts-]),
.ecl-unordered-list {
 -webkit-padding-start:.75rem;
 color:#404040;
 font:normal normal 400 1rem/1.5rem arial,sans-serif;
 list-style-position:outside;
 margin:0;
 padding-inline-start:.75rem
}

The font: normal normal 400 1rem/1.5rem arial,sans-serif resets the font-weight from th.

Notes

Actually I am not super sure about the "expected" behavior here.
Is it really so clear that the list should be bold?
On the other hand: Why do we need to override font-weight here? Was this even intended?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant