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

Make the editor canvas friendly towards colored backgrounds #6406

Merged
merged 5 commits into from
May 17, 2018

Commits on May 2, 2018

  1. Make the editor canvas friendly towards colored backgrounds

    One long term vision for the editor, is to allow you to load the theme stylesheet into the editor canvas itself, so you have an almost if not completely WYSIWYG experience where the theme background and fonts apply to the editor.
    
    In the interim, we should make it easier to load _editor styles_ into the canvas. This already works today, but the block UI is not really ready for it — white backgrounds are used here and there, and borders are colored light grays which quickly disappear on some colors.
    
    This PR takes an initial stab at alleviating that, by moving to using various levels of opacities of the darkest gray we have, to emulate the range of opaque grays we have. As such, this PR includes a range of those opacities. For example, shown on a white background, $dark-opacity-500 should look the same as $dark-gray-500, but the latter should look good on colored backgrounds as well.
    
    This is going to be a fair bit of work, and this is only the beginnings of it. It styles the borders, the outermost toolbar borders, the naked mover/settings/more icons, and the title field, as well as the appender. In doing this, it now means you can at least change the background color and still sort of use the editor.
    
    Asking for thoughts now, before I do more work — what do you think of this approach?
    
    If there's positive agreement on this direction, I will fix the drag and drop shadows/colors. Note that this PR makes the UI work on _light_ backgrounds. If you cross a certain threshold of luminosity into the dark background territory, we need to invert the colors. This PR already contains the opacities for that, but we'll need to detect the background color and apply a body class, something like `body.has-dark-background`, so that I can invert the UI for that. Would appreciate thoughts on this too.
    Joen Asmussen committed May 2, 2018
    Configuration menu
    Copy the full SHA
    079f43e View commit details
    Browse the repository at this point in the history
  2. Add dark mode tweaks

    Joen Asmussen committed May 2, 2018
    Configuration menu
    Copy the full SHA
    5f5868e View commit details
    Browse the repository at this point in the history
  3. Address feedback

    Joen Asmussen committed May 2, 2018
    Configuration menu
    Copy the full SHA
    3272f0d View commit details
    Browse the repository at this point in the history

Commits on May 16, 2018

  1. Address feedback.

    Joen Asmussen committed May 16, 2018
    Configuration menu
    Copy the full SHA
    64c91c5 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2018

  1. Darken the side UI slightly, it was too light

    Joen Asmussen committed May 17, 2018
    Configuration menu
    Copy the full SHA
    4c1e095 View commit details
    Browse the repository at this point in the history