Update next.md

This commit is contained in:
Alexander Wang 2023-05-02 11:20:07 -07:00 committed by GitHub
parent 8643f626e9
commit d402301473
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,39 @@
This release improves on the features introduced in 0.4, with `class` keyword now accepting multiple class values with an array, and grid diagrams becoming faster and more robust.
Multiple classes example:
<img src="https://user-images.githubusercontent.com/3120367/235749202-aa85830e-8f4a-4a2c-be16-599302919122.svg" style="width: 600px" />
```d2
classes: {
base: {
style: {
stroke-dash: 2
border-radius: 5
font: mono
text-transform: uppercase
}
}
error: {
style.fill: "#e07d7d"
style.stroke: "#a60c0c"
style.font-color: white
}
success: {
style.fill: "#86f499"
style.stroke: "#017f07"
style.font-color: black
}
}
server-1.class: [base; error]
server-2.class: [base; success]
```
#### Features 🚀
- `class` field now accepts arrays. See [docs](TODO). [#1256](https://github.com/terrastruct/d2/pull/1256)
- `class` field now accepts arrays. See [docs](https://d2lang.com/tour/classes/#multiple-classes). [#1256](https://github.com/terrastruct/d2/pull/1256)
- Pill shape is implemented with rectangles of large border radius. Thanks @Poivey ! [#1006](https://github.com/terrastruct/d2/pull/1006)
#### Improvements 🧹