#6391 closed defect (bug) (invalid)
pre tag broken in theme preview in themes directory - classic themes
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Theme Directory | Keywords: | theme-preview has-patch |
Cc: |
Description
When you preview classic themes in the theme's repo, the content in pre tag is showing scroll. We can fix it by adding a line of CSS.
If you click on the Dhor theme preview. Click on the Element and scroll down you can see the scroll bar in pre section. Please check the below screenshot.
Broken screenshot: theme-preview-broken.jpg
Fixed screenshot: theme-preview-fixed.jpg
Attachments (3)
Change History (12)
#2
@
3 years ago
@kafleg you can add this code in style.css under the pre.
pre { background: #eee; font-family: "Courier 10 Pitch", courier, monospace; line-height: 1.6; margin-bottom: 1.6em; max-width: 100%; overflow: auto; padding: 1.6em; white-space: normal; }
I have added white-space: normal;
#3
@
3 years ago
Each theme needs to solve this individually.
The theme directory can not add CSS that affects the theme presentations.
#4
@
3 years ago
I found a similar issue in the block themes too. Do block themes also need to fix in that way?
I've created another ticket too. https://meta.trac.wordpress.org/ticket/6392
This ticket was mentioned in PR #82 on WordPress/wordpress.org by benimub.
3 years ago
#5
- Keywords has-patch added
Fixed the pre tag for theme preview page in themes repo
Here is meta ticket link https://meta.trac.wordpress.org/ticket/6391
#7
@
3 years ago
- Resolution set to invalid
- Status changed from new to closed
Hi @benimub,
The Theme Previewer, wp-themes.com, only displays CSS that the themes themselves have defined.
If you find a theme which does not style pre
tags correctly, you can report this to the Theme Author through the Theme Support forums (View a theme in the directory, and find the forums link in the right hand sidebar).
The file you've patched controls the Theme Directory styles, but NOT the styles used within the individual previews (Which are iframes of wp-themes.com - ie. https://wp-themes.com/dhor/)
@benimub
Would you please provide the steps on how to fix that? Maybe we need to write the CSS code?