stevengharris/MarkupEditor

Toolbar justification

Closed this issue · 4 comments

Is there any way to have the toolbar center justified, relative to the MarkupEditor, rather than left-justified?

You can do this by eliminating the ScrollView and the Spacer on the right of the outer HStack in MarkupToolbar. If you still need the ScrollView (i.e., it's not usable on a phone without it), then you would have to play around some more to find something that works.

Sheesh, how did I miss that - you had it labelled in the code. By the way, deleting that one spacer didn't actually center, I had to leave it on and add a spacer at the other end. It's working great, though!

I keep thinking I've asked my last question, because I'm so close to being finished, but I've got – hopefully – just one more: how to I get rid of the white background in the code style? I took this:

/* background-color: #F8F8F8; */

out of the code definition in the style sheet, and commented out

/*@media (prefers-color-scheme: dark) {
code {
background-color: #808080;
}
}
*/

But it's still showing up as white.

It looks okay to me with:

code {
    display: block;
    /* background-color: #F8F8F8; */
    border-radius: 3px;
    font-family: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sans Mono', Menlo, Consolas, monospace;
    white-space: pre;
}
/*
@media (prefers-color-scheme: dark) {
    code {
        background-color: #808080;
    }
}
*/

Here is the demo.html with a <code> block added at the top...

Screenshot 2023-12-20 at 11 41 32 AM

Okay, it must be something somewhere else in my code. Thanks!