Skip to content

Commit e4df42c

Browse files
committed
image guidelines (and borders)
1 parent 1740aa6 commit e4df42c

File tree

2 files changed

+64
-1
lines changed

2 files changed

+64
-1
lines changed

advocacy_docs/community/contributing/styleguide.mdx

+33-1
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ Use images to clarify a topic, but use them only as needed. Images are either:
606606
607607
* **Screenshots** — Provide a UI visual. Don’t use to show dialog boxes and parts of the UI a user can see for themselves, as these are hard to maintain and don’t provide useful information. If a screenshot needs an annotation, use a red box.
608608
609-
* **Diagrams** — Provide a visual of a complicated theory. Diagrams must be simple and easy to read.
609+
* **Diagrams** — Provide a visual of a complicated theory. Diagrams must be clean and easy to read.
610610
611611
612612
**Syntax:**
@@ -617,6 +617,38 @@ Use images to clarify a topic, but use them only as needed. Images are either:
617617
618618
`![PEM Architecture](../images/pem_architecture.png)`
619619
620+
### Screenshot recommendations
621+
622+
Reserve screenshots for situations where the complexity of a user interface exceeds what you can comfortably describe (or render using text in [a code block](#code-blocks)). A good screenshot aids the reader in recognizing what the text is describing, but does not replace textual instructions.
623+
624+
- Use PNG format for screenshots; avoid JPEG (JPEG compression artifacts can be distracting).
625+
- Limit the resolution of images; very large screenshots take longer to load and can be difficult to view.
626+
- Crop the edges and make judicious use of arrows or highlighting to draw attention to areas of interest.
627+
- Do not add borders; the Docs system will add borders appropriate for the color scheme.
628+
- Give screenshots names that describe the feature or form it represents, and place them in the filesystem near the topic that references them. E.g.,
629+
```
630+
/cluster/index.mdx
631+
/cluster/settings.mdx
632+
/cluster/images/settings-ha-options.png
633+
```
634+
635+
### Diagram recommendations
636+
637+
Diagrams are often helpful in reducing the complexity of overviews, explanations, or system architecture. A good diagram provides, at a glance, more information than can be conveyed in an equivalently-sized paragraph. Diagrams are particularly useful as a tool for showing connections between system components that will be described in prose immediately afterwards.
638+
639+
- Use a tool that suits the needs of the diagram you need to create. LucidChart and Figma are good for general-purpose work; if a diagram is generated from existing data, other tools might be more useful.
640+
- Try to use a tool that'll export SVG and a design file that can be re-imported later.
641+
- Check in both the SVG and the design file - that way if we gotta change it later, we can edit the design file instead of the SVG.
642+
- Crop your diagram when exporting - don't have a little diagram in a field of white.
643+
- Feel free to use a transparent background, but then DO use background fill on individual elements where necessary for legibility - we have a dark theme & it needs to stay readable!
644+
- Use the Roboto mono font, min 7 pt.
645+
- Use our brand colors (<https://enterprisedb.atlassian.net/wiki/spaces/EDB/pages/3998613556/Colors>).
646+
- Keep diagrams clean and professional - "napkin sketch" styling might be appropriate for a blog post or presentation where you're talking through a process, but documentation should reflect a complete understanding of the topic.
647+
- If there's a moderate level of detail, link to the diagram as well as embedding, e.g. `[![proxy connections](images/proxy.svg)](images/proxy.svg)]`.
648+
- If there is a high level of detail (to the extent that the diagram becomes unreadable at embedded sizes), break the diagram into multiple diagrams showing e.g. an overview and individual components... Or re-think the level of detail that is necessary. Do not *require* readers to "click through" to a diagram to percieve it.
649+
650+
And remember that not every reader's visual acuity will be up to the task of interpreting a diagram; they are useful as an aid, but should never be the *only* source of critical information!
651+
620652
## Dates
621653
622654
When specifying dates for human readability, use the DD mmm YYYY format with a short month name in English. Where the date is being used in a column in a table, use a leading 0 on the day of month for easier alignment, for example, 01 Jan 2024.

src/styles/_docs.scss

+31
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,37 @@ label.link-label {
3535
}
3636
}
3737

38+
/* Images */
39+
.gatsby-resp-image-wrapper:has(img[src$='.png' i], img[src$='.jpg' i], img[src$='.jpeg' i]):has(img[srcset*="540w"])
40+
{
41+
box-shadow:
42+
0 0 1px rgba(from var(--bs-body-color) r g b / 0.3),
43+
0 0 2px rgba(from var(--bs-body-color) r g b / 0.25),
44+
0 0 3px rgba(from var(--bs-body-color) r g b / 0.2),
45+
0 0 4px rgba(from var(--bs-body-color) r g b / 0.15),
46+
0 0 5px rgba(from var(--bs-body-color) r g b / 0.1);
47+
border-radius: 5px;
48+
overflow: clip;
49+
background: white;
50+
}
51+
52+
a:has(img) { position: relative; display: block; }
53+
a:has(img):after
54+
{
55+
content: '';
56+
width: 24px;
57+
height: 24px;
58+
position: absolute;
59+
top: 0;
60+
right: 0;
61+
display: block;
62+
background: var(--bs-body-color);
63+
mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 -256 1850 1850" xmlns="http://www.w3.org/2000/svg"><g transform="matrix(1,0,0,-1,30.372881,1426.9492)"><path d="M 1408,608 V 288 Q 1408,169 1323.5,84.5 1239,0 1120,0 H 288 Q 169,0 84.5,84.5 0,169 0,288 v 832 Q 0,1239 84.5,1323.5 169,1408 288,1408 h 704 q 14,0 23,-9 9,-9 9,-23 v -64 q 0,-14 -9,-23 -9,-9 -23,-9 H 288 q -66,0 -113,-47 -47,-47 -47,-113 V 288 q 0,-66 47,-113 47,-47 113,-47 h 832 q 66,0 113,47 47,47 47,113 v 320 q 0,14 9,23 9,9 23,9 h 64 q 14,0 23,-9 9,-9 9,-23 z m 384,864 V 960 q 0,-26 -19,-45 -19,-19 -45,-19 -26,0 -45,19 L 1507,1091 855,439 q -10,-10 -23,-10 -13,0 -23,10 L 695,553 q -10,10 -10,23 0,13 10,23 l 652,652 -176,176 q -19,19 -19,45 0,26 19,45 19,19 45,19 h 512 q 26,0 45,-19 19,-19 19,-45 z" style="fill:currentColor"></path></g></svg>');
64+
mask-repeat: no-repeat;
65+
mask-size: 100%;
66+
}
67+
68+
3869
/* Search */
3970
.global-search {
4071
.select-product {

0 commit comments

Comments
 (0)