Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#28330 closed defect (bug) (fixed)

DFW: text unreadable

Reported by: iseulde's profile iseulde Owned by: markjaquith's profile markjaquith
Milestone: 4.0 Priority: normal
Severity: normal Version:
Component: Editor Keywords: 2nd-opinion ui-feedback
Focuses: ui, accessibility Cc:

Description

When the theme sets the background to a dark colour and the text to a light colour, the text in DFW is unreadable. This can probably only be solved by setting the same background colour in DFW.
To reproduce, activate the Twenty Thirteen theme and switch to the quote post format. Enter DFW and you'll see that the text is very difficult to read.

Attachments (8)

Screen Shot 2014-05-22 at 10.05.36.png (23.4 KB) - added by iseulde 10 years ago.
28330.diff (437 bytes) - added by Ipstenu 10 years ago.
Removing transparent corrects that without any (apparent) adverse effects
28330.patch (2.4 KB) - added by iseulde 10 years ago.
28330.2.patch (2.5 KB) - added by iseulde 10 years ago.
28330.3.patch (1.9 KB) - added by iseulde 10 years ago.
dfw-color.png (7.9 KB) - added by azaozz 10 years ago.
dfw-text.png (8.3 KB) - added by azaozz 10 years ago.
28330.4.patch (2.0 KB) - added by azaozz 10 years ago.

Download all attachments as: .zip

Change History (31)

#1 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 4.0

@Ipstenu
10 years ago

Removing transparent corrects that without any (apparent) adverse effects

#2 follow-up: @Ipstenu
10 years ago

Interestingly, it's the background of TRANSPARENT that does this in the DFW editor. I removed the line and tested on both light and dark backgrounds and it appears to work.

#3 in reply to: ↑ 2 @helen
10 years ago

Replying to Ipstenu:

Interestingly, it's the background of TRANSPARENT that does this in the DFW editor. I removed the line and tested on both light and dark backgrounds and it appears to work.

Does that mean that part of the screen is one color and the editor area is another? Screenshot with a dark background?

#4 @Ipstenu
10 years ago

Without the change, the DFW editor background is always white. WITH the change it properly inherits the background color from the Theme CSS. Light bg is light, dark is dark.

The surrounding background, outside the text field, remains white. So that matches how it looks on the regular editor.

Last edited 10 years ago by Ipstenu (previous) (diff)

#5 @iseulde
10 years ago

I think we should make the whole background coloured, I don't think it would look okay otherwise. We can detect the background colour, and the colour, add it to the overlay and colour the title.

#6 @Ipstenu
10 years ago

We *could* but we don't on the non DFW editor, and I was aiming for parity with that. If we did, we'd have to change all the colors, buttons too, which currently are not changed. Try the diff I attached and see how it feels, though.

@iseulde
10 years ago

@iseulde
10 years ago

#7 @iseulde
10 years ago

  • Keywords has-patch added

Maybe something like this?

#8 follow-up: @celloexpressions
10 years ago

Note that, in the Twenty Thirteen editor styles, the background color changes as users switch the post format. So I'd guess that something like 28330.2.patch probably wouldn't work unless it accounted for that as well.

That being said, it would look a lot better with the full-screen approach. The dashed border would need some sort of color-adapting as well, though.

#9 in reply to: ↑ 8 @iseulde
10 years ago

Replying to celloexpressions:

Note that, in the Twenty Thirteen editor styles, the background color changes as users switch the post format. So I'd guess that something like 28330.2.patch probably wouldn't work unless it accounted for that as well.

You can't change the post format in DFW, and the colours are recalculated whenever you enter DFW.
The patch has been tested with Twenty Thirteen.

That being said, it would look a lot better with the full-screen approach. The dashed border would need some sort of color-adapting as well, though.

The patch changes the dashed border based on the color of the editor body with 0.5 opacity.

#10 follow-up: @celloexpressions
10 years ago

Should've actually tested the patch :) Looks like the border color part isn't working for some reason (it's always #ccc, but flashes darker sometimes), but it actually looks fine anyway. And the full-screen color looks considerably better, so I'd say we should go for that approach. (the toolbars remain on a white background, just the content area is changed, for those following along). I also needed the background: transparent; from 28330.diff, in addition to 28330.2.patch, though.

#11 in reply to: ↑ 10 @iseulde
10 years ago

Replying to celloexpressions:

Looks like the border color part isn't working for some reason (it's always #ccc, but flashes darker sometimes), but it actually looks fine anyway.

Weird, I'll take a look again later.

I also needed the background: transparent; from 28330.diff, in addition to 28330.2.patch, though.

28330.2.patch extends 28330.diff. You may need to empty your browser cache for that file.

Last edited 10 years ago by iseulde (previous) (diff)

This ticket was mentioned in IRC in #wordpress-dev by DrewAPicture. View the logs.


10 years ago

#13 @celloexpressions
10 years ago

  • Keywords needs-refresh added

Testing again, I think the following is happening with 28330.2.patch applied:

  • When the DFW controls are supposed to be shown, the border color is correct.
  • When the DFW controls should fade out (I think I remember them doing that?), the border color fades to #ccc instead (controls do not fade out).

Not positive how that's supposed to work, but something isn't quite right here regardless.

@iseulde
10 years ago

#14 @iseulde
10 years ago

Just using the color for the border-color is simpler... See patch .3. If we want some opacity though, we need to do it like patch .2. I think, to solve celloexpressions issue, we just need to remove the important or add an important to background-color: transparent. But again, not necessary when we go for patch .3. I'm don't mind using the full color instead of the color at 0.5 opacity.

#15 @markjaquith
10 years ago

  • Keywords 2nd-opinion added; needs-refresh removed

Patch .3 seems to work quite nicely. Any objections to just going with that?

#16 @markjaquith
10 years ago

  • Owner set to markjaquith
  • Resolution set to fixed
  • Status changed from new to closed

In 29340:

Match background color in DFW and adapt the dashed outline color.

fixes #28330. props avryl, ipstenu.

@azaozz
10 years ago

#17 @azaozz
10 years ago

  • Keywords ui-feedback added; has-patch removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Not feeling much "distraction free" any more... Maybe better to force the text color to #333 and keep the background as it was before (the "global" admin background)?

Last edited 10 years ago by azaozz (previous) (diff)

#18 @markjaquith
10 years ago

What's the distraction? That it's not greyscale? Might not forcing a text color lead to other editor style clashes?

@azaozz
10 years ago

#19 @azaozz
10 years ago

What's the distraction? That it's not greyscale?

Yeah, the strong background color looks pretty "strange", especially in a full-screen browser window on a larger 24" - 27" monitor. Also has nothing to do with how it is going to look on the front-end.

On top of that the Text editor has the default colors, making it look even more "strange" :)

Last edited 10 years ago by azaozz (previous) (diff)

@azaozz
10 years ago

#20 @azaozz
10 years ago

When DFW is open the html element inside TinyMCE gets a class wp-fullscreen which can be used to set or reset all colors. Both core and the themes can use that to keep DFW nice looking and distraction free.

28330.4.patch reverts the forced background color and adds default text color for DFW.

Last edited 10 years ago by azaozz (previous) (diff)

#21 @azaozz
10 years ago

This also breaks/throws JS error when TinyMCE is not used or not initialized, i.e. when the Text editor is the default and the user opens DFW.

This ticket was mentioned in IRC in #wordpress-dev by azaozz. View the logs.


10 years ago

#23 @azaozz
10 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 29533:

DFW: revert applying the Visual editor body color and background-color for now. Set the color to #333 and the background to transparent. Fixes #28330.

Note: See TracTickets for help on using tickets.