You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Notices: Editor notice margins appear conflicted with theme background color #18762
Yup, it's from a margin-bottom of 5px added by the .components-notice styling indeed. With multiple notices involved, here's what we have now:
If we move the notices into the .editor-styles-wrapper element as is, they'd overlap the .editor-post-title element, causing a conflict there. Perhaps a border, or inset box-shadow, could be a simpler implementation.
Here's with setting.components-notice margin to 0 and adding border-bottom: 1px solid rgba(0, 0, 0, 0.15) to the notice (including the first one, which makes the notice feel part of the UI a bit more). I chose that border-bottom color to match the .edit-post-header border with transparency, so that it does that clash with notice colors.
@richtabor I'll of course defer to your judgment (and any other designers who might weigh in), but from my perspective, your proposed border seems nicer to me even than the original design was going for with the margins. There's a nice consistency with borders used elsewhere in the UI (with that in mind, should it be the exact color of other borders, if not already?).
...but from my perspective, your proposed border seems nicer to me even than the original design was going for with the margins.
100%, totally agree.
There's a nice consistency with borders used elsewhere in the UI (with that in mind, should it be the exact color of other borders, if not already?).
Yea, we can try - it's worth exploring. There may be a bit of clash with a gray border against the notices (as they hold a background color), which is why I went transparent. For reference, the 0 0 0 1px rgba(0, 0, 0, 0.2) I mocked here is also used within the ColorPaletteControl component, as those button elements have background colors as well.
There may be a bit of clash with a gray border against the notices (as they hold a background color), which is why I went transparent.
Huh, I clearly needed to brush up on my understanding of how borders and backgrounds interact (CodePen), since I was under the impression it wouldn't matter if the border was outside of the content/background area. But yes, I can see now why a semi-transparent black would likely clash less than a static gray border.
For reference, the 0 0 0 1px rgba(0, 0, 0, 0.2) I mocked here [...]
Can you clarify, since your first comment mentioned using a border-bottom, but the syntax you mention here now (and in use by ColorPaletteControl) is a box-shadow; should we be using a border or box shadow? I would imagine a border should be sufficient?
For reference, the 0 0 0 1px rgba(0, 0, 0, 0.2) I mocked here [...]
Can you clarify, since your first comment mentioned using a border-bottom, but the syntax you mention here now (and in use by ColorPaletteControl) is a box-shadow; should we be using a border or box shadow? I would imagine a border should be sufficient?
Oh sorry about that! I was referring to the rgba value being the same. A border-bottom would work great here.
For clarification:
The screenshot below is using a border-bottom the same value as the edit-post-header:
While this screenshot is using a border-bottom: 0 0 0 1px rgba(0, 0, 0, 0.125) (which adds more contrast between elements and fits in better with the contrast from the edit-post-header border-bottom. I'd say this works much better.
Thanks for clarifying. In #18871, I went with border-bottom. I used 0.2 as the alpha though. That's different from what you're suggesting in your latest comment, but per your comment about "the rgba value being the same", the color palette and friends use 0.2 as well, not 0.125.
Activity
richtabor commentedon Nov 26, 2019
Yup, it's from a margin-bottom of
5pxadded by the.components-noticestyling indeed. With multiple notices involved, here's what we have now:If we move the notices into the
.editor-styles-wrapperelement as is, they'd overlap the.editor-post-titleelement, causing a conflict there. Perhaps a border, or inset box-shadow, could be a simpler implementation.richtabor commentedon Nov 26, 2019
Here's with setting
.components-noticemargin to0and addingborder-bottom: 1px solid rgba(0, 0, 0, 0.15)to the notice (including the first one, which makes the notice feel part of the UI a bit more). I chose that border-bottom color to match the.edit-post-headerborder with transparency, so that it does that clash with notice colors.And here's the same, but with two notices:
Info notices:
Error notices:
aduth commentedon Nov 26, 2019
@richtabor I'll of course defer to your judgment (and any other designers who might weigh in), but from my perspective, your proposed border seems nicer to me even than the original design was going for with the margins. There's a nice consistency with borders used elsewhere in the UI (with that in mind, should it be the exact color of other borders, if not already?).
Seems to me like an easy way to fix the issue 👍
richtabor commentedon Nov 26, 2019
100%, totally agree.
Yea, we can try - it's worth exploring. There may be a bit of clash with a gray border against the notices (as they hold a background color), which is why I went transparent. For reference, the
0 0 0 1px rgba(0, 0, 0, 0.2)I mocked here is also used within theColorPaletteControlcomponent, as those button elements have background colors as well.aduth commentedon Dec 2, 2019
Huh, I clearly needed to brush up on my understanding of how borders and backgrounds interact (CodePen), since I was under the impression it wouldn't matter if the border was outside of the content/background area. But yes, I can see now why a semi-transparent black would likely clash less than a static gray border.
aduth commentedon Dec 2, 2019
Can you clarify, since your first comment mentioned using a
border-bottom, but the syntax you mention here now (and in use byColorPaletteControl) is abox-shadow; should we be using a border or box shadow? I would imagine a border should be sufficient?richtabor commentedon Dec 2, 2019
Oh sorry about that! I was referring to the
rgbavalue being the same. Aborder-bottomwould work great here.For clarification:
border-bottomthe same value as theedit-post-header:border-bottom: 0 0 0 1px rgba(0, 0, 0, 0.125)(which adds more contrast between elements and fits in better with the contrast from theedit-post-headerborder-bottom. I'd say this works much better.aduth commentedon Dec 2, 2019
Thanks for clarifying. In #18871, I went with
border-bottom. I used0.2as the alpha though. That's different from what you're suggesting in your latest comment, but per your comment about "thergbavalue being the same", the color palette and friends use0.2as well, not0.125.richtabor commentedon Dec 3, 2019
Yea, I was playing around with the
rgbato see if I could get the contrast visually similar to what the.editor-post-headerprovides.