代码

[data-role="editor-base"] [data-role="editor-prosemirror"] [data-role="editor"] {
  background-size: 20px 20px;
  background-position: center center;
  background-image: radial-gradient(circle, #cbd5e1 1px, #fff 1px);
}

效果

image.png

更多示例

带边缘遮罩

代码:

[data-role="editor-one"] {
  background: var(--wp-paper-bg);
}

[data-role="editor-base"] [data-role="editor-prosemirror"] [data-role="editor"] {
  background-size: 20px 20px;
  background-position: center center;
  background-image: radial-gradient(circle, #cbd5e1 1px, #fff 1px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #fff 50px calc(100% - 50px), transparent), linear-gradient(to right, transparent, #fff 50px calc(100% - 50px), transparent);
  mask-image: linear-gradient(to bottom, transparent, #fff 50px calc(100% - 50px), transparent), linear-gradient(to right, transparent, #fff 50px calc(100% - 50px), transparent);
  mask-composite: intersect;
  -webkit-mask-composite: source-in, xor;
}

效果:

image.png

注意边缘有半透明效果。

夜间模式

代码:

[data-role="editor-base"] [data-role="editor-prosemirror"] [data-role="editor"] {
  background-size: 20px 20px;
  background-position: center center;
  background-image: radial-gradient(circle, #333 1px, #000 1px);
}