Opened 19 months ago
Closed 19 months ago
#57920 closed defect (bug) (duplicate)
Multiple Default Themes: Ordered List Type Overwritten
Reported by: | zoonini | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | |
Focuses: | css | Cc: |
Description
In several default themes, the ordered list type is always displayed as numerical (aka decimal), even when you set it to another type, such as alphabetical.
To replicate:
- Activate Twenty Fifteen
- Add a List block OR a Classic block
- Switch the block to code view and add
type="a"
as an attribute on theol
element, so the opening tag looks like this:<ol type="a">
- Save the page and view on the front end
Result:
It displays as a numerical list, like:
- item
- item
- item
This seems to be coming from this CSS in each of the affected themes:
ol { list-style: decimal; }
Expected:
It should display as whatever list type was set. For example, if type="a"
was set on the block, the list should display alphabetical, like:
- item
- item
- item
Other affected themes
I able to replicate this in the following default themes:
- Twenty Ten
- Twenty Eleven
- Twenty Twelve
- Twenty Fourteen
- Twenty Fifteen
- Twenty Sixteen
- Twenty Seventeen
- Twenty Nineteen
- Twenty Twenty
- Twenty Twenty-One
The following default themes did not have the issue:
- Twenty Thirteen
- Twenty Twenty-Two
- Twenty Twenty-Three
Reported in this support-forum thread:
https://wordpress.org/support/topic/ordered-list-type-attribute-not-displayed-properly/
I provided two possible workarounds to the user there, one involving custom CSS, and the other involving adding inline CSS on the ol
element.
Change History (6)
#2
@
19 months ago
This should be fixed with a high priority, good themes should not be overriding/removing key web functionality and core themes should be (and mostly are) good themes that follow standards and behave well
#3
@
19 months ago
Hi @zoonini ,
Thanks for the ticket. but I found some CSS for the list. for a different type of list, we need to write in a different structure. I found some CSS for different list styles. we can follow this structure for the rest of the themes or write a new one. Waiting for other's opinions about the CSS style
- Twenty-Ten
ol { list-style: decimal; } ol ol { list-style: upper-alpha; } ol ol ol { list-style: lower-roman; } ol ol ol ol { list-style: lower-alpha; }
- Twenty Eleven
ol { list-style-type: decimal; } ol ol { list-style: upper-alpha; } ol ol ol { list-style: lower-roman; } ol ol ol ol { list-style: lower-alpha; }
#4
@
19 months ago
@jakariaistauk Yep, I know there are various CSS workarounds – if you visit the support thread I linked above, you'll see that I provided several to the user reporting this issue.
@sabernhardt Great spot of the duplicate, I couldn't find it when searching. :)
Related/duplicate: #44777